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.
-------------------------------------------------------------------------------------------------------
2 comments:
how to create a two tabs using this customer exit
How to greyed out the field you added for ME22N and ME23N. Please share the solution with me on @ goofy.topz@gmail.com
Post a Comment