Spool Number back to the program

HI all,
I am handling with smart forms. The problem is that I have to write a code which will bring the spool number for each document back to program when executed with user id "Batch_Admin".  Can anyone give an idea for the same.  There is any function module available for the same.  Please give some suggestions.
Thanks in advance.
John

Hi John,
Welcome to SDN.
You can use this function module RSPO_FIND_SPOOL_REQUESTS to find all spool numbers which belong to user ID 'BATCH_ADMIN'.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.

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

  • Query on retrieving data back to the program from ALV List

    Hi Group,
    I have a requirement to send the details of the selected data as an ALV list to the user.
    Then, the user selects either 1 or 2 or all or none back to the program from the ALV.
    Thing is that,
    1) when the user selects ( Icon ) to choose all the fields, they were not getting checked and in turn, I was not been able to read the records as checked in the program ( this is for All selection records ).
    2) And also, I am not able to get the records checked ( incase of the user selects all fields ).
    In short, I should be able to read the records which were checked and process only that records.
    please let me know if you have any queries on the same.
    Thank you very much in advance for the help.
    Regards,
    Vishnu.

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                           
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
    fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = gd_repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_ekko
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "user presses SAVE
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
          text
         -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
          text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
          text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    here i have created one button(DET) in toolbar along with all the buttons of ALV..
    when i click on this i am getting detail list....
    reward if usefull....

  • I am using a program that opens a document in adobe and I need to save it back in the program.  I get this message: this document is trying to connet to: fill://index.cfm?event=vendorsonly.submiteventform.  Help

    I am using a program that opens a document in adobe and I need to save it back in the program.  I get this message: this document is trying to connet to: fill://index.cfm?event=vendorsonly.submiteventform.  Help

    Have you contacted the people who make the program? It sounds like something special from that program.

  • Where to find my Serial Number for Photoshop CS6 Extended? The program has been on my computer for at least a year now and for some reason it is now requiring my serial number to run the program. Please help!

    Where to find my Serial Number for Photoshop CS6 Extended? The program has been on my computer for at least a year now and for some reason it is now requiring my serial number to run the program. Please help!

    Log in into your Adobe account and go to "My Products".  You'll find a list of all the products you've ever registered with Adobe.

  • After I did a change in the drumsection on a song the program just "went down". It's impossible to go back tinto the program. It just tryn to open the song, nothing happend and then out again... What can I do?

    After I did a change in the drumsection on a song the program just "went down". It's impossible to go back tinto the program. It just tryn to open the song, nothing happend and then out again... What can I do?

    see if anything in this troubleshooting article helps: http://support.apple.com/kb/HT2801?viewlocale=en_US

  • How do I pass an error status from my java code back to the Program Job Ser

    How do I pass an error status from my java code back to the Program Job Server?
    I have a jar program object that reports a scheduled status of "Success" even if the java code errors out.

    Exceptions thrown from the program object are ignored by the program job server.
    You need to configure the Program Object, then stream out a special string sequence to the stdout of the Program Object, to set the scheduled instance status to Failed.
    Look up SAP KBase  1201804 - How to programmatically set the status of a Program object to "Failed"
    Sincerely,
    Ted Ueda

  • I would like to disable or remove the private browsing feature permanently, and set up a password to disallow it to be added back onto the program

    This feature was not on the older versions of firefox, if it is not possible to remove it - is it possible to revert back to the older versions without disrupting browsing capabilities? This is a severe problem that needs to be resolved by your program, or I will not be able to use your software going forward!! Please help! Thank you!

    It has been a part of Firefox for over two years now, as of Firefox 3.5.
    Try this new add-on to disable Private Browsing, prevent browsing history from being deleted, and the hide the presence of this add-on from being seen by users except in the SafeMode. <br />
    https://addons.mozilla.org/en-US/firefox/addon/disable-private-browsing/

  • Where can I download photoshop cs 8.0  I have the serial number from the case but I can't find the Cd that came with it.  I can't find where to download the software for it so I can just enter the serial number and download the program.

    I am trying to find at least the trial version so that I can enter the serial number that I have on the back of the case and activate the full version so I can get some work I need to get done finished.  My laptop was thrown away after a flood in my basement and I believe the cd was still in it.  I don't recall ever taking it out.

    Forget your existing disc and serial number. They won't work.
    Download the new non-activation version of CS2 (applies to CS owners as well) from
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Install then enter the new serial number provided at that link.

  • My Centro is Getting Replaced? How Do I Back Up the Programs on it?

    Heres the deal. My phone has a cracked screen and Verizon is going to replace it. By doing so I will lose all my programs when I get a new phone. Now what do I do? Is there anyway I can back up all my programs to a memory card and then just pop my memory card in the new phone or am I stuck scouring the net to redownload all my programs and then re-HotSync them all back to the phone? Thanks in advance.
    Also, I just found a program called UniCMD I believe. This claims it can backup everything to my memory card. Would this be a valid program to use to do this? Right now I am backing everything up using it, but I am kinda computer illiterate (well at least cell phone illiterate) so is this the correct type of backup I want? The program can be found here. http://mytreo.net/downloads/unicmd,914.html 
    Post relates to: Centro (Verizon)
    Message Edited by dpp13 on 09-16-2008 07:48 PM

    Yep, go with NVBackup as HardBeatZ suggests.  Install it on the Centro and run it.  It will back up everything...your data, applications, preferences, software activation codes, etc.  It also stores a copy of itself on the card.  Then when you get your new Centro, you pop in the card, run NVBackup from the card, select the most recent backup and tap Restore.  You're done.
    Post relates to: Centro (AT&T)
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • HT1296 My computer crashed. How do I get my voice memos back off my iphone to my itunes again? PLEASE help?  I've tried to sync, but they won't go back onto the program, they are just staying on the phone.

    I tried to upgrade from Windows 7 to Windows 8................BIG MISTAKE. I crashed my i5  4.8 with 8 gigs of memory and lost all of my voice memos in my i-tunes. I still have most on my i-phone 4s, but really need them on my computer for a court case. I reloaded my laptop, but when I synced my phone, it won't reload the old voice memos, just the new ones. How can I get it to reload, or "sync" the old memos back into itunes on my laptop?

    For everything else (including purchases) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod Touch or iPhone. You'll find that they have varying degrees of functionality and some will transfer data (such as playcounts and ratings), movies, videos, photos, podcasts and games as well.
    A selection of iPod/iPhone to iTunes utilities:
    Senuti Mac Only (iPod Touch & iPhone compatible)
    SharePod Windows Only (iPhone and iPod Touch compatible)
    TuneJack Windows Only (iPhone and iPod Touch compatible)
    iPodRip Mac & Windows (iPhone and iPod Touch compatible)
    Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)

  • How can you get your number back on the iphne

    I'm tryna get my number to my phne instead of my icloud email

    Sync is only oneway, from PC to your device. Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software. A good Free one is called Sharepod which you can download from Download.com here:
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

  • Is there a way to go back into the program pages? Like in windows if you make a mistake you can hit a back button

    Please help! I was writing a paper and went to select all to copy and paste and hit paste instead of copy. Is there a way to go back like there is in windows?

    vestaljes81 wrote:
    I did save it to my desk top after it happened becasue I needed to leave and didn't want anything else to happen to it. Would this matter? I saved it after the fact...
    It depends on what operating system you are using. In Lion you have a chance to revert to an earlier Version. In Snow Leopard you would have lost the ability to Undo when you Saved.
    Jerry

  • How do I Uninstall Adobe PSE9?  All I get is an error message, "Error 1316.  The specified account already exists".  Then the Unistaller rolls back and the program just sits there, partially uninstalled and unusable.

    I have upgraded to PSE13 and want to unistall PSE9.  When I try to do this all I get is an error message, "Error 1316.  The specified account already exists".  Then the uninstaller rolls back and I am left with a partially uninstalled version that is unusable.  I tried to reinstall the software from the original PSE9 disk but all it tries to do is uninstall the version already on my computer, and this then does the same thing as noted above. How do I completely uninstall PSE9?

    See here:
    How do I remove older versions of Photoshop?

  • Will not allow me back into the program once I close it

    will not reopen once I close the program

    See "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

Maybe you are looking for

  • Submit by Email with CC for a pdf as an attachment

    Hello, I am using the codes below for a regular submit button to submit by email and having a problem of CC address. I hard-coded the CC address but it does not seem to recognize it, it keep taking the address in the "To" to put on the CC address. Ca

  • Re: SDHC cards with Zen MX

    I've now been able to confirm that the MX DOES support 32Gb SDHC cards.

  • HT1689 I have a positive account balance why is my credit card charged?

    I have a positive account balance by the use of gift cards from friends.  So, why is my credit card charged instead of deducting the amount from my balalce?  Can I choose to debit my account balance instead of charging on the card?

  • Passing paramaters in pl\sql code

    I declared the following two procedures like this: In the specs PROCEDURE applicant_address_update ( p_applicant_term_code IN saradap.saradap_term_code_entry%TYPE, p_applicant_main_err_code OUT VARCHAR2, p_ora_err_code OUT NUMBER, p_ora_err_msg OUT V

  • Essbase Studio Cube Stores data as integer, drops decimals

    I have an Essbase cube that I am developing in Essbase Studio 11.1.2.1. If I preview the data in Essbase Studio I can see the decimals for the number. However, when I deploy the cube the numbers are not stored in the Essbase cube with the decimal pla