How to Get Spool ID after PO release. (To send PDF for ext E-mail)

Hi Experts,
I am new to Email sending from SAP.
I am facing a big problem from many days. I am in a new support project.
I have a issue that when ever a PO is released from ME23N or ME28 it should send a mail to vendor.
This is working fine in Development including delivery report or failed report back to approver...
I dont know where is PRD and who is doing that,
But my support manager says that only some PO's are sent to vendors not all...
everytime they approve only some emails sent to vendors...!
But every PO is same and for same vendor's...
Even failure & delivery messages are missing for (sent failed email's)
But after all I observed only one thing that we have a select statement....
  DATA:  GS_RESULT TYPE ITCPP.  
  DATA : L_DATE(9).
  DATA : BEGIN OF LT_TSP01 OCCURS 0,
          RQIDENT LIKE TSP01-RQIDENT,
          RQCRETIME  LIKE TSP01-RQCRETIME,
          DATE(8),
          TIME(8) TYPE N,
          END OF LT_TSP01.
  SELECT  RQIDENT RQCRETIME  FROM TSP01 INTO CORRESPONDING FIELDS OF
                       TABLE  LT_TSP01  WHERE RQCRETIME LIKE L_DATE
                                        AND   RQIDENT EQ GS_RESULT-TDSPOOLID.
  IF SY-SUBRC =  0.
(All Email sending code)(including delivery & failure delivery)
Endif.
So I suspect it is not picking up the Spool request from this Table TSP01 or may be not updated to this table.
I have searched in SCN, I have seen may E-mail Codings
But every one says to get Spool- ID & Convert to PDF,,,
My Question is How to get Spool ID correctly and tell me how it is updated. when a PO released by ME23N or ME28.
please any one clear my doubt as I am completely helpless here.
Thanks in advance,
Dunlop.

Hi,
  Is it a SMart form.....
If it is a smartform, then Smartfom interface itself has a spool id parameter....
you can directly het that from this parameter...
    CALL FUNCTION "FMa Name'
      EXPORTING
        control_parameters = wsl_control
        output_options     = wsl_outpt
        user_settings      = ''
        wtg_itemdetails    = tl_itemdet
         wtg_vttp              = l_vttp
      IMPORTING
        job_output_info    = sl_spooldet
      EXCEPTIONS
        formatting_error   = 1
        internal_error     = 2
        send_error         = 3
        user_canceled      = 4
        OTHERS             = 5.
    IF sy-subrc <> 0.
    ENDIF.
The inporting parameter sl_spolldet will have the Spool id.
and you fetch by, using the below mentioned way..........
    READ TABLE wsl_spooldet-spoolids INTO wsl_wa_spool INDEX 1.
      IF sy-subrc = 0.
          Convert it into PDF using 'CONVERT_OTFSPOOLJOB_2_PDF'
          then attach it and send a mail.....with all properties set such as Delivery report....
      endif.
If you have any issues, please let me know........
Thanks & Regards,
Vamsi

Similar Messages

  • How to get Spool Number after submtting the program and return

    Hi All,
    Could you please assist me on this issue. I have ABAP program which will create a spool number and this spool number is generated by submitting the same report. Now when try to retrive the spool number from sy-spono it is displaying as 000000 but it suppose to be the spool which is created during submit program. COuld you please assist me on this issue. I have added the part of code for your reference,
    DATA: l_params TYPE pri_params,
    l_valid TYPE string,
    w_spool_nr like sy-spono,
    p_m_werks like marc-werks.
    export p_werks to memory id 'P_WERKS'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
    out_parameters = l_params
    valid = l_valid
    IF sy-subrc <> 0.
    ENDIF.
    import p_werks from memory id 'P_WERKS'.
    p_m_werks = p_werks.
    SUBMIT zmmlist01 with p_werks eq p_m_werks
    to SAP-SPOOL
    spool parameters l_params
    without spool dynpro and return.
    write: sy-SPOno.
    Thanks & Regards,
    Nagaraj Kalbavi

    Hi,
    You can use the code snippet as below :
    SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
    FROM TSP01
    WHERE RQCLIENT = SY-MANDT AND
    RQOWNER = SY-UNAME.
    Also you can use the FM RSPO_FIND_SPOOL_REQUESTS' and pass the relevant parameters to this FM. This should get you the desired results.
    Hope this would be of some help!!
    Regards,
    Lalit Kabra

  • How to get spool along with e-mail or FAX

    Hi,
    I have a requirement where i have to produce a spool even i go for e-mail or FAX option when the script is triggered.
    I am using a standard program where it is coded to have either of the option. i.e. either we have to go for a printer or e-mail or FAX.
    Could any one suggest me how to get spool along with e-mail or FAX option.
    Thanks in advance.

    Hi,
    check this:-[http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm]
    hope u'll get some idea.
    Regards,
    Sneha.

  • Anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999..

    anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999.. many thanks :-)

    They show in the camera roll, just not your computer?
    Have you checked every folder that is in the DCIM folder?

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • HT2931 I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    Hello Mattxy2,
    Thank you for the question. It sounds like you would like to add some Apple Loops to your project.  I recommend reviewing the following sections in Garageband Help:
    GarageBand Help - Search for Apple Loops
    http://help.apple.com/garageband/mac/10.0/#gbnd3002ab64
    GarageBand Help - Add Apple Loops to your projects
    http://help.apple.com/garageband/mac/10.0/#gbndc1d3db81
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How to get the pricing hierarchy based on the delivery date for sales order

    Hi,
    How to get the pricing hierarchy based on the delivery date for sales order other than system date.
    My requirement is to get the Pricing hierarchy based on the delivery date other than system date.
    Waiting for kind response.
    Best Regards,
    BDP

    HI Sai,
    please refer teh document already how to write FM based extration on generic extractors.
    and here  the logic to find the latest records values:-
    -> get the data in an internal table
    ->Sort the internal table data based from date descending
    -> Using READ statement , we can read the first record of the table which is nothign but your latest record.
    Regards.
    Sakthi

  • I bought two films on my ipod tough 4g ( normally comes up on my ipad if i have bought something on my ipod) but i dont know how to get the two films on my ipad without paying for them.

    I bought two films on my ipod tough 4g ( normally comes up on my ipad if i have bought something on my ipod) but i dont know how to get the two films on my ipad without paying for them.

    Movies work differant than TV shows, music and apps. With movies, to get them from one device such as an iPod Touch to an iPad, you would need to connect the Touch to your computer first and in iTunes under the file menu, hit transfer purchases. Next connect the iPad and you can sync the movie to the iPad.
    While the iPad is connected to the computer, in iTunes, click on the iPad in the left pane and when the screen loads, click movies and from there, you can select the movie that you want to sync.

  • How can I automatically email the completed form as a pdf for signing to the respondent?

    how can I automatically email the completed form as a pdf for signing to the respondent?

    Have your husband text the word "stop" to 48369. This should take his number out of the iMessage system.
    Go into your settings under messaging and make sure the box to send as an SMS if iMessage is unavailable is checked.
    Hopefully this will get your messages sending/receiving to each other.

  • How to get inDesign CC after you installed the CC 2014 version?

    So here is the thing, after the release of CC 2014, of course i've downloaded it and then I deleted all the CC versions from my computer. The thing is that an external software we use for branding material management does not work with inDesign CC 2014 documents so I need the CC version back. The thing is that on the creative cloud there are no more the CC Versions just the CC 2014, any ideas on how to get the previous version

    Hi DobsTotev,
    Please refer the following screenshot in order to how to download/install previous version.
    1. Click on Filters & Versions drop down
    2. Click the "Install" drop down button for desire application and select CC with initial base version.
    Hope this helps.
    Thanks and Regards,
    Sumit Singh

  • Multi Mapping : How to get Message count after splitting

    Hi all,
    I am following below blog.
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Can any body please tell me how to get the count of messages generated after splitting in the message mapping.. I have created the message data type but not aware what is needed to be done.
    Thanks and best regards,
    Kulwant Singh

    Multi mappings r done in order to split the messages to the number of messages required by the user. So for 1:N mapping, the details about "N" is based on ur requirement. So its not like - when u split, any number of message could get created. The count would be dependent on u.
    Regards,
    Prateek

  • How to extract pick details after pick release with OPM Modules

    Hi, Can someone show me how to extract pick details (for third party warehouse) after pick release released in OPM modules?
    I remembered that I can access interface tables MTL_TXN_REQUEST_HEADER and MTL_TXN_REQUEST_LINES to extract pick detail. But it seems that in OPM modules, it does not use these two tables. Any help are greatly appreciated.
    Calvin

    Hi,
    This problem Could happen when you referesh quality or test system.
    Your delta setup for the related master and transaction data needs to be reinit.
    What happens is when you init. the delta and subsequent delta is all maintained in your source system
    please check Notes 852443,424848,834229
    Hope this helps
    Thanks
    Teja
    Message was edited by:
            Teja badugu

  • How to Get HP Drivers After (DIY) Installing Windows?

    Series: How to Re-Install Windows when you don't have the Recovery Discs
    Intro: What is an ISO? Why is it used? 
    Step 1 - Get the ISO - ISO Download Links
    Step 2 - Burn the ISO to a DVD or USB  
    Step 3 - What to do with the ISO DVD/USB? Change the Boot Order 
    Step 4 - What to do After Windows is Installed? How to Get HP Drivers?   
    Step 4 - What to do After Windows is Installed? How to get HP Driver?
    Winodws is Installed, Now What?
    Once the installation is complete, you'll need to go to your HP Driver Page and download all of your drivers. Your wireless function may not work automatically with a fresh install. You may have to plug an Ethernet cable into the computer and into your router to connect to the internet initially, until you have downloaded your wireless driver. 
    The best way to use the HP Driver Page, is by putting in your product number ('P/N' found on the HP label on the bottom of the computer) and click Go, rather than the 'Detect my product - Find Now' option. Without an HP Recovery Disc version of Windows, the 'Detect my product' option is not likely to work properly.
    Another important note: If you had to go all the way into BIOS and change the Boot Order to the DVD drive (or USB), you'll have to go back into BIOS at your convenience and change the Boot Order back to booting from the internal Hard Drive first. If you used the F9 Boot Order Menu, it only changes the Boot Order temporarily, for that one power on iteration. 
    If you have any questions, create a new post (How to Create a New Post - Video), copy and paste it's link into a private message to me, and I will respond on your thread

    Note down all the file names of the following queries first:
    SELECT NAME FROM V$DATAFILE;
    SELECT NAME FROM V$CONTROLFILE
    SELECT NAME FROM V$TEMPFILE
    SELECT VALUE FROM V$PARAMETER WHERE NAME = 'spfile'
    If the last query doesn't show any file then copy $ORACLE_HOME/dbs/init<SID>.ora file.
    After making the list in sqlplus issue:
    SHUTDOWN IMMEDIATE
    And now you can copy all of those files to some other location. Make sure you install same version of OS and Oracle to restore these files. It would be easy for you if you keep the same directory structure after reinstall and place all those files as they were earlier.
    Daljit Singh

  • How to get an invoice after purchasing Icloud space?

    Hi there,
    After purchasing Icloud space I received an email of confirmation but no invoice.
    I would like to get an invoice.
    How to get one.
    Thanks

    Call the Apple online store for your country (1-800-MY-APPLE in the U.S. and Canada).

  • How to get iphoto back after upgrading to 10.6.8

    how do i get ophoto back after uprgading to 10.6.8

    It should be part of the iLife set that is on one of the installer discs that came with the computer.

