‎2015 Dec 18 9:25 AM
Hi All,
I am facing one issue regarding import / export.
Existing code is :
export it_abcd from it_abcd_temp
to database index(ab) id job_name.
or
export it_abcd to memory id 'CRM08'.
Value coming upto this level to it_abcd.
But after
submit zefgh via job job_name number job_number with .... & return.
if sy-subrc = 0.
call function 'job_close'.
And
import it_abcd to it_abcd "1st line of zefgh
from database indx(ab) id p_name.
or
import it_abcd from memory id 'CRM08'.
Value is not coming after importing to it_abcd.
Any Input on this?
Thanks.
‎2015 Dec 18 10:37 AM
ABAP memory(EX-/IMPORT to MEMORY-ID) won't help because the BG job is run in a different process.
DB-cluster(INDX-like tables) should definitely work. The key here is that the IDs should be same. In your example i see that you use the IDs JOB_NAME & P_NAME. Are they same?
PS - After the export check in INDX table if the record is created.
‎2015 Dec 18 10:25 AM
Hi Kumar,
Check the status of your background job, you will get the value only if the scheduled job is in Active or finished status.
For that please check the scheduling parameters of your FM JOB_CLOSE.
Regards
Kishan Shah
‎2015 Dec 18 10:28 AM
Hi,
Background job is finished in SM37 & I debug using JDBG also,
there I am getting no value after import.
Thanks.
‎2015 Dec 18 10:37 AM
ABAP memory(EX-/IMPORT to MEMORY-ID) won't help because the BG job is run in a different process.
DB-cluster(INDX-like tables) should definitely work. The key here is that the IDs should be same. In your example i see that you use the IDs JOB_NAME & P_NAME. Are they same?
PS - After the export check in INDX table if the record is created.
‎2015 Dec 18 10:54 AM
Hi Suhas,
Both P_NAME & JOB_Name is tbtcjob-jobname.
I checked in indx in se11 where relid = 'AB' no record there for memory id or export to database index.
Thanks.
‎2015 Dec 18 11:03 AM
So now you know why the EX-/IMPORT with dataclusters doesn't work. Now you need to troubleshoot your EXPORT code!
IMO the ABAP documentation is fairly clear about the DOs/DONTs regarding memory handling.
‎2015 Dec 18 12:48 PM
Just to clarify:
When using SUBMIT VIA JOB, a three step process takes place:
Of course, access to the database is possible everywhere and EXPORT/IMPORT TO DATABASE must definitely work, if you do it right ...
‎2015 Dec 18 1:18 PM
Wow! Thanks for the insight. Read the online docu again & everything is clear now.
For other additions of SUBMIT i understand that the internal session is replaced by the called program. Does this mean the EX-/IMPORT TO MEMORY should work?
‎2015 Dec 18 1:30 PM
Admittetly, I adjusted the next release of the documentation for VIA JOB a little bit by dividing the paragraph into the three steps just now ...
Without AND RETURN the internal session is replaced. With AND RETURN a new internal session is created. In both cases, you stay in the current call chain and you have access to the same ABAP Memory (EXPORT|IMPORT TO|FROM MEMORY).