Add Custom Fields in Header Level

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Scenario: Adding a sub screen to the Tcode – VL01N/VL0N/VL03N delivery document header.

The task is to find out the appropriate BADI for it and then implementing it.

Step1. Go to transaction: SE24.

Step2. Provide the class ‘CL_EXITHANDLER’ and clcik on Display button.

Step3. Double click on the method ‘Get_Instance’.


A dv e rt ise me nt
s R EPOR T THI S A D

Step4. Put a Breakpoint and go out of the transaction.

Step5. Go to the Tcode- VL01N.


Step6. The previous Debug point triggered. Click on teh variable name ‘exit_name’ whcih holds the current
BADI Name. Click on F8 button.

Step7. Click on F8 button.


Step8. Click on F8 button.

Step9. Noe clcik on the button W/O Order Reference.


Step10. Again the Debugg point triggered. Click on F8 button.

Step11. Click on F8 button.


Step12. Click on F8 button.

Step13. The scrren is displayed. Now hit the enter button from Keyboard.
Step14. BADI ‘LE_SHP_TAB_CUST_HEAD’ enable us to enhance the header of the delivery .

Click on F8 button.

Step15. BADI ‘LE_SHP_TAB_CUST_ITEM’ enable us to enhance the Item Details of the Delivery.

Click on F8 button.
Step16. Click on F8 button.

Step17. Click on F8 button.


Step18. Click on F8 button.

Step19. Click on F8 button.


Step20. Click on F8 button.

Step21. Click on F8 button.


Step22. Click on F8 button.

Step23. Click on F8 button.


Step24. All BADI are called . With the screen displayed, click on the Header Icon.

Step25. All the header tabs are displayed. Our badi enhancement will add up a new tab in this screen.
Step26. Go to transaction SE18.

Step27. Provide the BAdi name ‘LE_SHP_TAB_CUST_HEAD’ & click on display button.

Step28. The interfcae contains some methods for adding extra tab to the header of the delivery screen.
Step29. Go to Transaction SE11.

Step30. Procide the Header of delivery table name : LIKP and click on Display button.
Step31. Clcik on Append structure ans cretae a append structure ‘ZZOTHER_DELV_HEAD’ with two fields .
Activate the structure.

Step32. Now go to Tcode- SE80.

Step33. Select the Function Group and provide the name as ‘ZFG_DELIVERY_ENHC’ and create it..

Step34. In the Automatically include program : ‘LZFG_DELIVERY_ENHCTOP’ create two data objects and
activate the imclude.
Step35. Create a screen ‘5555’ in the function group and select the screen type as subscreen and click on the
layout to design it.

Step36. Create twi test fileds and two input fields with the same name as two data object are created in the
top include ‘LZFG_DELIVERY_ENHCTOP’. Activate it at last.
Step37. Activate it.

Step38. Cretae a funcction module ‘ZGET_DELIVERY_HEAD_SCREEN_VAL’ under the FG. Provide the
exporting parameter and click on source code tab.
Step39. Provide the below code and activate the function module.

Step40. Cretae another funcction module ‘ZSET_DELIVERY_HEAD_SCREEN_VAL’ under the FG. Provide the
importing parameter and click on source code tab.
Step41. Provide the below code and activate the function module.

Step42. All screen and relevant function module are ready to be used in the BAdI Implementation. Now go to
teh Tcode- SE19 .

Step43. Provide the BAdI name ‘LE_SHP_TAB_CUST_HEAD’ and clcik on Create Impl. Button.
Step44. Provide the implemenataion name ‘ZIMPL1_LE_SHP_TAB_HD’ and clcik on Continue button.

Step45. Provide teh short text and Click on interface tab.


Step46. Double clcik on the first method ‘ACTIVATE_TAB_PAGE’ to implement it.

Step47. Clcik on Yes button to continue.


Step48. Provide the below code. Details like: the Tab Name to appear in delivery header section, Tab position
number, Program name : it should be the function group name prefixed by SAPL and the screen (type :sub
screen) 5555 cretaed inside the function group. At last activate it and go back.

Step49. Double clcik on the second method ‘TRANSFER_DATA_TO_SUBSCREEN’ to implement it.


Step50. In side this method call teh function module ‘ZSET_DELIVERY_HEAD_SCREEN_VAL’ and activet it.
Double clcik on the function module name to get to know the details.

Step51. The detailed source code of teh FM ‘ZSET_DELIVERY_HEAD_SCREEN_VAL’ is as follows.


Step52. Double clcik on the second method ‘TRANSFER_DATA_FROM_SUBSCREEN’ to implement it.

Step53. In side this method call teh function module ‘ZGET_DELIVERY_HEAD_SCREEN_VAL’ and activet it.
Double clcik on the function module name to get to know the details.
Step54. The detailed source code of teh FM ‘ZGET_DELIVERY_HEAD_SCREEN_VAL’ is as follows.

Step55. At last activate the BAdI implementation.


Step56. Now let’s create a delivery order. Go to transaction : VL01N.

Step57. Click on the header button without Order Reference.


Step58. Procvide teh details and hit teh eneter button from keyboard.

Step59. Procie the ship-to-party and planned Gi date and clcik on teh header icon as highlighted.
Step60. Click on the new appeared tab ‘Carr Details’ . The sub screen is called and the designed fileds are
displayed.

Step61. Provide some values to it and clcik on save button


Step62. The delivery ‘80000002’ is generated.

Step63. Navigate along the highlighted path to see teh details after save.
Step64. clcik on the Header Icon .

Step65. Naviagte to teh appropriate tab and teh saved details are appeared.
Step66. Go to trannsaction SE11 and go to table : LIKP and clcik on the display contents button.

Step67. Provide the delivery number and clcik on Execute button.

Step68. The maintained details are saved in the table.

You might also like