Skip to Content
-1

Spool not generating for BDC call tansaction

Apr 14, 2017 at 12:28 PM

198

avatar image

Hi Experts ,

I want to execute BDC call transaction in background , and look into my generated messages(BDCMSGCOLL) .

But if I execute in background it is not generating spool .

I tried Using GET PARAMETERS FM , but it is generating spool in SP01 with my bdc messages , but when I execute the same program in background , it is not attaching the spool to my JOB in SM37 (But creating Spool in SP01 with my username) .

Please can you suggest me how do I make this spool attach in SM37 when I run the program in background mode .

Thanks ,

Priya.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Apr 16, 2017 at 08:47 AM
2

It's "normal", I mean this is the way it should work according to SAP note 3079 - List processing within a job. The BDC is not considered to belong to the job (there's no notion of parent-child relationship between jobs (except in "job interception" but that's another story)). The only solution would be to wait for the end of the BDC, find out which spool has been generated (by combining different criteria like the date, time, spool name, etc.), read the spool and create a new one from the jobs's main program (the one which starts the BDC) - or to reassign the spool number to your job (by direct database update, that's "evil" according to the SAP "change of the standard" concept). You might also simply let it as it is, and use SP01 to display the spool.

Show 7 Share
10 |10000 characters needed characters left characters exceeded

Hi Sandra,

Thanks for your reply.

I just uploading my data from my input file and upload to tcode, using Bdc call transaction.

After that am lopping messages and writing on my output, like so and so material created etc..

All are printing on my screen.

Now my client wanted to execute this in background and when he gets time he wants to see spool in job, all the messages.

Now I tried to generate a spool manually with above FM in screen shot and print my messages on line number 438.

Now when I execute my program in foreground mode, it's generating spool and displayed all contents in Sp01.

Now when I tried to execute in background mode like execute program in background mode, it's generating job in SM37 and it's getting finished, but no spool generated, though still spool is generating in SP01.

I want to know how would I achieve this.

To attach my spool number to job.

Is this possible?

Thanks and kind reards,

Priya.

0

The answer to your question is in my previous answer : "The only solution would be to wait for the end of the BDC, find out which spool has been generated (by combining different criteria like the date, time, spool name, etc.), read the spool and create a new one from the jobs's main program (the one which starts the BDC) - or to reassign the spool number to your job (by direct database update, that's "evil" according to the SAP "change of the standard" concept)."

0

Sandra,

Can we make the program store the info in SLG1 and then let the user refer SLG1 instead of spool or background job log ?

K.Kiran.

0

I don't get the context. So, I can just give a generic answer: a custom program may be modified to store any message in SLG1 (SAP provides the released function modules BAL_*).

0

Hi Sandra,

Am trying for bdc session method.

It is generating spool, when executed in background via job.

0

That's the same issue for sure. The behavior explained in SAP note 3079 still applies. You cannot achieve what you want in a simple way. Is there something you didn't understand in note 3079, or in what I answered? Tell me what it is so that I can help you.

1

I have to admire Sandra's patience in explaining this concept. :)

But I'm starting to feel there are some holes in this story... We have an ABAP report that runs in a background job and uses BDC to call a transaction to make some changes. Naturally, the output generated by the called transaction does not link to the job in SM37. But we have no problem with generating both job log and spool with the error messages from the ABAP report itself.

Are you sure you're using WRITE command and not MESSAGE in your ABAP report? Because MESSAGE goes into the job log and WRITE goes into the spool.

1
John Vo Apr 15, 2017 at 05:24 AM
0

Hi priya

Could you display content of spool in SP01 in case the job missing spool ( SM37 ) ?.

Check whether any ROLLBACK WORK in you program.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello John,

Thanks for your reply.

SP01 simply has contents of my Bdc msgccoll messages, which I was looping and writing on screen using format_message FM.

0