Maybe you are looking for

  • Iphone "drawing too much power"

    Had my macbook for 7 months and my iPhone for 4 months. Everything has worked OK with my macbook and Iphone 3G until now. (Apart from the speed issue with iOS 4.0). Then yesterday the phone could no longer connect to Itunes and I got the following er

  • How do I retrieve data from Macbook that will not turn on?

    My 17" laptop stopped turning on. I can hear it booting up with its bong but the screen stays black. If I press the keys, I get a weird plink plink sound. I updated to Snow Leopard about a year ago. MacBook Pro, Mac OS X (10.6.8)

  • Not Reading 400 or dual channel

    I have been one of the lucky/unlucky ones to successfully flash to 1.4...however...still does not seem to be reading 400. Have manually adjusted settings to 2-2-2-5-8 and 2.7V and still no 400 (only 333)...With 1.2 would read 333 Dual Memory Channel

  • Question about BPM Merge

    I’m working on SAP XI 3.0 and I tried to make a Merge with a Business Process. I’m gathering many incoming messages with the same schema in a container in BP and after some time interval without new message I’m merging these messages in one with Mult

  • Migrate User Data on one iMac

    I have my iMac (mavericks) set up with two users.  I no longer need the separation and want to combine data into one, then delete the unneeded user.  How can I do this?