Ansicht
Dokumentation
DPR_CUST_TABSTRIB - BAdI: Additional Tab Page in cProjects
Addresses (Business Address Services) CPI1466 during BackupThis documentation is copyright by SAP AG.
Use
This BAdI is used in the Collaboration Projects component.
This BAdI enables you to include customer-defined views in the application. You can display additional fields from cProjects tables or from customer-defined tables in these views.
You can include an additional tab page for the following objects:
- Project
- Phase
- Task
- Checklist
- Checklist item
- Project role
Furthermore, the Projects view contains an additional tab page at top navigation level. If you include a new view, the system displays the tab page both for the operational object and for versions.
Requirements
Additional tab pages require appropriate views and controllers in a BSP application. The corresponding controller class must have a reference to the IF_DPR_COMMON interface as an attribute. This attribute causes the controller to be called when the additional tab page is displayed. This indicates which object is active.
Standard settings
Activities
After you have called the IMG activity, proceed as follows:
- In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
- If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
- In the corresponding field, enter a short text for implementation .
- In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
- Choose the tab Interface.
- The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
- If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
- Save your entries and assign a package.
- Position the cursor on a method. Call up the Class Builder by double-clicking it.
- Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
- Save and activate your coding, and navigate back to the screen Change Implementation.
- Save on the screen Change Implementation.
- Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
- Choose Activate.
- When the application program is executed, the coding you have created will be run.
Example
The following is a sample implementation used to display an additional tab page for both top level navigation and for the project definition.
Note:
The controllers added here must be valid otherwise the action is terminated when the application is called. The current controller is called with an instance of IF_DPR_COMMON - the object currently active is available here.
BSP application: CST_ADD
Top level navigation
,,Tabstrip title: 'otr(zotr_cust_txt/top_txt)'
,,Controller: CTRL_TAB_TOP.DO
Project definition
,,Tabstrip title: 'otr(zotr_cust_txt/proj_txt)'
,,Controller: CTRL_TAB_DPO.DO
method IF_EX_DPR_ADD_SAP_TAB_I~GET_ADD_TAB_DATA .
field symbols:
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
case
* top level navigation
when 'TOP'.
concatenate lc_pre_ctrl 'TOP' lc_suff_ctrl into <tab_data>-controller.
* project definition
when CL_DPR_CO=>SC_OT_PROJECT.
concatenate lc_pre_ctrl CL_DPR_CO=>SC_OT_PROJECT lc_suff_ctrl into
* phase
when CL_DPR_CO=>SC_OT_PHASE.
* ...
* task
when CL_DPR_CO=>SC_OT_TASK.
* ...
* checklist
when CL_DPR_CO=>SC_OT_CHECKLIST.
* ...
* checklist item
when CL_DPR_CO=>SC_OT_CHECKLIST_ITEM.
* ...
* role
when CL_DPR_CO=>SC_OT_PARTICIPANT.
* ...
endcase.
endloop.
ct_comp_ctrl = lt_tab_data.
EV_BSP_APPL = 'CST_ADD'.
endmethod.
Methods
Determination of Controller and Title for Additional Tabstrip
BAL Application Log Documentation TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 6138 Date: 20240523 Time: 183452 sap01-206 ( 74 ms )