‎2007 Jun 22 6:41 AM
hi all,
how to modify values in dattabase table from an internal table
thanks in advance
siva
‎2007 Jun 22 6:43 AM
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
‎2007 Jun 22 6:43 AM
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.
‎2007 Jun 22 6:43 AM
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!
‎2007 Jun 22 6:44 AM
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
‎2007 Jun 22 6:45 AM
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