I have implemented the BADIs VENDOR_ADD_DATA_CS and VENDOR_ADD_DATA.
Everything is working fine.
Now I want to see the add on button only when certain checkboxes are selected in the Initial screen.
Can someone tell me how to do that? All the help is appreciated.
I would have done the following:
Open include MF02K_ADD_ON_FS0 of program SAPMF02K in SE38
There you will find a subroutine FORM SINGLE_ADD_ON_ACTIVE_CHECK .
Click on the spiral icon (Enhance--Shift+F4)
go to Edit->Enhancement Operations->Show implicit enhancement options
At line 380, right click and select Enhancements->Create from the context menu.
Export structure *RF02K* to memory.
This form is called just before your BAdI and contains the initial screen data (checkboxes)
We will use this to check if the check box you are interested in is Checked or not.
Next, in you BAdI implementation of VENDOR_ADD_DATA you are using method CHECK_ADD_ON_ACTIVE to enable the button, right?
Import from memory the RF02K structure and use fields--
which are the names of the checkboxes on initial screen--to check and activate your screen group conditionally based on this.
Hope this helps,
Note: When you generate the memory ID to export use vendor number itself as memory ID, and export only when you are in change mode (check ACTIVITY). This will ensure a unique memory id if many users are working togather (regenerate the same when importing).
Change mode will allow only one user to enter in for a vendor... this way we can ensure we grab the right bit from the memory.
I have one requirement to add a new field in Vendor master control tab, Please suggest how to go ahead.
1. Do i need to create a field in LFA1?
2. Do i need to implement BADI-VENDOR_ADD_DATA_CS and VENDOR_ADD_DATA or enhancements, if so what is the procedure.
Kindly suggest, thanks in advance.
Thanks and Regards,
Depending upon your requirement, you can add fields of tables LFA1 / LFM1 etc... or even use ztables.
You might need to do export import to shared buffer to have your data in the BAdI for saving it.
You need to implement both the BADI's, one activates the customer tab / button. The other one let's your program it.
The way I had done it was creating a function group which had all the screen programming and calling that function group program/screen from the BAdI.
in SPRO, goto
>Adoption of Cusomter's Own Master Data Fields
and read the documentation provided next to each node, it explains how you can proceed to implement it.
Thanks for the info, its very useful.
I understood that i have to implement the BADI to add new fields, the following are my questions.
1. Do i need to add the new append field in LFA1 or LFM1 ?
2. How the data will come to new screens in Vendor and also how to save the data which is entered in Vendor Master
If you have implemented could you please share the complete information
You can update in my message so that i will award full points.
Thanks in advance.
Please provide your guidence as well.
Thanks and Regards,
You can use one of the many implicit enhancements available in the PAI of Screen 0111 in program SAPMF02K.
if any Module (which will be most likely called in any situation) calls a subroutine, in the subroutine you will find enhancement spots with structure RF02K filled with checkbox values.
For example, use FORM OKCODE_BEARBEITEN in include MF02KFO0 and create an implement the enhancement at Line 693
This form is called from MODULE OKCODE_BEARBEITEN in the PAI of Screen 0111.