Wednesday 27 June 2018

Adding custom tab in transaction RELMPL using BDT

This blog explains the enhancement for adding a custom tab in RELMPL transaction using BDT and to store the custom fields data in VILMPL table.

BDT:

The Business Data Toolset (BDT) is a central control tool for maintaining SAP programs. It supports maintenance via the use of dialog techniques, direct input and/or function modules. The BDT is basically the tool, SAP use when they want to add new fields, change field names, change/add field groups etc for specific customers, but they are now started to allow customers access to these maintenance transactions.

Step 1: Go to table VILMPL and add custom fields to include CI_VILMPL.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Step 2: Go to T-code SE80 and create function group ZZ_RELM.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Create Subscreen 0100 to add custom fields in the custom tab.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Add field CI_VILMPL-ZZID in the screen 100.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Declarations in the Top Include

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Logic in PBO.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Logic in PAI.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Create 2 function modules Z_RELM_ADDTIONAL_PBO and Z_RELM_ADDTIONAL_PAI.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Logic:

FUNCTION Z_RELM_ADDTIONAL_PBO.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

DATA: eo_busobj TYPE REF TO  if_reca_bus_object,
ed_activity TYPE recaactivity.
* To get instance
CALL FUNCTION 'REL1_GET_BUSOBJ'
IMPORTING
eo_busobj   = eo_busobj
ed_activity = ed_activity.

gv_change = ed_activity.
EO_BUSOBJ->get_ci_data(
IMPORTING
es_ci_data = ci_vilmpl    " Data of CI Include
).

ENDFUNCTION.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Logic:

FUNCTION z_relm_addtional_pai.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

DATA: eo_busobj   TYPE REF TO  if_reca_bus_object,
ed_activity TYPE recaactivity.
* To get instance
CALL FUNCTION 'REL1_GET_BUSOBJ'
IMPORTING
eo_busobj   = eo_busobj
ed_activity = ed_activity.
*  To set custom fields data
eo_busobj->set_ci_data( is_ci_data = ci_vilmpl ).
* Used to check create/change/display mode
gv_change = ed_activity.

ENDFUNCTION.

Step 3: Go to T-code RELML10002 and create Field Group 111 as below.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Click on the Field Group -> Fields and assign the custom fields to the field group.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Step 4: Go to T-code RELML10003 and create custom view ZRELAT as below.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Assign Sub screen of program SAPLZZ_RELM and PBO/PAI function modules to the custom view ZRELAT.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Assign field group 111 to the view.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Step 5: Go to T-code RELML10004 and create new section ZREL1A.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Assign custom view ZRELAT to the section.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Step 6: Go to T-code RELML10005 and create custom screen ZRELSC as below.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Assign section ZREL1A to the custom screen ZRELSC.

Add Empty Section REL19X in the first position otherwise, it won’t display.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Step 7: Go to T-code RELML10006

Select Screen Sequence REL1 and click screen sequence -> screens.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Assign screen ZRELSC in screen sequence as below.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

The custom tab will display after Overviews tab.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

Now go to T-code RELMPL and we can see the custom tab.

ABAP Development, SAP ABAP Tutorials and Materials, SAP ABAP Study Materials

2 comments:

  1. Nice post, Thanks for such valabule information.

    For more visit
    SAP Training

    ReplyDelete
  2. we provide a best modules in sap and (selenium) softwaare testing with real time scenarios.
    Our consultants are working professionals they will share our experience
    Who can learn in this module?
    Opportunities in this Module?
    Why Prefer Training with US?
    Training by Leading Architects
    Topic based Training
    Long-Term Technical Support
    Placement Assistance
    End to End – Project Support
    SAP HR Training in Chennai
    SAP Success Factors Training in Chennai
    SAP FICO Training in Chennai
    SAP MM Training in Chennai
    Sap Fiori Training in Chennai
    SAP HANA Training in Chennai
    software Testing modules
    Selenium Training in Chennaiss
    for more informations call 8122241286

    ReplyDelete