Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Im trying to update db table in user exit, with the internal table

Former Member
0 Kudos

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

5 REPLIES 5

0 Kudos

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

0 Kudos

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 !

0 Kudos

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

0 Kudos

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

0 Kudos

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