09-03-2009 1:38 PM
Hi all,
Is there any BADI or USER EXIT available for the transaction ME51N to save
some customer data fields in a separta Z table , after the data is saved from the
Purcahse requistion .
I have used the customer exit MEREQ001 for additing the customer filelds with TABLE CONTROL.
I am not able to save the data from the table control . Any suggestion on this will be apprecitated .
Best Regards
09-03-2009 2:28 PM
Hi,
You have to use 'EXIT_SAPLMEREQ_003' to import data from screen to your tables and use 'EXIT_SAPLMEREQ_001' to send data to screen.use the below code like below:
EXIT_SAPLMEREQ_001:
tables : ci_ebandb.
data : i_mereq_item type mereq_item.
if im_req_item is initial.
clear: ci_ebandb.
else.
i_mereq_item = im_req_item->get_data( ).
move-corresponding i_mereq_item to ci_ebandb.
endif.
EXIT_SAPLMEREQ_003
data : i_mereq_item type mereq_item.
if not im_req_item is initial.
i_mereq_item = im_req_item->get_data( ).
move-corresponding ci_ebandb to i_mereq_item .
call method im_req_item->set_data( i_mereq_item ).
endif.
Also set the flag EX_CHANGED = 'X' to transafer the changes to database
Regards,
Himanshu
09-03-2009 2:28 PM
Hi,
You have to use 'EXIT_SAPLMEREQ_003' to import data from screen to your tables and use 'EXIT_SAPLMEREQ_001' to send data to screen.use the below code like below:
EXIT_SAPLMEREQ_001:
tables : ci_ebandb.
data : i_mereq_item type mereq_item.
if im_req_item is initial.
clear: ci_ebandb.
else.
i_mereq_item = im_req_item->get_data( ).
move-corresponding i_mereq_item to ci_ebandb.
endif.
EXIT_SAPLMEREQ_003
data : i_mereq_item type mereq_item.
if not im_req_item is initial.
i_mereq_item = im_req_item->get_data( ).
move-corresponding ci_ebandb to i_mereq_item .
call method im_req_item->set_data( i_mereq_item ).
endif.
Also set the flag EX_CHANGED = 'X' to transafer the changes to database
Regards,
Himanshu
09-04-2009 5:37 AM
Thanks for your response,
I am not using ci_ebandb ie we have not appended the EBAN table.
We have created our own Z-table . For each item in eban table, the
z-table will n number of records.
This Z table we have used the subsceen of the user exit MEREQ001 with a table control.
My problem is how to save the data from the table control in database while saving the requisition.
Best Regards
Edited by: Hari on Feb 1, 2011 6:50 PM