Skip to Content
author's profile photo Former Member
Former Member

Dividing range(itab) supplied to submit.....?

Hi All,

Was hoping someone could help me with this.......I'll try and describe the situation and then post my code.

I need to create multiple background jobs dependant on a the volume of an itab - which in this case is a range that is built up within the program. A single job will be SUBMITTED for processing when the range previously built up is less or equal to a constant value. (In this case 20,000).

I can accomplish this quite easily by using the following code.

DESCRIBE TABLE grvbeln LINES gv_vbeln_count._

PERFORM getrange_vol. u201CGet ZVALUE_

IF gvdel_range => gv_vbeln_count._

PERFORM pgishipment. u201C Create single Job_

ENDIF.

SUBMIT wsmonitor_outb_del_gdsi_

VIA JOB lvjobname_

NUMBER lvjobcount_

WITH ifvstel IN lr_vstel_

WITH itvbeln IN gr_vbeln_

However i'm getting stuck when trying to solve how to create mutplie jobs dependant on when the range is greater than the constant value.

If the range is greater than the constant how can i divide the range into block of the constant value (i.e groups of 20,000) and submit all for processing no matter how many entries are contained within the range....??

Heres hoping....

Thanks in advance all.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 17, 2008 at 02:51 PM

    do sth like this:

    1) determine proc.

    IF cnt BETWEEN 1 AND 20000.

    cnt_job = 1.

    ENDIF.

    IF cnt BETWEEN 20001 AND 40000.

    cnt_job = 2.

    ENDIF.

    u2026

    IF cnt > 100001

    cnt_job = 5.

    ENDIF.

    *2)

    do cnt_job times

    your process and submitt

    u2026

    enddo.

    hope that helps

    A.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Guys.....Tried these suggestions but no luck.

      I'll try and make myself clearer....

      Essentially i have to split the range table into volumes to process with stipulated by the value taken from a parameter table so.....where constant value taken is 20,000

      19, 999 dels = 1 Job created

      20,000 dels = 1 job created

      20,001 dels = 2 jobs created (split into segments - 1 job being 20,000 dels- the other job containing 1 del)

      40,000 dels = 2 jobs

      40,000 dels = 3 jobs and so on.....

      Any ideas...???

      Thanks

      D

      Edited by: david steele on Jun 17, 2008 5:31 PM

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 02:58 PM

    20,000 is pretty big for a range table and probably won't work in a SELECT.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 03:04 PM

    Hi David,

     data: counter type i.
    
    _DESCRIBE TABLE gr_vbeln LINES gv_vbeln_count._
    
    _PERFORM get_range_vol. u201CGet ZVALUE_ 
    
    _IF gv_del_range => gv_vbeln_count._
    _PERFORM pgi_shipment. u201C Create single Job_
    ELSE..
    do
        counter =  gv_del_range  + counter.
        if counter <=  gv_vbeln_count
        else.
               _SUBMIT ws_monitor_outb_del_gdsi_
               _VIA JOB lv_jobname_
               _NUMBER lv_jobcount_
               _WITH if_vstel IN lr_vstel_
               _WITH it_vbeln IN gr_vbeln_
        endif.
    enddo.
    ENDIF.
    

    I think this will solve your problem

    &******** Reward Point if helpful*********&

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.