Mailing Spool Details of Background job

iphone-gmail-inbox

Check out how to mail spool for a background job  to a mail group without ABAP code.

Author : Ajay

Author's Website | Articles from Ajay

Ajay is a Functional Consultant in Supply Chain Management. He is a SAP Certified SCM APO consultant and ABAP Developer. He is also involved in SAP implementations, Migration and Support activities as a Consultant.

Facebook

INTRODUCTION:

Lately I came across a requirement for sending spool details of a report through mail which gets executed in a background job.

On the first glance it looked like a cakewalk as it can be achieved with a couple of function modules in the program.

But now for the following reasons I was wondering why modifying the program for such task is not advisable.

1. Where to maintain the user id’s?  It can’t be hard coded in program.

2. What if multiple user want the mail? How frequent this list will change?

So I started looking for other options.

There is an option of spool list recipient in SM36 while defining a background job where we can define the user id of the user who wish to receive the spool for the background job.


1-sm36

So any user who’s id is mentioned in the spool list recipient of the job would receive a mail in SAPoffice: Inbox(Tcode-So01) / Business workplace ( Tcode-SBWP)

2-sm36

Now once you schedule the job and the job is finished you will receive a message in your sap office inbox.

3-sm36

Now most of the users don’t check their SAP Office inbox often and also I need a group of people to be mailed for a single background job.

Now we will see how we can create a mail distribution list.

T-code : So23. You can also create it from Business workplace (T-code: SBWP).

Fill in all the required attributes.


4--So23

In the distribution list content you can specify the external mail addresses which you want to include in the mailing group.


5-so23

Note : Please make sure that your SMTP server is configured.

Also Check the following setting in SAPconnect Administration :

1. Go to transaction SCOT.( SAPconnect Administration).

2. Click on the SMTP node inside INT node. -> Go to maintain Node.

3.  Click On the Set Button for Internet Supported address types.

4. Ensure that in the address area either your mailid or wildcard * is maintained.

5. Here you can also change the Output format of SAP document. By default for ABAP List the attachment would be in Html format.


6-so23

Now every time a Spool is created  for the job it will be immediately mailed to  persons maintained the Distribution list.




Related posts

coded by nessus

Like this post? Share it!

  • Tweet
  • Facebook
  • iphone-gmail-inbox

    Check out how to mail spool for a background job  to a mail group without ABAP code.

    ">Diggit
  • iphone-gmail-inbox

    Check out how to mail spool for a background job  to a mail group without ABAP code.

    ">Delicious
  • Diggit
  • Diggit
  • Diggit
  • iphone-gmail-inbox

    Check out how to mail spool for a background job  to a mail group without ABAP code.

    ">Diggit
  • Diggit

Related Posts


User Comments


  1. Dess
    January 9, 2012

    Awesome! I’m currently brainstorming on this and thank god I found this post. I don’t have full access in Tcode - So23 but I can access SBWP. Thank you again for this very informative post! Keep posting!

    Reply


  2. Dess
    January 9, 2012

    Awesome! I’m currently brainstorming on this and thank god I found this post. I don’t have full access in Tcode - So23 but I can access SBWP. Thank you again for this very informative post! Keep posting!

    Reply


  3. John V.
    January 13, 2012

    I have problem vith attachment. Aatt. is in format VIA, but i need format txt.
    Thanks for information.

    Reply


    • Ajay
      January 14, 2012

      Hi John,
      You have an option in tcode SCOT for “Output format of SAP Documents” where you can define it as txt.
      Please check the last screen shot of the article.

      Thanks
      Ajay

      Reply


  4. Reshma
    January 24, 2012

    Hi,

    I want to change the receipent in the spool list.
    It’s a single user.
    Please help me with how I can change the receipent in the existing scheduled job?

    Regards,
    Reshma

    Reply


    • Ajay
      January 24, 2012

      Hi Reshma,
      You can very well do that as well. Please make sure that you can only modify the scheduled jobs.
      1. Select your job in SM37 and goto Job->Change.
      2. Click on Spool List recipients and fill in the recipient name with address type. i.e external mail address/ internal mail address etc.

      Make sure that you have all your SMTP settings intact.
      Let me know incase you are stuck somewhere.

      Cheers
      Ajay
      ajay@sapignite.com

      Reply


      • pratibha
        February 27, 2012

        Hi ajay,
         I found ur article very useful. In my case i have to attach  alv report output in excel format to email,this excel contains mnay columns, in sap inbox im getting mail,but format is not proper.please suggest me what i have to do to get, my mail attachment in proper excel format.

        Reply


        • admin
          March 1, 2012

          Dear Pratibha,
          The spool which is generated by the program is mailed. If you want to alter the format then either you need change the program or write a custom code for it.

          Thanks
          Ajay

          Reply


  5. Gurinder Singh
    April 20, 2012

    hi Ajay,
    Your Post is nice and very useful for me, but i don’t know how to set spool, when I run reports in the background as you told, after getting the status as complete, I have to manually SPOOL it so that it can mailed to my Workplace.

    Kindly tell me what Transaction code or authorisation required for this.

    Reply


    • Ajay
      April 23, 2012

      Hi Gurinder,
      I am not bit clear with your question. You can’t generate spool manually it gets generated automatically in background.
      You can check them with Tcode SP01.
      Request you to elaborate a little on where exactly you are stuck

      Thanks
      Ajay

      Reply


  6. Praveen Kumar Sharma
    May 1, 2012

    Hi Ajay,
    I think you may be able to help me. when I use ME9F t-code to print POs in PDF format, it goes to my SAP inbox but I don’t have access to my inbox(SBWP). I remember once I had entered into SAP inbox(accidentally), but at that time I didn’t know that I didn’t have access. I want it now. Is there any other way of going to SAP inbox?
    Thanks in advance.
    Praveen

    Reply


    • Ajay
      May 7, 2012

      Hi Praveen,
      You can use tcode : so01 which is for SAP Inbox. If you don’t have access to this then go to se37 and run fm : c160_transaction_call and execute to directly enter tcode. This helps to skip the authority check maitained at tcode level.
      There are thousands of way of doing it.
      Let me know if it works for you..

      Cheers
      Ajay

      Reply


  7. Francis Talam
    May 9, 2012

    Hi Ajay,

    I have a background job that send spool list to email recipients but they are not receiving all the spool lists since these job produce 2 spool lists. They only receive the last spool list. The first spool list is not mailed. Do you know how  to send all the spool lists?

    Thanks,
     Francis

    Reply

Leave a Reply

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:
  Twitter Followers Email Updates