Application Development and Automation 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: 
Read only

UPDATE DATBASE TABLE

Former Member
0 Likes
385

Hi

All

I hv a transparent table ZVXXSAU with following fields

belnr-p.k.

blart-p.k.

gjhar

matnr

maktx

vbeln

flag

now i m fetching belnr,blart,gjahr into a int table ITAB

My problem :

If the data is Succesfully downlaode then i have to Set the value of flag in Database table ZVXXSAU-FLAG = X

for each downloaded data.

How can i do it.

i have used this query

LOOP AT T_ITAB

UPDATE ZVXXSAU

SET FLAG= 'X'

WHERE BELNR EQ ITAB-BELNR

AND BLART EQ ITAB-BLART .

i want to update table in single short..plz suggest best way to do it.

Thanks

Saurabh

2 REPLIES 2
Read only

Former Member
0 Likes
352

Hi,

Select * all the fields from the table ZVXXSAU and store it in the internal table ITAB.

Update the flag field with 'X'.

WA_ITAB-FLAG = 'X'.

MODIFY ITAB FROM WA_ITAB TRANSPORTING FLAG

WHERE FLAG = ' '.

UPDATE ZVXXSAU FROM TABLE ITAB..

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

Read only

Former Member
0 Likes
352

Hi Tiwari

Your code is right

only you might be missing the commit the changes.

regards

Dhananajy