on 02-02-2007 11:22 AM
Hi,
I am implementing DPR_ADD_SAP_TAB_I for adding new tab page in Cprojects 3.1.
Please tell me whether we have to create any veiw?
if it is please tell me the procedure & steps
Hi...
Implement the BAdI DPR_ADD_SAP_TAB_I
and write following code in its method GET_ADD_TAB_DATA
method IF_EX_DPR_ADD_SAP_TAB_I~GET_ADD_TAB_DATA .
field-symbols: <tab_data> type DPR_TS_SAP_TAB_CTRL.
data: lt_tab_data type DPR_TT_SAP_TAB_CTRL.
constants: lc_pre_ctrl type string value 'CTRL_TAB_',
lc_suff_ctrl type string value '.DO'.
lt_tab_data = ct_comp_ctrl.
loop at lt_tab_data assigning <tab_data>.
case <tab_data>-obj_type.
project definition
when CL_DPR_CO=>SC_OT_PROJECT.
<tab_data>-tab_title = 'otr(zotr_cust_txt/proj_txt)'.
concatenate lc_pre_ctrl CL_DPR_CO=>SC_OT_PROJECT lc_suff_ctrl
into <tab_data>-controller.
endcase.
endloop.
ct_comp_ctrl = lt_tab_data.
EV_BSP_APPL = 'CST_ADD'.
endmethod.
Regards,
Reema.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry for the delay.
Here is how you implement the BAdI:
1. Go to SE18. Enter BAdI name. DPR_ADD_SAP_TAB_I in your case.
2. Select Create from the menu Implementation.Give a name to your implementation such as Z_DPR_ADD_SAP_TAB_I Now a class automatically gets created for you implementation. Enter the code that you have written in the question in the method GET_ADD_TAB_DATA. Only replace the application name from CST_ADD to ZCST_ADD.
3. Having done that, Now create the application ZCST_ADD
3.1 Create a View under it and place certain UI elements on it. Design the View that you want to see under the additional tab page basically.
3.2 Create a contoller under it, say <abc>.do and enter the name of the contoller class: zcl<menaingful_name>.
3.2.1 Double click on the class name and create it. Under properties tab you will see that the superclass is CL_BSP_CONTROLLER2.
Now go to Methods tab. and redefine the method do_request
In that method call the view that you have created.
Now activate aal your new z objects.
and goto cProjects. at the project definition you should be able to see the additional tab page and the under that you should get the View that you have created.
Regards,
Reema.
Pl award points to all useful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.