The approach i follow in this i usually take a Function group, inside tha i create a screen, and two functions .
E_PROGRAM = 'SAPLZTESTFUN'.
E_SCREEN = '0100'.
one function getting the data from screen to BADI, and another one is setting the data i.e Transafering the data from BADI to screen.
so in the set_method i will call the set function and get_method i will call the get function, then transfer the content to SKNA1 etc sructures..
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'. ENDIF.
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
I am trying to add extra custom field in MK01 and XK01 screens. I have added this field to table LFA1 using 'append structure'. There is already one subscreen added for another requirement. I would have to create a new subscreen for this field. I want to use BADI VENDOR_ADD_DATA and VENDOR_ADD_DATA_CS. As mentioned above, I created a function group and includes for populating data to and from screen. In badi, you have used ->
IF flt_val = 'ZY' "<----Fliter value
AND i_taxi_fcode = 'ZTEST'. "<-- Tab Function code
What are above values? How to create them?
I am very new to BADI. Please help me out.