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

FM for splitting the records and then processing

Hi all

i have this requirement that there are records to be picked in my background job and to be processed. now the background job has to pick number of records first and process them e.g it has to pick the first 5,000 records, process them and then pick the next 5,000 records and so-on. now this is called a functionality of threading i think... and i have heard that there ia a standard FM in SAP to do this. but i am not coming across it. can anybody help me in this.

please ask questions if doubt any.

helpful answers will be rewarded.

thanks

jai

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 12:44 PM

    There is a variation in SELECT statement to fetch the first x number of records...I think you can try and use that variation to achieve your result.

    Regards

    Anurag

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 12:52 PM

    hi

    good

    i dont think there is any such function module who ll split your record and process it wheather it is in background or foreground.

    yes when you r using any kind of data upload using BDC SESSION METHOD or LSMW at that time while creating the number of sessions you can devide the number of records and accordingly you can run your sessions.

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 12:57 PM

    Hi,

    try this short example.

    REPORT ZGRO_TEST.

    *

    TABLES: BKPF.

    *

    DATA: I TYPE I.

    *

    START-OF-SELECTION.

    *

    SELECT * FROM BKPF.

    *

    I = SY-DBCNT MOD 5000.

    *

    IF I = 0.

    • do what you want.

    WRITE: / SY-DBCNT.

    ENDIF.

    *

    ENDSELECT.

    *

    END-OF-SELECTION.

    Hope it helps

    Regards, Dieter

    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.