- An instance of the BADI class must be passed to the user of the BADI to allow that user to get the data to be displayed on the screen.
- For this purpose , the instance is saved in a public static read-only attribute DYNPRO_INSTANCE of the BADI call. This attribute is generated.
- A public static method SET_INSTANCE_FOR_SUBSCREEN sets the attribute on the application side to the parameter passed.
- Using the method GET_INSTANCE_FOR_SUBSCREEN the parameter is then read on the user side.
Note : The Definition of Each screen Enhancement should contain the following.
Methods :
- PUT_DATA_TO_SCREEN :- Transport Data to the Subscreen
- GET_DATA_FROM_SUBSCREE :- Transport Data from screen.
- And one more method (DESCRIBE ) to provide the details of the Module pool program and sub-screen Details.
Ex:
- Adding custom sub-screen to XD01 Transaction Code.
Steps :
- Select Account-Group and enter the Customer .
- Press Enter.
- Screen looks like.
- Click on System-> Status.
- Pop-up will appear.
- Double click on Program.
- Screen looks like,
- Click on Goto -> Attributes.
- Pop-up will appear .
- Copy the Package name.
- Go to Transaction code SE18.
- Click on BAdI name radio button and click on F4 help.
- Pop-up will appear.
- Click on Information System Button.
- Pop-up will appear.
- Enter the package name and Press continue.
- Pop-up with BAdI Definition will appear.
- Click on BADI definition.
- Double click on BADI definition.
- For Documentation help.
- Click on Goto->Documentation ->Display.
- Go though on Documentation Help.
Implementation of BAdI.
- Click on Append structure.
- Execute Transaction code SPRO to find out the sequence Steps to work with Screen Enhancements.
- Execute : "Prepare Modification - Free Enhancement of Customer Master Record".
- Pop-up will appear.
- Click on continue.
- Click on Save.
- Save it in package.
- Select the already created Screen Group (Z2) and double click on Label Tab Pages.
Note :
The Implementation for CUSTOMER_ADD_DATA is already exists. So instead of creating a New Implementation , Its is better to change same implementation by De-activating the Implementation , which allows the changes.
- Go to Transaction Code SE19.
- Enter Classical BAdI Implementation radio button and enter the BAdI Implementation name.
- Click on Change.
- Check the status bar.
- Click on Interface Tab.
- Double click on Implementation Class name.
- Class Builder screen looks like.
- Double click on CHECK_ADD_ON_ACTIVE.
- Enter the logic,
- Pop-up will appear.
- Enter the Implementation name , start's with Z<implementation name> and click on continue.
- Either select or Create Enhancement Implementation.
- To Create Enhancement Implementation.
- Click on Create.
- Enter the Enhancement Implementation name , start's with Z<Implementation name>.
- Enter the short description.
- Click on continue.
Note : Make sure that the Module pool Program : SAPMZCUSTOM_SCREEN is created with subscreen Number 4000.
- Go Transaction Code : SE80.
- Select Program from Drop-down List.
- Enter the Program name start's with SAPMZ<program name >.
- Click on Display.
- Pop-up will appear.
- Click on Yes.
- One more pop-up will appear.
- Click on Continue.
- Pop-up will appear.
- Click on continue.
- Click on Save.
- Save it either in Package or Local Package.
- Right click on object name and click on activate.
- Right click on object name -> Create -> Screen.
- Pop-up will appear.
- Enter the Screen Number and click on continue.
- Enter the short description.
- Select Screen Type as Subscreen.
Test
- Enter the Account Group.
- Enter the Customer Number.
- Press ENTER.
- Enter the following details.
- Click on Legacy Customer Data.
;;;;;
Thanks for the step by step process of add custom tab screen in xdo1
ReplyDelete