09-22-2009 11:53 PM
Hello Everybody,
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.
Thanks,
Sneha Singh.
09-23-2009 12:58 AM
Hi Sneha,
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--
D0110
D0120
D0130
D0210
D0215
D0220
D0310
D0600
D0610
which are the names of the checkboxes on initial screen--to check and activate your screen group conditionally based on this.
Hope this helps,
Cheers,
Aabhas...
09-23-2009 2:13 AM
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.
cheers,
Aabhas...
09-24-2009 1:36 PM
Aabhas, thanks for the response. But there is no data in the structure before the BADI.
And the enhancement spot is triggered before the user interaction. Can we do something after the checkboxes are checked?
Thanks,
Sneha Singh.
09-30-2009 6:20 PM
Hi Sneha/Abhas,
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,
Ravi
10-01-2009 4:24 AM
Hi Sneha,
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.
Thanks,
Aabhas
10-01-2009 4:29 AM
Hi Ravi,
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
-->Logistics-General->Business Partner
--->Vendors
-
>Control
-
>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
Aabhas
10-01-2009 2:06 PM
Hi Aabhas,
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.
Sneha,
Please provide your guidence as well.
Thanks and Regards,
Raveendra
10-21-2009 9:33 PM
Hi Sneha,
You didnt send me the details, also i want to disable this button(the one we created by using BADI) based on the purchase org will that be possible.
Thanks and Regards,
Raveendra