‎2009 Apr 02 3:20 PM
Hai Friends,
I have developed a report which updates a Ztable with material document number and plant as input. now if i execute the material document number from 1 to 1000 the entries will be updated in the table. right now i am scheduling this in background.is there any possiblity of automatic execution for next 1000 entries. that is after updating the table it should again execute for 1001 to 2000. if so kindly explain me the process.
Thanks..............
‎2009 Apr 02 11:31 PM
You could look at using "submit via job" to run the next one in the sequence:
[SUBMIT - job_options|http://help.sap.com/abapdocu/en/ABAPSUBMIT_VIA_JOB.htm]
... then each program run would use its own "high value + 1" as the low value and "high value + 999" as the high value parameters to the next job submitted.
Jonathan
‎2009 Apr 02 4:54 PM
one way is that u can create variants for each of set of these entries.eg: varinant1 will have 1 to 1000.
variant2 will have 1001 to 2000 etc.
Now, u can schedule and run these variants acording to the order.( u can check SM36)
‎2009 Apr 02 11:31 PM
You could look at using "submit via job" to run the next one in the sequence:
[SUBMIT - job_options|http://help.sap.com/abapdocu/en/ABAPSUBMIT_VIA_JOB.htm]
... then each program run would use its own "high value + 1" as the low value and "high value + 999" as the high value parameters to the next job submitted.
Jonathan
‎2009 Apr 03 10:54 AM
Hi,
Use this logic.
Get the number of records
DESCRIBE TABLE output LINES g_records.
g_from = 1.
g_to = 1000.
IF g_records > 1000
g_insert_num = g_records DIV 2000
g_insert_num = g_insert_num + 1.
ELSE.
g_insert_num = 1.
ENDIF.
DO g_insert_num TIMES.
LOOP AT output FROM g_from TO g_to.
Fill the work area.......
Append work area
ENDLOOP.
Insert into the custom table
INSERT DBTAB FROM TABLE itab
COMMIT WORK AND WAIT.
Regards
Sandip