on 2019 Aug 21 9:37 AM
Is it possible to update DB table from internal table in AMDP, If yes what is the syntax?
Hi Chandru,
The syntax below is working for me.
I am updating a custom database, from an internal table.
In my example, both custom db and table use the same key structure as EKBE. My requirement was to set a field POITM to 'X' on certain conditions. At the beginning of the procedure, I had identified the rows that needed to have POITM updated and stored them in the internal table ':t_history' . Then I updated the database from the internal table.
btw-I found this syntax from SAP Note 2241598.
MERGE INTO zbw_mm_pohistory AS bw_history USING :t_history AS t_history
ON bw_history.ebeln = t_history.ebeln
AND bw_history.ebelp = t_history.ebelp
AND bw_history.zekkn = t_history.zekkn
AND bw_history.vgabe = t_history.vgabe
AND bw_history.gjahr = t_history.gjahr
AND bw_history.belnr = t_history.belnr
AND bw_history.buzei = t_history.buzei
AND bw_history.budat = t_history.budat
WHEN MATCHED THEN UPDATE SET bw_history.poitm = t_history.poitm;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.