Skip to Content
0

ABAP background job SUBMIT with EXPORTING LIST TO MEMORY problem

Nov 04, 2016 at 12:34 PM

523

avatar image

Hi friends,

I could not find a solution for the problem so i wanted to ask about it.

I have a z program that works in the foreground (when executed manually) but not as a background job.

The problem is, one of the data fields im retrieving with submitting another standard program and with EXPORTING LIST TO MEMORY parameter, as below :

SUBMIT htrcedt0 WITH SELECTION-TABLE t_sel EXPORTING LIST TO MEMORY AND RETURN.

Normally, it can retrieve the list from memory with FM LIST_FROM_MEMORY when executed manually. BUT when the same program is set as a background job, FM LIST_FROM_MEMORY returns SY-SUBRC = 1.

I hit a wall with this one, any help will be much appreciated.

Thanks in advance.

10 |10000 characters needed characters left characters exceeded

I don't understand "one of the data fields im retrieving with submitting another standard program". Do you mean you have:

  • Your Z program: SUBMIT PROG1 EXPORTING LIST TO MEMORY, followed by call to FM LIST_FROM_MEMORY
  • PROG1: SUBMIT PROG2
  • PROG2: it prints a list

Do you start your Z program in background, or is it your Z program which runs PROG1 as a job in background?

1

Well, the program sends an email including an alv-like table. Two of the columns get their data from submitting this other standard program.

When i execute the tcode manually, email is correctly filled with data. When it is set as a background job, email is still sent but those two columns are empty. When debugged, the FM LIST_FROM_MEMORY returns sy-subrc 1, thats why the columns are empty.

But still cant figure out why it returns subrc 1 when run in background and why it doesnt when run manually.

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Jānis B Nov 07, 2016 at 06:00 AM
1

Does htrcedt0 produce spool when "Z programm" is executed in background?

Because, if 'htrcedt0' is anything like HBRCEDT0, you seem to be out of luck with trying to import its list in background:

You could perhaps get the Spool somehow, but all these get my data via "other application's" list or spool output seem like suspect solutions...

cheers
Jānis


hbrcedt0.png (114.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Nov 04, 2016 at 01:47 PM
3

Hello,

I cannot reproduce this behavior.

If I submit one program with EXPORTING LIST TO MEMORY in another program that is started in background I can retrieve the list of the submitted program in the submitting program.

Horst

Share
10 |10000 characters needed characters left characters exceeded
ismail ümit çiçek Nov 07, 2016 at 04:21 AM
0

Well, the program sends an email including an alv-like table. Two of the columns get their data from submitting this other standard program.

When i execute the tcode manually, email is correctly filled with data. When it is set as a background job, email is still sent but those two columns are empty. When debugged, the FM LIST_FROM_MEMORY returns sy-subrc 1, thats why the columns are empty.

But still cant figure out why it returns subrc 1 when run in background and why it doesnt when run manually.

Share
10 |10000 characters needed characters left characters exceeded
ismail ümit çiçek Nov 07, 2016 at 07:01 AM
0

Wow, that is so spot on. I found around ~4000 files waiting in the spool list. Although the spool output does not contain the required data.

Even if i captured the output sent to spool, it wont be of any use.

All this time i have been searching for the problem on the wrong place.

Thanks everyone, especially you Janis. I guess i have to get those data by something else.

Share
10 |10000 characters needed characters left characters exceeded