Tuesday, 4 November 2014

Screen Enhancement For Delivery Header VL01N/VL02N/VL03N


Screen Enhancement in delivery Header VL01N/VL02N/VL03N via BAdI.
---------------------------------------------------------------------------------------------------
Step1. Go to Outbound Delivery Transaction VL02N.







Step2. Give an existing delivery number and hit Enter Key.












Step3. Go to the Header level of the Delivery.












Step4. Now in some case the business needs to capture of extra information on header level, they can look for some new custom tab with sub screen so that the information can be stored in the enhanced fields of the standard table or in some Z tables.














Step5. Let's look for some BAdI's for this. There are multiple ways to find if a BAdI is available or not. Let's this time go with the Transaction- SE81.








Step6. Delivery falls in the Logistic Execution Area. So select LE & click on Select button to highlight the sub option LE. Then finally click on Information System.
















Step7. We reached in this screen. Now here from the left side tree, under Enhancement->BAdI'S , double click on Definition and finally click on the F8 button.



















Step8. The search results shows a lot of BAdI's. So lets use the naming convention and the description to choose a appropriate one. Here the BAdI- LE_SHP_TAB_CUST_HEAD seems promising.
















Step9. Go to SE18 transaction and provide the badi name to know more details about it.














Step10. Here the interface method contains some meaningful method to do our requirement.










Step11. To create an implementation go to Tcode- SE19.  Provide the BAdI name and click on Create implementation.






















Step12. Provide an implementation name & continue.

















Step13. Provide a short description and double click on the Method : ACTIVATE_TAB_PAGE.

















Step14. The method signature contains meaning some meaningful parameters to activate a tab on the delivery header. Here we need to pass the tab name, tab position, the sub screen to be displayed on selection of the tab and the program that holds the sub screen.





















Step15. Create a Function Group and a sub screen.




















Step16. Provide a screen number '0001' , choose sub screen and click on layout to design the screen.













Step17. For example lets create a Box on the screen.















Step18. Activate everything and mark that for the function group we have the function fool program      'SAPL-FG NAME'.
















Step19. Now in the BAdI implementation go to the method 'ACTIVATE_TAB_PAGE' and put the below code, activate the method.

















Step20. Activate the BAdI.

















Step21. Launch VL02N and go to the Header level and we have our screen under the Enhanced tab.











Step22. Lets create a delivery in VL01N .















Step23. Go to the  header level.












Step24. We have the customized enhanced tab and enhanced screen.












-------------------------------------------------------------------------------------------------------

Sunday, 2 November 2014

Customer Exit (Screen Exit)- ME21N/ME22N/ME23N- Header



Step1.  Go to Tcode- ME21N. Let it be as a requirement, we need some customer specific input field on the header section of the screen. As this is a standard program and screen, let's look for a screen exit for it.













Step2. Go to the system->status to get the program.

















Step3.  From Goto->Attributes get the package.

















Step4. Go to Tcode- SMOD to find out any screen enhancement available or not. Click on F4 option.














Step5. Provide the package - ME and select Screen Exit and Continue.





















Step6. Here we have two enhancements. Select the second one.


















Step7. go for display option.




















Step8. Here we have all the options.





















Step9. Go to Tcode- CMOD  to create a project.
















Step10. Provide short text.


















Step11. Provide the Enhancement name and click on Components button.












Step12. Double click on the Include: CI_EKKODB and maintain some fields.


















Step13.. So here we have created a field in the include . Activate it.










Step14. The include is created in the EKKO purchasing header table.













Step15. Now Double click on the called program 'SAPLXM06'.
















Step16. Select sub screen option and click on layout.





















Step17. Make a text label and input field as shown below. Go back to the flow logic,.












Step18.  We have the modules in PBO and PAI.












Step19. Define the module in PBO.













Step20. Activate it.

















Step21. Define the module in PAI.













Step22.



















Step23. Activate the module.















Step24. Activate the flow logic and go back.















Step25.  The calling program is 'SAPMM06E' with the screen 101. Go to SE51 transaction and open the flow logic. So here the customer sub screen is called.

















Step26. Coming back to the project our back end table extension and screen field is ready. now we need certain code to read the screen input value and store it in the back end field in Po creation Tcode- ME21N  and Need to retrieve the field value from the database to the screen field when user launches ME22N or ME23N transaction.

















Step27. So  here we have the FM 'EXIT_SAPMM06E_008' to read the screen field value and putting into the DB field. So double click on the Fm.
















Step28. So here we have the changing field e_ci_ekko is available take the value from the screen.
Double click on the structure- EKKO_CI.



















Step29. So we have the extended custom field.
















Step30. Put the code in the include and here map the screen input value to the changing parameter.















Step31. Now double click on the function module 'EXIT_SAPMM06E_006' where our code can place the value from the database to the screen.














Step32. We have the data available in the importing parameter I_CI_EKKO.






















Step33. So inside the include map the value from the importing parameter to the screen field.















Step34. Activate the project. now execute the tcode- ME21N . So here in the header we can find a new tab CUSTOMER DATA where we have our new custom field. Provide some value and create a purchase order.










Step35. Save it and we have the po number.















Step36. check in the db table EKKO and here have the po and our extended custom filed value.









Step37. Now execute Tcode- ME22N and we can see the value in our custom field.












-------------------------------------------------------------------------------------------------------

Comments system

Disqus Shortname