Skip to Content
0
Former Member
Aug 04, 2009 at 10:38 AM

How to split SELECT to slices (parallel processing)

1772 Views

Hi experts,

I've have following select statements and I want to split them to some slices so I can apply parallel processing correctly. I should do that because I want follow[ this logic|http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a7f1f505211d189550000e829fbbd/content.htm].

I followed this [guide|http://help.sap.com/saphelp_nw04/helpdata/en/fa/096e92543b11d1898e0000e8322d00/frameset.htm].

But as I said I don't know how to build these packages.

My idea about package size

package size = Lines of itab in SELECT / available wp.

But this idea is incorrect. Because first I must do this Select without parallel processing to get the lines of my itab.

So,

how can i build packages and how can I set their size dynamically?

Unfortunately, SDN search or Help.sap.com do not have a solution.

Please do not give me hundred lines of code. Try to explain me.

SELECT *
    FROM ltak
    INTO TABLE lt_ltak_all
    WHERE lgnum IN so_lgnum
      AND tanum IN so_tanum
      AND bdatu IN so_bdatu
      AND kquit = 'X'  
      AND betyp = 'L'.

  CHECK sy-subrc = 0.

    SELECT *
    FROM ltap
    INTO TABLE lt_ltap_all
    FOR ALL ENTRIES IN lt_ltak_all
    WHERE lgnum = lt_ltak_all-lgnum
      AND tanum = lt_ltak_all-tanum
      AND nltyp = '916'.

Regards,

Zaya