cancel
Showing results for 
Search instead for 
Did you mean: 

Email spool record!

0 Kudos

Hi, i am working on a requirement to send spool by email to recipients. I have created the job but email is getting sent without spool attachment. Below is the script i used.

<html>

<body>

<p>This is an automatic notification to inform you that certain client invoices from your office that did not properly transfer to the FM Module/General Ledger.

Please see the attached file for the invoice listing. </p>

</p>

</body>

</html>

[Attachments]

# Attach the Error Log

error.txt=Step 1, Job 1:stderr.log

[Headers]

# set the subject

subject= VFX3 output for Company Code XXX as on ${RunEnd}

[Body]

# set the content-type to be HTML

Content-Type=text/html; charset=UTF-8

This script i have created as a job and when ever the SAP job completes this email job gets triggered through event handling which is also working good and sending notification but missing attachment.

I am having two problems in this, one is sending the spool as attachment and another one is in the subject i want to put the job run time which i used with runend date parameter which is also not working. 

I also tried using http://scn.sap.com/ but that one also is not working.

Please suggest and if possible plz correct the script. Happy to share any more information if needed.

Thank you,

Arun

Accepted Solutions (1)

Accepted Solutions (1)

nanda_kumar21
Active Contributor
0 Kudos

I recommend you go through the admin guide for complete understanding.

Here is what i found:

  1. If you are linking the SAP job and mail job through events, then Step 1, Job 1 is useless. It has to be a part of job chain - Step 1 Job 1 is SAP job and Step 2, Job 1 is email job.
    or
    if you want to go with the events, then change obtain the job id in the parameter of the email job, say, RELATIVE_JOB and set the default expression to =waitEvents.name.raiserJobId
    and
    [Attachments]
    @{name}-@{index}.txt=RELATIVE_JOB😘
  2. There is no mention of spool file in your attachments section.so if you are going with Job chain option, then try this:
    [Attachments]
    @{name}-@{index}.txt=Step 1, Job 1:*
  3. You may to write some redwood script to calculate the runtime information as a post running action and then set the value of of an out parameter on the SAP job.
    Then use that parameter in your email job.

thanks

Nanda

0 Kudos

Thank you Nanda for your replies, yes i have even used the chain by having the first step asSAP job then i used default system mail send with

the below values, i am getting email but there is no spool attachment.

Relative Job

Step 1, Job 1

Job Filestep1_spool1.txt
nanda_kumar21
Active Contributor
0 Kudos

for Job file, try providing * as input.

thanks

Nanda

0 Kudos

Hi Nanda,

This worked but we want to send only spool to the end users as they dont need log and spool id's. Is that possible?

Thank you,

Arun

nanda_kumar21
Active Contributor
0 Kudos

try *spool*

thanks

Nanda

0 Kudos

Thanks a lot Nanda, it worked.

0 Kudos

Hi Nanda,

Thanks for your all replies, i have come up another issue with this job setup. Actually this job is sending email even if there is no attachment that means even if the step-1 did not generate any spool, it still send email.

Is there any way we can control this job from sending email if there is no spool generated by step 1 SAP job.

Thank you,

Arun

0 Kudos

This is resolved.

Thank you,

Arun

nanda_kumar21
Active Contributor
0 Kudos

I'm curious, can you please share how did you fix it?

thanks

Nanda

Answers (1)

Answers (1)

gmblom
Active Contributor
0 Kudos

Hello,

You are attaching only stderr.log, not the spool file, that is called something like step1/spool1.log

Regards Gerben