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

modifying database table

Former Member
0 Likes
534

hi all,

how to modify values in dattabase table from an internal table

thanks in advance

siva

5 REPLIES 5
Read only

Former Member
0 Likes
516

hi Prasad,

first fill the internal table and then use the below code

modify dtab from itab.

where dtab is database table and itab is internal table

Read only

Former Member
0 Likes
516

hi,

write modify keyword,

sample code,

DATA message_wa TYPE t100.

message_wa-sprsl = 'EN'.

message_wa-arbgb = 'MYMSGCLASS'.

message_wa-msgnr = '100'.

message_wa-text = 'Some new message ...'.

MODIFY t100 FROM message_wa.

that's all, it works.

regards,

seshu.

Read only

Former Member
0 Likes
516

wa-field1 = <value1>

wa-field2 = <value2>

wa-field3 = <value3>

Modify dbtab(database table name) from wa.

or directly

Modify dbtab(database table name) from itab.

Reward if useful!

Read only

Former Member
0 Likes
516

hI

You would have to use

modify <db table name> from <internal table name>.

update <db table name> from <internal table name>.

hope it helps...

<b>do reward if useful...</b>

regards

Read only

Former Member
0 Likes
516

see the modify query ...

SELECT INVOICE_NO GATE_ENTRY_NUM
INTO CORRESPONDING FIELDS OF TABLE I_ZFBPS_INV_LINK
FROM ZFBPS_INV_LINK
FOR ALL ENTRIES IN GATEIN_ITAB
WHERE GATE_ENTRY_NUM = GATEIN_ITAB-GATE_ENTRY_NUM.
 
 
LOOP AT I_ZFBPS_INV_LINK.
read table  GATEIN_ITAB  with key  GATE_ENTRY_NUM =  I_ZFBPS_INV_LINK-GATE_ENTRY_NUM
****just    have  if  logic    it will work   
IF  GATEIN_ITAB-INVOICE_NO = I_ZFBPS_INV_LINK-INVOICE_NO   .
MODIFY GATEIN_ITAB INDEX SY-TABIX.
ENDIF .
ENDLOOP.

reward points if it is usefull ..

Girish