sapdev logo background
sapdev logo sapdev logo
Comments

SAP BDT to populate new fields created on the CI_INCLUDE of grant master table GMGR




        Add fields to CI_ include CI_GMGR of GMGR database table

 

        Execute grants management BDT development transaction (GRANT_CUSTOMIZE)

 

        Grant Master BDT Customizing-> Screen layout and select 'Field groups'(GMS2)

 

        Click on 'New Entries'

 

        Enter details of new field group. For this example we are simply adding 2 fields to the gmgr
table and providing a screen to be able to populate these.

 

        Go back to main field group screen, select your new entry and double click on the
'Field Group-> Fields' folder option from the left column. Now enter your fields, for this
example I have copied fields from responsibilities group.

 

        Before you do the next steps you will need to go to SE80 and create a new function group
for example create one called ZZ_GMNEW. Then within that function group create two
function modules, Z_GMGR_NEWFIELD_PBO and Z_GMGR_NEWFIELD_PAI

 

        Within the top include of the function group insert the following declaration:

TABLES: ci_gmgr.

 

DATA: wa_gmgr TYPE gmgr,

����� wa_gmgr_old LIKE wa_gmgr.

 

        Within the source code of the function module Z_GMGR_NEWFIELD_PBO enter the
following code:

CALL FUNCTION 'GMG_GMGT_GMGR_GET'

��� IMPORTING

����� e_gmgr = wa_gmgr.

 

wa_gmgr_old = wa_gmgr.

MOVE-CORRESPONDING wa_gmgr TO ci_gmgr.

 

        Within the source code of the function module Z_GMGR_NEWFIELD_PAI enter the
following code:

MOVE-CORRESPONDING ci_gmgr TO wa_gmgr.

 

CALL FUNCTION 'GMG_GMGT_GMGR_COLLECT'

��� EXPORTING

����� i_subname = 'CI_GMGR'

����� i_gmgr��� = wa_gmgr.

 

        Now create a screen 0100 as a subscreen within the function group. Within the pbo
module place the function call: CALL FUNCTION 'BUS_PBO' and within the PAI module
place the function call: CALL FUNCTION 'BUS_PAI'.

 

        Add the two new fields created in the CI_GMGR structure onto the screen. One way to do
this is to go into change mode within screen layout and press F6. Now enter 'CI_GMGR'
in the 'Table/Field name' input box and press enter. Now select the two fields required,
ZZfield1 and ZZfield2 and press the green tick. You can now click anywhere in the screen
painter to place the two fields on the screen. Save and activate the whole function group.

 

        Return to main BDT customizing screen (Grant_customize) and select 'Views'(GMS3).
Then click the 'New Entries' button

 

 

        Enter view information as below, starting with the name as the next number in your custom
name range and then the program (fgroup) and function modules you have just created.

 

        Go back to main Views screen, select your new entry and double click on the
Views-> Field Groups folder option from the left column. Now enter the new field
group you created previously. Save data!

 

        Return to main BDT customizing screen and select 'Sections'(GMS4). Then click the
'New Entries' button

 

        Input new entry and give it a description and title. Save data

 

        Go back to main Sections screen, select your new entry and double click on the
Section-> Views folder option from the left column. Now enter the new view you
created previously.

 

        Return to main BDT customizing screen and select 'Screens'(GMS5). Then click the
'New Entries' button

 

        Enter details for you new screen, Save data.

 

        Go back to main Screen screen, select your new entry and double click on the
Screens-> Sections option from the left column. Now enter the new section you
created previously.

 

        Return to main BDT customizing screen and select 'Screen Sequence'(GMS6). Then
select the screen sequence entry and double click on the Screen Sequence -> Screens
folder option from the left column.

 

        Add your screen to the sequence by clicking on the 'New Entries' button

 

        Add you new screen to the screen sequence. Save data.

 

        Execute transaction BUSP (click on option from main grant customizing menu), new
screen will now appear as tab on grant master transaction 'GMGRANT'

 




comments powered by Disqus