Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Automatic Execution to update ZTable

Former Member
0 Likes
605

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..............

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
567

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

3 REPLIES 3
Read only

Former Member
0 Likes
567

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)

Read only

Former Member
0 Likes
568

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

Read only

Former Member
0 Likes
567

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