Application Development 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: 

export/import internal table problem during backgound job

Former Member
0 Kudos

HI ALL.,.

am using export/import stmts for passing internal table from one program to other in background job...but the internal table is empty in thezprogram .. if at all without background job .the internal table is having data...

1. call function job_open

export itab to memory id 'zzz'.

submit zprogram via jobname count jobcount and return.....( in zprogram..-> import itab from memory id 'zzz')

call function job_close ...................-> the itab is empty in zprogram

2. export itab to memory id 'zzz'.

submit zprogram and return.....( in zprogram..-> import itab from memory id 'zzz'.)......-> the itab is not empty in zprogram

any other way to export/import the internal table in the first option ie..using background job...?

would export/import to database buffer will be solve the purpose?

pls. suggest the alternatives to export/import the internal tables..

thanks in advance

suresh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

would export/import to database buffer will be solve the purpose?

Actually that's what I would suggest...use a shared buffer.

You could also probably use a perform ... in program ...using itab (obsolete however) in your Zprogram to get your internal table filled...

Kr,

Manu.

5 REPLIES 5

Former Member
0 Kudos

Hi,

would export/import to database buffer will be solve the purpose?

Actually that's what I would suggest...use a shared buffer.

You could also probably use a perform ... in program ...using itab (obsolete however) in your Zprogram to get your internal table filled...

Kr,

Manu.

0 Kudos

pls. advise how to use shared buffer r database buffer..

thanks

suresh

0 Kudos

Hi,

To export your table:


  DATA: ls_indx    TYPE indx,
        l_key_indx TYPE indx_srtfd.

  
  l_key_indx = 'YOUR_CUSTOM_KEY_TO_INDX'.
  ls_indx-aedat = sy-datum.
  ls_indx-usera = sy-uname.
  ls_indx-pgmid = sy-repid.
  EXPORT tab = lt_itab
      TO DATABASE indx(xy)
    FROM ls_indx
      ID l_key_indx.

To import it:


  l_key_indx = 'YOUR_CUSTOM_KEY_TO_INDX'.
  IMPORT tab = lt_itab
    FROM DATABASE indx(xy)
      TO ls_indx
      ID l_key_indx.

Kr,

Manu.

0 Kudos

Hi Manu.. thanks alot* .. it solved my problem.

but is it possible to refresh the database after import stmt .. so that again for export stmt it wud be free enuff to take the data..

thanks

0 Kudos

Hi,

but is it possible to refresh the database after import stmt .. so that again for export stmt it wud be free enuff to take the data

Not sure to understand you properly...

If you want to clear the data stored in INDX, just clear your itab and export it again after your import statement...


IMPORT...
CLEAR lt_itab[].
EXPORT...

Kr,

Manu