‎2007 Feb 20 6:03 AM
Hi ,
I am using update statement to update a feild in a table
e.g.
UPDATE mara
SET <feild_name> = <value>
WHERE matnr IN g_r_matnr.
where g_r_matnr is a range for matnr.
When the number of records in the range is less the program works fine , but when it is large it results in a dump.
What i am planning to do is split this range into smaller sections and the use it , could you suggest some other alternative for it.
Regards
Arun
‎2007 Feb 20 6:07 AM
Hi,
You can try out loop at table where matnr in r_manr.
Update inside the loop based on index.
Cheers,
Sudhakar
‎2007 Feb 20 6:09 AM
hi,
1 . dont use UPDATE statement in standard SAP tables.
2. Use only MODIFY statement.
Regards
Anver
‎2007 Feb 20 6:22 AM
Hi Anversha ,
Yes it is generally recommended to use the Modify command , but in my case i want to a large number of records and the feild to be modified is only 1 , so if i used the modify command i will first have to retreive all the data from the table MARA and the use this command.
Because is feel transporting addition does not work when we update database tables.
Regards
Arun
‎2007 Feb 20 6:11 AM
.hi,maybe you could check first the number of records prior your plan splitting your ranges, if the the records described less than range then no need to splitting
‎2007 Feb 20 6:42 AM
Arun,
data : v_num type i.
ranges : v_temp for .......
loop the range
i = i + 1.
v_temp-sign = 'EQ'
v_temp-option = 'I'
v_temp-low = 'EQ'
appen v_temp.
if i eq '2000'.
UPDATE mara
SET <feild_name> = <value>
WHERE matnr IN g_r_matnr.
clear i.
endloop.
Pls. mark if useful
‎2007 Feb 20 9:17 AM