‎2009 Apr 07 1:17 PM
Hello,
I am doing modifications in one of the user exit ZXM06U44.
This is triggered during PO creation and PO Release.
On PO Creation i want to insert some data of header and line item to three different Z Tables which i Have created.
Now when i am going to insert the data to thes Z Tables then it is not inserting the same.
Will i have to declare them in TABLE tab of userexit.
Or anyone can give me other solution as it wants access key to change the Userexit function module.
Codeing is as
wa_table1-ebeln = i_ekko-ebeln.
wa_table1-ebelp = xekpo-ebelp.
wa_table1-menge = xekpo-menge.
wa_table1-idnlf = xekpo-idnlf.
wa_table1-matnr = xekpo-matnr.
wa_table1-werks = xekpo-werks.
insert ztable1 from wa_table1.
clear wa_table1.
wa_table2-ebeln = i_ekko-ebeln.
wa_table2-ebelp = xekpo-ebelp.
wa_table2-wempf = xekkn-wempf.
wa_table2-ablad = xekkn-ablad.
wa_table2-kostl = xekkn-kostl.
insert ztable2 from wa_table2.
clear wa_table2.
wa_table3-ebeln = i_ekko-ebeln.
wa_table3-ebelp = xekpo-ebelp.
wa_table3-eindt = xeket-eindt.
insert ztable3 from wa_table3.
clear wa_table3.
Now at insert command it is not inserting to database.
Anyone suggest me the solution.
Thanks & Regards,
nitin Malhotra
‎2009 Apr 07 1:26 PM
use modify statement instead of insert statement. it will modify the record if it already exist and will insert record if it does not exist.
syntax is
modify <dbtablenam> from table <itab> or
modify <dbtablename> from <workaread>
Regards,
Anil N.