SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News


Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> SD
View previous topic :: View next topic  
Author Message

Joined: 01 Sep 2007
Posts: 1636

PostPosted: Fri Feb 11, 2011 6:16 pm    Post subject: BADI VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS Reply with quote

Author: Lorenzo

These are the actual badi names on 4.7 (620). I found them by chance, desperately navigating the customizing in search for an alternative to vendor classification. I was quite surprised to find them, so I suppose thy are new in 4.7.

However, I could make them work quite easily.

1) I created an append structure to LFA1 (If you want to save your data in a Z* table, you have to program set and get method, If you use append structure you have to do nothing...)

2) I created a module pool ZMYVENDORDATA and a DYNPRO 100 with my fields LFA1-ZZMYFIELD1. I have done nothing more n the dynpro/modulepool.

3) IMG->logistic general->business partner->vendor->Control_>Adoption of customer's own master data fields->Prepare modification.

Here I Have creates a Screen Group Z1 (MyCustomerData) and my tabs (actually only one, and I haven't used the function code I was asked for).

4) In SE19 I create the implementation ZMYIMP1 for badi VENDOR_ADD_DATA.

I have implemented method CHECK_ADD_ON_ACTIVE with the code:

IF i_screen_group EQ 'Z1'.
e_add_on_active = 'X'.

5) In SE19 I create the implementation ZMYIMP2 for badi VENDOR_ADD_DATA_CS.

5.1)Set filter to Z1.
5.2) Implemented method GET_TAXI_SCREEN with code:

e_screen = '0100'.
e_program = 'ZMYVENDORDATA'.
e_headerscreen_layout = ' '.

Activate all and enjoy it!

Read data from read the screen fields
in the method GET_TAXI_SCREEN, you have to pass the program name.

IF flt_val = 'ZY' "<----Fliter value
AND i_taxi_fcode = 'ZTEST'. "<-- Tab Function code

e_screen = '100'. "<----screen number
e_program = 'SAPLZTEST_CUST'. "<--Function Group (Main program name of the function group)
e_headerscreen_layout = 'B'.


Go to SE80 , create the function group with name ex: ZTEST_CUST it is in my case.

now create a screen 100(subscreen type)

add the UI elements, then save it, Now create two functions one For ZZGET_DATA and one for ZZSET_DATA.
for ZZGET_DATA function exporting parameters for additional fields ,which get the data from screen fields to the standard structure SKNA1 to save it to DB.

for ZZSET_DATA function
have an importing parameter /s
for additional fields , to set the values to the screen fields from BADI

Also see:
SAP Note 580266 - Enhancements without modification in
vendor master
SAP Note 577502 - Enhancements without modification in customer master record
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> SD All times are GMT + 4 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.