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: 

Creating a job with the result send to a mailing list ?

Former Member
0 Kudos
187

I’m trying to create a program that <b>launch any program with a variant via a job with the result sent to a mailing list</b>. It’s like doing a SM36 and for the recipient putting a mailing list.

For doing that I fist use the function module BP_JOB_CREATE, followed by the JOB_SUBMIT and ending with the JOB_CLOSE.

The BP_JOB_CREATE as an import structure parameter “job_cr_head_inp” of structure tbtcjob.

The structure seems to contain relevant fields for mailing list diffusion :

RECOBJTYPE = ‘RECIPIENT’

RECOBJKEY = <my mailing list id>

(RECDESCRIB)

Despite I fill the structure with what the standard is filling it with SM36 it doesn’t work. The job is launch and run but no results are sent to the mailing list.

There must be something I miss, something to check in addition or some variables to fill ..

Did you manage to do that ?

1 ACCEPTED SOLUTION

christian_wohlfahrt
Active Contributor
0 Kudos
107

Hi Bertrand!

I had a look at BP_JOB_CREATE, it looks like OSS note 773686 does some important stuff. Is this implemented in your system?

If yes, maybe debug this place.

Regards,

Christian

4 REPLIES 4

christian_wohlfahrt
Active Contributor
0 Kudos
108

Hi Bertrand!

I had a look at BP_JOB_CREATE, it looks like OSS note 773686 does some important stuff. Is this implemented in your system?

If yes, maybe debug this place.

Regards,

Christian

0 Kudos
107

just an idea: A background job which encounters an error situation and will thus appear as cancelled will not send results to the mailing list - although a spool file exists!

regards,

Clemens

0 Kudos
107

>I had a look at BP_JOB_CREATE, it looks like OSS note >773686 does some important stuff. Is this implemented in >your system?

Yes this note is implemented.

> just an idea: A background job which encounters an

> error situation and will thus appear as cancelled

> will not send results to the mailing list - although

> a spool file exists!

>

> regards,

>

> Clemens

You right, I get an error due to an ALV grid instancied with the container. I just forgot not to instanciate the container in background so it was trigering a "control framework, SAPGUI destination not available" but in warning. I correct it but it still doesn't work.

Despite I'm putting all the recipient data in "job_cr_head_inp" the system clear them at the end (should be in BP_JOB_CREATE but I still doesn't put the hand on in debug).

Thx Clemens and Christian, still doesn't work but I've advanced.

0 Kudos
107

Ok I found it !

Searching in notes about "recipient" I found note 641175 that put me on the way.

The module fonction JOB_CLOSE has an import structure RECIPIENT_OBJ which even if you don't use it delete your previous data on recipient !

So it seems to be not useful in any way to fill the recipient in BP_JOB_CREATE ... do it in JOB_CLOSE.