Ansicht
Dokumentation

CRM_AKT_EXTRATAB - Create Additional Tab Page in Activity

CRM_AKT_EXTRATAB - Create Additional Tab Page in Activity

PERFORM Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

This document explains how to create an extra tab page for the activity, as well as the fields that you wish to have in the new tab page. This IMG step does not contain a BADI because you have to create your own, which you implement at the end of the procedure.

The procedure consists of the following three steps:

  1. Create fields in a structure (transaction SE11)
  2. Map fields to the activity interface (transaction CRM_MAP)
  3. Implement the BADI (transaction SE19)

Create fields in structure

  1. In transaction SE11, call up the table CRMD_ACTIVITY_H and create an append structure. Use a name in your name range, by starting with ZZ, for example.
  2. Add the number of fields (of any type) that you want to include in this structure. These are the fields that are then incorporated in the activity tab page.
  3. Give appropriate data types to these fields.
  4. Save and activate the structure.
  5. Now call up structure CRMT_ACTIVITY_H_COM (still in transaction SE11). Create an append structure and include the structure you created in step 1. Save and activate the structure.
  6. Add this append structure to structure CRMT_1500_ACTIVITY_UI.
  7. In transaction SE80 create your own function group (again, use a name that is appropriate for your name range).
  8. Create a screen for containing your own fields in this function group.
  9. Create two new function modules for:
  • Getting the data from the BADI, for example, ZZTEST_1500_DATA_GET
  • Putting the data back to the BADI, for example ZZTEST_1500_DATA_PUT
  1. In the PBO module status of the screen write the code to input the data in the screen. The following code is an example for the DISPLAY mode:

MODULE STATUS_0200 OUTPUT.

* SET PF-STATUS 'xxxxxxxx'.

* SET TITLEBAR 'xxx'.

if gv_dialog_mode = 'C'.

loop at screen.

screen-input = 0.

modify screen.

endloop.

endif.

ENDMODULE. " STATUS_0200 OUTPUT

Flow Logic
When the BADI is implemented, the fields in the screen you have defined in the function group are anchored into screen 1500 of the function group CRM_ACTIVITY_UI activity TAB. When the user enters data into those fields, and saves the activity, the data is returned to the BADI.
  1. Go to Layout for your screen. The Dict./Prog screen contains all the fields that you want to append. Select the required fields and confirm your entries. The system adds the fields to the screen. Save and activate this screen.
  2. Move the corresponding fields of the BADI to the append structure that you have created, using the following coding as an example:

FUNCTION ZZTEST_1500_DATA_GET .

*"--------------------------------------------------------*"*"Local interface:

*" EXPORTING

*" REFERENCE(ES_CRMT_1500_ACTIVITY_UI) TYPE CRMT_1500_ACTIVITY_UI

*"--------------------------------------------------------

move-corresponding zztest to es_crmt_1500_activity_ui.

ENDFUNCTION.

And

FUNCTION ZZTEST_1500_DATA_PUT.

*"--------------------------------------------------------

*"*"Local interface:

*" IMPORTING

*" REFERENCE(IS_CRMT_1500_ACTIVITY_UI) TYPE

CRMT_1500_ACTIVITY_UI

*" REFERENCE(IV_DIALOG_MODE) TYPE CRMT_MODE

*"-------------------------------------------------------- move-corresponding is_crmt_1500_activity_ui to zztest.

move iv_dialog_mode to gv_dialog_mode.

ENDFUNCTION.

Map fields to your activity screen

  1. Call up transaction CRMC_MAP. This will display a list of the user interface (UI) structures. Select structure CRMT_1500_ACTIVITY_UI and choose Mapping.
  2. Choose New entries and enter the names of your new fields, the object name (ACTIVITY_H) and the object fields.

Implement BADI

  1. Call up transaction SE19 and enter the implementation name. This is the structure name you defined in transaction SE11).
  2. Enter the BADI definition name.
  3. Choose the Interface tab page. This contains the two methods for the PUT_STRUCTURE and GET_STRUCTURE. Choose one method description and code appropriately, depending upon the export and the import parameters.
Call the method for putting the data, for example:

IF_EX_CRM_ACTIVITY_APPEND~PUT_STRUCTURE

method IF_EX_CRM_ACTIVITY_APPEND~PUT_STRUCTURE .

CALL FUNCTION 'ZZTEST_1500_DATA_PUT'

EXPORTING

IS_CRMT_1500_ACTIVITY_UI = is_crmt_1500_activity_ui

IV_DIALOG_MODE = IV_DIALOG_MODE.

endmethod.

,,and :IF_EX_CRM_ACTIVITY_APPEND~GET_STRUCTURE

,,method IF_EX_CRM_ACTIVITY_APPEND~GET_STRUCTURE .

CALL FUNCTION 'ZZTEST_1500_DATA_GET'

IMPORTING

ES_CRMT_1500_ACTIVITY_UI = es_crmt_1500_activity_ui.

endmethod.


  1. Choose the Subscreens tab page to see your subscreen implemented for ACTIVITY_APPEND.
  2. Save this BADI and activate it. Please note that only one BADI can be activated at a time. If an active BADI exists, you will have to deactivate it and then activate the current BADI.
  3. Call up transaction CRMD_ORDER to create an activity. It should now contain an additional tab page called Customer Screen which will contain your appended fields.





BAL_S_LOG - Application Log: Log header data   General Material Data  
This documentation is copyright by SAP AG.

Length: 6305 Date: 20240523 Time: 165443     sap01-206 ( 72 ms )