‎2008 Nov 04 10:18 AM
hi,
i have to modify the table.my coding is
form update_table.
clear it_header.
loop at gi_header_temp into it_header.
vekp-brgew = it_header-brgew.
modify vekp from it_header where exidv = it_header-exidv.
endloop.
endform.
but i am getting syntax error'. expected after it_header'.
i have to update the data using where condition
‎2008 Nov 04 10:21 AM
Hi,
u r passing value to vekp ,so directly u can modify it.
form update_table.
clear it_header.
loop at gi_header_temp into it_header.
vekp-brgew = it_header-brgew.
modify vekp index sy-tabix
endloop.
endform.
Regards,
Nagaraj
‎2008 Nov 04 10:23 AM
Check if structure of vekp and it_header are same.They must be similar.
whats the use of following statement
vekp-brgew = it_header-brgew
You have not used that
‎2008 Nov 04 10:33 AM
Hi
Try this .
clear it_header.
loop at gi_header_temp into it_header.
vekp-brgew = it_header-brgew.
modify vekp from it_header TRANSPORTING brgew
where exidv = it_header-exidv.
End Loop
From SAP help for Modify statement "
. The WHERE addition can only be specified together with the TRANSPORTING addition. After WHERE, any logical expression can be specified in which the first operand of each individual comparison is a component of the internal table"
Regards
Beena
Edited by: Beena Prabha on Nov 4, 2008 5:35 AM
‎2008 Nov 04 10:41 AM
Hi,
You cannot use 'WHERE' clause with MODIFY statment ( when you updating database tables). I would suggest you to use Update instead of modify. Modify statment is dangerous. Unless you want that If an entry is not found in the table VEKP for that EXIDV then it should be created.
regards,
Advait
Edited by: Advait Gode on Nov 4, 2008 11:42 AM
Edited by: Advait Gode on Nov 4, 2008 11:42 AM
‎2008 Nov 04 10:44 AM
You cannot use WHERE condition while modifying a database table.
‎2008 Nov 04 10:58 AM
Hi,
Use 'Transporting' option with modify statement.
Thanks & Regards,
Sudheer