Sunday, December 14, 2014
Friday, December 12, 2014
Types of SAP Consultants
SAP Consultant
http://abapmentors.blogspot.jp/2012/08/different-types-of-sap-consultants.html
Thursday, December 11, 2014
Use of COLLECT & APPEND
See below link for use of Collect and Append:
https://www.sapnuts.com/tutorials/Using-Collect-and-Append-in-SAP-ABAP.html
Wednesday, December 10, 2014
History Table
SAP History Table (MBEW,MBEWH,.......)
http://ameblo.jp/topalog/entry-11204339608.html
Friday, November 28, 2014
回帰テストやるか: 解決 Should do Regression test
http://d.hatena.ne.jp/taka_2/20110615/p2
■[IT]リグレッションテストはどこまでやるのか
発端
(たぶん政治的な理由で)jarを分割したいとかいう、イミフな案件をやるために、大半の機能をリグレッションテストすることになった。
ごねたが、詳しい理由は隠されたまま、やることになってしまった。
政治力ってこわい。
人が少ないという理由で、
普段自分が保守を担当している部分+他人が保守を担当している部分まで、
リグレッションテストすることになった。
自保守担当分
自分が担当している部分については、をピックアップしたテストケースを用意してあり、
まずはこれを消化。
次に、今回jarを分割したことで影響の出る範囲を調査した上、
追加のテストケースを設定し、これを消化することで完了した。
工数は、合わせて1人日。
他人保守担当分
リグレッションテストケースが、全機能を網羅的にテストするテストケースになっていた。
僕「なんでこんなにテストやる必要があるの?」話にならない。
A「なんか不安じゃないですか。」
僕「jarを分割するだけなのに?」
A「なんか不安じゃないですか。」
まあ、他人担当分なので、あまり意見もできず、
コツコツとやることにした。
途中、明らかにバグなんだけど、運用上発生しないから大丈夫的な事象に見舞われつつ、
どうにか終えた。
工数は、10人日。
(それだけの期間があったから良かったけど)
どっちが正しいのか
パターン1:最低限やる
以下の部分だけリグレッションテストするパターン2:とりあえず全部やる
システムを構築したとき(保守に入る前)に行った、システムテスト仕様書(のサブセット;抽出基準不明)を繰り返す。
結論から言うと、どちらも正しいのだと思う。
理想を言えば、全ての機能を再テストした上でリリースする方がいいし、
かと言って、リグレッションテストに割ける時間は限られている。
じゃあどうするか
そこで、ググってみたところ、以下のようにするのが良さそうという結論に達した。- 自動化できるテストケースは自動化し、テストの工数を下げる。自動化したテストケースは実施コストが低いため、必ず行う。
- 手動で行うテストケースに優先度を付け、優先度ごとにテスト実施に必要な工数を見積もっておく。テストに割ける期間から、どの優先度のテストケースまで行うかを決め、テストを実施する。
- テストに割ける期間があまりにも短く、最優先のテストケースを全てこなせないような場合は、改修箇所から影響範囲を調査し、影響する機能のみテストを実施する。
- それでもムリっていう場合は、PMの引いた線がおかしいと思うので、文句を言う。
これで大体うまく行くんじゃないかって気がする。
Onsite Offshore project team responsibilities
Onsite Offshore project team responsibilities
http://www.saptechnical.com/Tutorials/Others/OnsiteOffshoreRoles.htm
By Anumitha
The following table provides the roles and responsibilities of onsite and offshore project team members:
Customer
|
Onsite Functional consultant
|
Onsite Technical consultant
|
Offshore QA
|
Offshore Technical Lead
|
Offshore Developer
| |
Development Initiation
|
X
|
X
|
X
| |||
Write Functional specification
|
X
|
X
| ||||
Review Functional Specification
|
X
|
X
| ||||
Sign-off Functional Specification
|
X
| |||||
Write Technical specification
|
X
| |||||
Review Technical specification
|
X
| |||||
Sign-off technical specification
|
X
|
X
| ||||
Write Test specification
|
X
|
X
| ||||
Review Test specification
|
X
|
X
| ||||
Offshore activity estimation and planning
|
X
| |||||
Offshore activity estimation approval
|
X
|
X
|
X
|
X
| ||
Development of the SAP objects
|
X
| |||||
Technical documentation
|
X
| |||||
QA Testing
|
X
| |||||
QA review
|
X
| |||||
Delivery
|
X
|
X
|
X
| |||
Customer acceptance or functional testing
|
X
|
X
| ||||
Problem report handling
|
X
|
X
|
X
| |||
Change request handling
|
X
|
X
|
X
| |||
Ongoing Support
|
X
|
X
|
X
|
X
|
Tuesday, September 30, 2014
Tuesday, September 23, 2014
Friday, September 19, 2014
SAP Useful Link
SAP Useful Links
Hi
Have a look on the below links:
for sd
Please check this SD online documents.
Also please check this SD links as well.
All help ebooks are in PDF format here
for mm
Regards,
Sreeram
Thursday, September 18, 2014
ABAP MVC ( Model, View, Controller)
Source Website
ABAP Objects Design Patterns – Model View Controller
Today we will discuss about the Design Pattern:
Model-View-Controller, which is also very famous by its abbriviation
MVC. By definition, MVC is to isolate the business logic from the User
Interface which gives great degree of flexibility to change business
logic independently to the user interface and vice versa.
Let’s take an example: We have to develop one Sales report for our
corporate intranet. This report must have the option to display the
sales data in the classical report format; different charts – pie, bar,
line or both – report & chart and it must be based on the User’s
choice. This type of requirements where we can easily separate the
Business logic and the views are the best candidates for MVC.
Generally, Model sends the data to controller and controller will pass that data to Views and views will display the data as per their nature. In SAP, our business logic(model) will not send data unless and until View request for an data because ABAP is event driven language. Like user has to run some transaction to get the data, means application view has to initiate the process and ask for the data from the Model. In this requesting process, Controller will help the view to be apart from the model.
As we can see here, Model will send the data to the Controller and controller will pass that information to the View. Now, its a view’s responsibility to create a user specific view – Report, or Chart.
In the next post, we will see how we can implement the MVC design pattern in ABAP usin the ABAP Objects.
Our business logic for this example is fairly simple – select the
Sales Orders from the VBAK which were created in last ten days. The
public method GET_DATA in the class ZCL_MODEL will act as the business
logic. Additionally, this class has the public attribute T_VBAK which
will be set by the GET_DATA and hold our data from the table.
Model Attribute definition
Code Snippet of method GET_DATA
This code would be implemented in the method GET_DATA
Controller Method definition:
Controller Attributes definition:
Code Snippet for method GET_OBJECT:
In the next post we will see, how we will use the controller class in our view and access the business logic encapsulated in Model class.
Code Snippet for View 1: ALV of MVC design
Code Snippet for View 2: Smartforms of MVC design
Let’s say, in future we enhanced the business logic model class and now we want to implement for the business. In this case, we just have to change the object reference created in the Controller and we are good to go. Obviously, we have to take care of the newly created methods or methods which parameters are enhanced.
Basics of MVC
In MVC, User Interface acts as the View; Business logic acts as the Model and the link which provides the link between the View and Model is known as the Controller. In real time business, MVC is used anywhere, where users have a choice to select his or her view. For example, Windows Media Player, Gmail or Yahoo mail and so on. All these type of application provides us the option to select the skin as per our choice.Generally, Model sends the data to controller and controller will pass that data to Views and views will display the data as per their nature. In SAP, our business logic(model) will not send data unless and until View request for an data because ABAP is event driven language. Like user has to run some transaction to get the data, means application view has to initiate the process and ask for the data from the Model. In this requesting process, Controller will help the view to be apart from the model.
UML for MVC
UML diagram of the typical MVC application would be:As we can see here, Model will send the data to the Controller and controller will pass that information to the View. Now, its a view’s responsibility to create a user specific view – Report, or Chart.
Advantages of using MVC:
Since both our business logic and view logic are different, we can easily change any of the logic without interrupting the other part.In the next post, we will see how we can implement the MVC design pattern in ABAP usin the ABAP Objects.
Demo Application
To implement the MVC, we will create two applications – One will generate an output in ALV and other will generate an output Smartforms. We will put our business logic in the MODEL class. We will create one CONTROL class to establish control between Model and Views.UML
The UML diagram for any of the application would be like:Model Class Setup
Model Method DefinitionModel Attribute definition
Code Snippet of method GET_DATA
This code would be implemented in the method GET_DATA
* Parameters * Importing IR_ERDAT TYPE TPMY_R_DATE Ranges for date * METHOD get_data. * * Get data and save into attribute T_VBAK SELECT * FROM vbak INTO TABLE t_vbak WHERE erdat IN ir_erdat. * * ENDMETHOD.
Controller Class Setup
Our controller class ZCL_CONTROL will have a method GET_OBJECT which will give us an object of the model class. We require a public attribute which can refer to the object created in the method GET_OBJECT.Controller Method definition:
Controller Attributes definition:
Code Snippet for method GET_OBJECT:
* Parameters * Importing IF_NAME TYPE CHAR30 Model class name * METHOD get_object . * DATA: lo_object TYPE REF TO object. * * Generic object reference to importing class CREATE OBJECT lo_object TYPE (if_name). IF sy-subrc = 0. * Downcasting to assign generic object to O_MODEL o_model ?= lo_object. ENDIF. * ENDMETHOD.
In the next post we will see, how we will use the controller class in our view and access the business logic encapsulated in Model class.
First Demo Application – ALV
For our first Application view will be ALV output. To get the data for the ALV into the application, we will use the reference of the MODEL class created in the Controller. This way our model class is entrily separated by the view.*&---------------------------------------------------------------------* *& Purpose - ABAP Design Patterns - Model View Controller MVC - ALV demo *& Author - Naimesh Patel *& URL - http://zevolving.com/?p=52 *&---------------------------------------------------------------------* * REPORT ztest_mvc_alv. * START-OF-SELECTION. *--------- * Controller *--------- DATA: lo_control TYPE REF TO zcl_control. * * Iniiate controller CREATE OBJECT lo_control. * * Get the object from Control CALL METHOD lo_control->get_object EXPORTING if_name = 'ZCL_MODEL'. * *--------- * Model - Business Logic *--------- * Date Range DATA: r_erdat TYPE RANGE OF vbak-erdat, la_erdat LIKE LINE OF r_erdat. * la_erdat-sign = 'I'. la_erdat-option = 'BT'. la_erdat-low = sy-datum - 10. la_erdat-high = sy-datum. APPEND la_erdat TO r_erdat. * * Get data method CALL METHOD lo_control->o_model->get_data EXPORTING ir_erdat = r_erdat. * *--------- * View - ALV output *--------- DATA: lo_alv TYPE REF TO cl_salv_table. * DATA: lx_msg TYPE REF TO cx_salv_msg. TRY. cl_salv_table=>factory( IMPORTING r_salv_table = lo_alv CHANGING t_table = lo_control->o_model->t_vbak ). CATCH cx_salv_msg INTO lx_msg. ENDTRY. * * * Displaying the ALV lo_alv->display( ).
First Demo Application – SmartForms Output
Our Second application is fairly simple once we have implemented the first application as our core logic of getting the data is out of the report. In this application only part which differs is calling the Smartform.Code Snippet for View 2: Smartforms of MVC design
*&---------------------------------------------------------------------* *& Purpose - ABAP Design Patterns - Model View Controller MVC - *& SmartForms Demo *& Author - Naimesh Patel *& URL - http://zevolving.com/?p=52 *&---------------------------------------------------------------------* * REPORT ztest_mvc_view_2_ssf. * START-OF-SELECTION. *--------- * Controller *--------- DATA: lo_control TYPE REF TO zcl_control. * * Iniiate controller CREATE OBJECT lo_control. * * Get the object from Control CALL METHOD lo_control->get_object EXPORTING if_name = 'ZCL_MODEL'. * *--------- * Model - Business Logic *--------- * Date Range DATA: r_erdat TYPE RANGE OF vbak-erdat, la_erdat LIKE LINE OF r_erdat. * la_erdat-sign = 'I'. la_erdat-option = 'BT'. la_erdat-low = sy-datum - 10. la_erdat-high = sy-datum. APPEND la_erdat TO r_erdat. * * Get data method CALL METHOD lo_control->o_model->get_data EXPORTING ir_erdat = r_erdat. * *--------- * View - Smartform Output *--------- * Smartform FM DATA: l_form TYPE tdsfname VALUE 'ZTEST_MVC_VIEW_2', l_fm TYPE rs38l_fnam. * CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = l_form IMPORTING fm_name = l_fm EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. * * calling Smartform FM DATA: ls_control TYPE ssfctrlop. " Controlling info DATA: ls_composer TYPE ssfcompop. " Output info * CALL FUNCTION l_fm EXPORTING control_parameters = ls_control output_options = ls_composer user_settings = ' ' t_vbak = lo_control->o_model->t_vbak EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.
Let’s say, in future we enhanced the business logic model class and now we want to implement for the business. In this case, we just have to change the object reference created in the Controller and we are good to go. Obviously, we have to take care of the newly created methods or methods which parameters are enhanced.
Subscribe to:
Posts (Atom)