2009 Sep 15 6:25 AM
Hello Everybody,
I have implemented the BADIs VENDOR_ADD_DATA_CS and VENDOR_ADD_DATA.
And able to see the screen in the XK01. But I am not able to communicate the data from the custom screen to the
table .
Can someone tell me how we can get the data from the custom screen to the table?
Can you give me the flow logic please.
Thanks,
Sneha Singh.
2009 Sep 15 7:27 AM
Hi,
Use the methods SET_DATA and GET_DATA for PBO and PAI actions of the screen.
Regards,
Rajitha
Hello Everybody,
I have implemented the BADIs VENDOR_ADD_DATA_CS and VENDOR_ADD_DATA.
And able to see the screen in the XK01. But I am not able to communicate the data from the custom screen to the
table .
Can someone tell me how we can get the data from the custom screen to the table?
Can you give me the flow logic please.
Thanks,
Sneha Singh.
2009 Sep 15 7:27 AM
Hi,
Use the methods SET_DATA and GET_DATA for PBO and PAI actions of the screen.
Regards,
Rajitha
2009 Sep 15 2:02 PM
Hi Rajitha,
Thanks for the reply. I did use those methods in the PBO and PAI. But its not working.
Can you give me some sample code please?
Thanks,
Sneha SIngh.
2009 Sep 15 3:02 PM
Please help me. I am in great need.
This is what my code looks like -
DATA : L_BADI TYPE REF TO IF_EX_VENDOR_ADD_DATA_CS.
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
FLT_VAL = 'ZM'.
CALL METHOD L_BADI->GET_DATA
EXPORTING
FLT_VAL = FLT_VAL
CHANGING
T_KNVK = T_KNVK
T_WYT3 = T_WYT3
T_WYT1T = T_WYT1T
T_WYT1 = T_WYT1
T_LFM2 = T_LFM2
T_LFLR = T_LFLR
T_LFAS = T_LFAS
T_LFZA = T_LFZA
T_LFB5 = T_LFB5
T_LFBK = T_LFBK
S_LFM1 = S_LFM1
S_LFB1 = S_LFB1
S_LFA1 = S_LFA1.
ENDMODULE. " STATUS_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'STRD' OR
'AO01' OR
'AO02' OR
'AO03' OR
'UPDA'.
CALL METHODL_BADI->SET_DATA
EXPORTING
T_KNVK = T_KNVK
T_WYT3 = T_WYT3
T_WYT1T = T_WYT1T
T_WYT1 = T_WYT1
T_LFM2 = T_LFM2
T_LFLR = T_LFLR
T_LFAS = T_LFAS
T_LFZA = T_LFZA
T_LFB5 = T_LFB5
T_LFBK = T_LFBK
I_LFM1 = S_LFM1
I_LFB1 = S_LFB1
I_LFA1 = S_LFA1
I_ACTIVITY = I_ACTIVITY
FLT_VAL = FLT_VAL.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
2009 Sep 15 4:37 PM
Hi
U don't need to call those methods, they are just managed by standard program, u need to implement them in order to get and transfer the data.
Now the problem is to understand how you've defined your dynpro 0100, in which program?
Normally it defined a function group, here the dynpro to be defined and the function to set and get the data should be defined too.
So in the method SET_DATA the function module to get the data from standard program should be called, in the method GET_DATA the function module to change the data should be called.
Max
2009 Sep 15 4:41 PM
Thanks for the reply Max.
I have defined the Dialog program.
Can you give me some sample code please, as to how we can do that in function group?
2009 Sep 15 5:01 PM
Hi
This is my implementation in order to manage custom fields appended to LFA1:
By SE80 I've defined a function group having:
Dynpro:
- 9001
Functions:
- Z_ADD_VENDOR_SET_DATA: to get data from standard program:
function z_add_vendor_set_data.
*"----------------------------------------------------------------------
*"*"Interfaccia locale:
*" IMPORTING
*" REFERENCE(I_LFA1) TYPE LFA1
*" REFERENCE(I_ACTIVITY) TYPE AKTYP
*"----------------------------------------------------------------------
lfa1 = i_lfa1.
v_aktyp = i_activity.
endfunction.- z_add_vendor_get_data: to transfer data to standard program
function z_add_vendor_get_data.
*"----------------------------------------------------------------------
*"*"Interfaccia locale:
*" EXPORTING
*" REFERENCE(E_LFA1) TYPE LFA1
*"----------------------------------------------------------------------
e_lfa1 = lfa1.
endfunction.- z_add_vendor_get_fieldname: to indicate the fieldname with data changed
function z_add_vendor_get_fieldname.
*"----------------------------------------------------------------------
*"*"Interfaccia locale:
*" EXPORTING
*" REFERENCE(E_FIELDNAME) TYPE TBFDNAM
*"----------------------------------------------------------------------
e_fieldname = v_fieldname.
endfunction.I've used the structure LFA1 to design the dynpro 9001
Max
2009 Sep 15 5:06 PM
Thanks again for the reply Max.
Where would we call the custom screen?
We need to create one to have the fields in it right?
2009 Sep 15 5:07 PM
.......step 2
Then I've implement the BADI VENDOR_ADD_DATA_CS:
Method SET_DATA
case flt_val.
when 'ZZ'.
call function 'Z_ADD_VENDOR_SET_DATA'
exporting
i_lfa1 = i_lfa1
i_activity = i_activity.
when others.
endcase.Method GET_DATA
case flt_val.
when 'ZZ'.
call function 'Z_ADD_VENDOR_GET_DATA'
importing
e_lfa1 = s_lfa1.
when others.
endcase.Method get_fieldname_for_changedoc
case flt_val.
when 'ZZ'.
call function 'Z_ADD_VENDOR_GET_FIELDNAME'
importing
e_fieldname = e_fieldname.
when others.
endcase.
Method get_taxi_screen
check flt_val = 'ZZ'.
case i_taxi_fcode.
when 'ZAIR_TAB1'.
e_screen = '9001'.
e_program = 'SAPLZAIR_ADD_VENDOR'.
when others.
endcase.Just u can see I use the fms in order to fill and read the structure LFA1 used to manage my dynpro, LFA1 is defined as GLOBAL DATA in the TOP-INCLUDE of function group, so every component like functions and dynpro belonging to function group can see it
Max
2009 Sep 15 5:08 PM
U don't need to call the dynpro, the standard program will do it.
U need to indicate which dynpro has to be called by method get_taxi_screen:
check flt_val = 'ZZ'.
case i_taxi_fcode.
when 'ZAIR_TAB1'.
e_screen = '9001'. "<--- Set dynpro
e_program = 'SAPLZAIR_ADD_VENDOR'. "<--- Set dynpro program
when others.
endcase.The dynpro program is the main program genereted for my function group
Max
2009 Sep 15 5:11 PM
Max, where do we create the dynpro or the screen.
Do we create in the main program of the function group?
Thanks for all the help.
2009 Sep 15 5:16 PM
Hi
Yes you do.
After generating a function group by SE80, u can create several abap elements by right button of the mouse, in particular dynro and function.
Max
2009 Sep 15 6:28 PM
Max, I cant thank you enough for all the help extended.
I have awared full marks to you. Thank you once again.
2010 May 21 10:52 AM
Hi all,
this thread is very helpful.
My requirement is to update ztable along with lifnr.
I need to capture the generated vendor number and insert the record into ztable.
Do i need to go with any other BADI. or can you please suggest me for enhancement spots or exits..
Or shall i call the function module to get lifnr from the number range.
For Display and change, it is working fine.
Thanks & Regards,
Santosh Reddy
2010 May 21 4:01 PM
2010 Jun 09 4:55 PM
Hi there
I try to configure the enhancement like the same way as you described here.
But I've the problem, that I dont have the pushbutton, which I've created in the customizing "Prepare Modication-Free Enhancement in Vendor Master Record".
I'm not sure, if I've to assign the Function Code in the Application Toolbar ?
Hope you can help me.
Thanks
2010 Nov 09 12:06 PM
please help...
dear forum,
i have tried to extend the dialog as described from you.
my problem is - the screen is always empty...
i have extend the lfm1 structure - an use the field on my dynpro
e_program = 'SAPLZFLM_ERW'.
e_screen = '2000'.
e_headerscreen_layout = ''.
my Get_detial method
CALL FUNCTION 'ZFLM_GET_DATA'
EXPORTING
i_activity = i_activity
i_lfm1 = s_lfm1.
my set_data method
lfm1 = i_lfm1.
CALL FUNCTION 'ZFLM_SET_DATA'
EXPORTING
i_activity = I_activity
i_lfm1 = i_lfm1
.
and my get_fieldname for change...
e_fieldname = 'LFM1-ZEIKTO_0020'.
hase someone an advice fore me
thanks bertram
2010 Nov 09 3:05 PM
2014 Nov 10 9:53 PM
Hi all,
I had the same issue that the sub screen was not getting updated , actaully after SP05 / Ecc 5 we need not write any get / set method if u are appending the Sap Std Lfa1 table. Once you append the the Table and follow the above steps to implement the 2 badis, the custom fileds get updated by iteself.
In my case there was one new IS specfic custom badi which got enabled , due to which our new badi was not working, so once you disbale the new unwanted Badi our custom badi started working.
Thanks
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |