09-17-2008 6:51 AM
Hi ,
i have a internal table I_VBAK (contains only 2 fields
i wou;d like to modify the database table VBAK
09-17-2008 7:00 AM
Hello,
It is not recommended to use direct Statements such as Insert / Modify / Update for the Standard SAP Tables which will cause in direct update.
Instead, what you can do is to use a BAPI BAPI_SALESORDER_CHANGE and modify the VBAK table indirectly with the fields that you have in the Internal table.
Hope it was helpful.
Thanks and Regards,
Venkat Phani Prasad Konduri
09-17-2008 7:10 AM
Hi Venkat the fiels i am modifying is an customised field ???
not an standard SAP defined one.
09-17-2008 7:05 AM
Hi,
Try this.
If u want to make use of direct statements like modify/ update, first lock the table using the function module enqueue_e_table, then make changes as per your requirement.
ex: modify <tablename> from <internaltablename>
After modifying unlock the table using the dequeue function module, then use COMMIT WORK stmt to capture the changes in the table.
Sharin.
09-17-2008 7:23 AM
Hi,
Go through this blog updated by me.
http://theguruspeaksaboutsap.blogspot.com/2008/01/how-to-update-database-records-without.html
But i recommend you not to make changes in standard if you are doing it just for the practice consult your team lead beofre you make changes.And do it only if required.
Regards,
Harini.S
09-17-2008 7:29 AM
Hi,
tables: vbak.
Data : i_vbak type table of vbak.
field-symbols <vbak> type vbak.
select-options : s_vbeln for vbak-vbeln.
select vbeln
audat
from vbak
into corresponding fields of table i_vbak
where vbeln in s_vbeln.
loop at i_vbak assigning <vbak>.
<vbak>-audat = '20080917'.
endloop.
update vbak from table i_vbak.
Try this code. It is working for me.
Regards,
Kasuladevi Srinivas