11-04-2011 5:02 PM
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
11-04-2011 5:11 PM
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.
11-04-2011 5:11 PM
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.
11-05-2011 4:31 AM
pls. advise how to use shared buffer r database buffer..
thanks
suresh
11-05-2011 9:17 AM
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.
11-05-2011 5:39 PM
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
11-05-2011 5:50 PM
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