Skip to Content
0
Former Member
Feb 19, 2009 at 09:45 AM

EXPORT to DATABASE

10045 Views

Hi,

I would like to understand a little more in detail as to how the table INDX works when using the EXPORT TO DATABASE. We have a requirement wherein we need to process multiple little bundles of contract parallely. We are doing this by passing the internal table of contracts via job_submit for background processing.

LOOP at it_contracts.

PERFORM job_open.

wa_indx-SRTFD = ''.

wa_indx-aedat = sy-datum.

wa_indx-usera = sy-uname.

wa_indx-pgmid = sy-repid.

EXPORT tab = itab

TO DATABASE indx(RS)

FROM wa_indx

CLIENT cl

ID 'ZTEST_SEL'.

PERFORM job_submit.

ENDLOOP.

The concern is because we need to use the EXPORT TO DATABASE in a loop. As far as I understand, there is only one entry which is created in the table INDX which is overwritten when processing in a loop.

When I run my test program with multiple contract bundles, I see that 4 bundles are processed, whereas the 5th bundle onwards, the previous clusters are re-processed.

Can anybody see a way out ? Any ideas / hints / suggestions are welcome..

Thank you,

Rashmi