08-20-2007 4:51 PM
Im trying to update db table in user exit, with the internal table
my scenario:
loop at itekpo.
.....
.....
updating itekpo -
> at the end of user exit the db table ekpo have to be updated
.....
endloop.
Im updating internal table, using
MODIFY itekpo TRANSPORTING INCO1 INCO2 WHERE ebeln = itekpo-ebeln
where itekpo is internal table, but it is not updating the db table 'ekpo'.
i also tried updating ekpo directly !
Thanks in advance
08-20-2007 5:04 PM
I think you should not do db updates in the exit ,you should change the appropriate structures so that your db table will get updated. Let me know what exit you are using
08-21-2007 7:12 AM
Hi Hari,
the Function Exit EXIT_SAPMM06E_012,
and Include is ZXM06U43.
It is a purchase order user exit, it triggers on saving an order. tx. 'me22n'
As u said I have modified the internal table itekpo, so it should update db table 'ekpo' at the end of process, but it is not doing !
08-21-2007 4:43 PM
Kishore,
As I am not using this exit , i can not go and see why it is not updating. But you can cross check these things.
1) Check whether the enhancement is active in the Project (CMOD).
2) Check your Modify statemet :
MODIFY itekpo TRANSPORTING INCO1 INCO2 WHERE ebeln = itekpo-ebeln
In this statement , I think you have to mention FROM caluse
like MODIFY scarr_tab INDEX idx FROM scarr_wa
TRANSPORTING currcode.If you want to avoid using the MODIFY statement
you can use field symbols
FIELD-SYMBOLS: <fs1> type BEKPO.
loop at tekpo assignin <fs1>.
do your validations and change the values of the field symbol
<fs1>-inco1 = #####.
endloop.
Thanks
08-27-2007 4:10 PM
Hi Hari,
It didnt work in this way too, anyhow now I have to find Badi, do the necessary changes there.
any site/material for badi from basics?
Thanks in advance
08-28-2007 11:51 AM
Hi,
you can search in the forum itself,
Try this link for instance
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=tocreateaBADI&adv=false&sortby=cm_rnd_rankvalue
You can find a code for finding BADI as a report with the following Transaction
Reward if helpful
Regards
Byju