Printprogram for smartform

anyone have an example print program to pass data to smartform?  I would really appreciate it.

Hi
Here is a driver program go through this i hope this will help you to solve your problem.
*DATA DECLARATIONS
TABLES : vbrk,
         vbrp,
         kna1.
TYPES  : BEGIN OF t_vbrk,
         vbeln TYPE vbrk-vbeln,
         fkart TYPE vbrk-fkart,
         kunag TYPE vbrk-kunag,
         END OF t_vbrk.
TYPES  : BEGIN OF t_vbrp,
         vbeln TYPE vbrp-vbeln,
         fkimg TYPE vbrp-fkimg,
         cmpre TYPE vbrp-cmpre,
         netwr TYPE vbrp-netwr,
         END OF t_vbrp.
TYPES  : BEGIN OF t_kna1,
         kunnr TYPE kna1-kunnr,
         name1 TYPE kna1-name1,
         adrnr TYPE kna1-adrnr,
         ort01 TYPE kna1-ort01,
         pstlz TYPE kna1-pstlz,
         regio TYPE kna1-regio,
         END OF t_kna1.
TYPES  : BEGIN OF t_final.
          INCLUDE STRUCTURE ZINVOICE.
        vbeln TYPE vbrk-vbeln,
        fkart TYPE vbrk-fkart,
        kunag TYPE vbrk-kunag,
        fkimg TYPE vbrp-fkimg,
        cmpre TYPE vbrp-cmpre,
        netwr TYPE vbrp-netwr,
        name1 TYPE kna1-name1,
        adrnr TYPE kna1-adrnr,
        ort01 TYPE kna1-ort01,
        pstlz TYPE kna1-pstlz,
        regio TYPE kna1-regio,
types:     END OF t_final.
DATA  : i_vbrk TYPE TABLE OF t_vbrk,
        i_vbrp TYPE TABLE OF t_vbrp,
        i_kna1 TYPE TABLE OF t_kna1,
        i_final TYPE TABLE OF t_final.
data  : v_fnam type rs38l_fnam.
DATA  : wa_vbrk TYPE t_vbrk,
        wa_vbrp TYPE t_vbrp,
        wa_kna1 TYPE t_kna1,
        wa_final TYPE t_final.
*START-OF-SELECTION
SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln.
START-OF-SELECTION.
  SELECT vbeln
         fkart
         kunag
    INTO TABLE i_vbrk FROM vbrk
    WHERE vbeln IN s_vbeln.
  SELECT vbeln
         fkimg
         cmpre
         netwr
    INTO TABLE i_vbrp FROM vbrp
    FOR ALL ENTRIES IN i_vbrk
    WHERE vbeln = i_vbrk-vbeln.
  SELECT kunnr
         name1
         adrnr
         ort01
         pstlz
         regio
    INTO TABLE i_kna1 FROM kna1
    FOR ALL ENTRIES IN i_vbrk
    WHERE kunnr = i_vbrk-kunag.
  LOOP AT i_vbrk INTO wa_vbrk.
    wa_final-vbeln = wa_vbrk-vbeln.
    wa_final-fkart = wa_vbrk-fkart.
    wa_final-kunag = wa_vbrk-kunag.
    LOOP AT i_vbrp INTO wa_vbrp WHERE vbeln = wa_vbrk-vbeln.
      wa_final-fkimg = wa_vbrp-fkimg.
      wa_final-cmpre = wa_vbrp-cmpre.
      wa_final-netwr = wa_vbrp-netwr.
    ENDLOOP.
   LOOP AT i_kna1 INTO wa_kna1 WHERE kunnr = wa_vbrk-kunag.
     wa_final-name1 = wa_kna1-name1.
     wa_final-adrnr = wa_kna1-adrnr.
     wa_final-ort01 = wa_kna1-ort01.
     wa_final-pstlz = wa_kna1-pstlz.
     wa_final-regio = wa_kna1-regio.
   ENDLOOP.
    APPEND wa_final TO i_final.
  ENDLOOP.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname                 = 'ZINVOICE_FORM'
    VARIANT                  = ' '
    DIRECT_CALL              = ' '
   IMPORTING
     FM_NAME                  = V_FNAM
   EXCEPTIONS
     NO_FORM                  = 1
     NO_FUNCTION_MODULE       = 2
     OTHERS                   = 3
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION V_FNAM
  EXPORTING
    ARCHIVE_INDEX              =
    ARCHIVE_INDEX_TAB          =
    ARCHIVE_PARAMETERS         =
    CONTROL_PARAMETERS         =
    MAIL_APPL_OBJ              =
    MAIL_RECIPIENT             =
    MAIL_SENDER                =
    OUTPUT_OPTIONS             =
    USER_SETTINGS              = 'X'
IMPORTING
    DOCUMENT_OUTPUT_INFO       =
    JOB_OUTPUT_INFO            =
    JOB_OUTPUT_OPTIONS         =
    TABLES
      i_final                    = i_final.
  EXCEPTIONS
    FORMATTING_ERROR           = 1
    INTERNAL_ERROR             = 2
    SEND_ERROR                 = 3
    USER_CANCELED              = 4
    OTHERS                     = 5
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
THANKS
MRUTYUNJAYA TRIPATHY

Similar Messages

  • Find the printprogram for SMARTFORM?

    Hello ABAPers,
    I need to find the print program for a Smart form !! I can probably find it by using the WHERE Used list on the FM ssf_function_module_name..
    But is there any other way to get this information?
    Is there a way to get the print program name similarly for SAPscript?
    Thanks
    Krish

    Hi,
    Searching in where used list of FM is not a good idea as most of the ppl use SSF_FUNCTION_MODULE_NAME to get the fm name for smartforms at runtime. looking at TNAPR is not a bad idea if the form is configured in the system.
    Otherwise if looking for sap standard Program name, a few are in /SMB40/ Development class, and RLB_Invoice for invoice, RLE_DELNOTE for delivery note. ( search program repository in se38 using f4 and then by description ).
    You can look at SAP OSS for print program names also. I forgot the no of note, but there is one for all the SAP provided forms.
    Regards,
    Gagan

  • How to find Printprogram for Smartform.

    Hi,
        I want to see the print program(Executable program) of the Smartform. We have one Smartform, when we activate smartform it will generate one FM. that function module is called Dynamically. How can i know which program is calling that function module.
    Regards,
    Nagesh.

    Hi
    You can't do it.
    If your print is std, you can try the link in TNAPR table if you know the message type.
    If your print is custom, you should know the program.
    The print program for smartform has usually a code like this to run SM:
    DATA: formname  type  tdsfname value 'ZMY_SMARTFORM',
          fm_name   type  rs38l_fnam.
    Here get out the mane of fm of sf
          call function 'SSF_FUNCTION_MODULE_NAME'
            exporting
              formname           = formname
            importing
              fm_name            = fm_name
            exceptions
              no_form            = 1
              no_function_module = 2
              others             = 3.
          if sy-subrc <> 0.
            exit.
          endif.
    Here run the sf
    call function fm_name
    Max
    Message was edited by: max bianchi

  • For smartforms

    like medruck in sapscript for purschsing order
    is there any standard layouts or printprograms for smartform (specilally for purchasing order),.

    Hi
    Standard layouts for smartforms:
    sf_example_01,
    sf_example_02,
    sf_example_03.

  • Is there any method r table 2 find corresponding printprograms 4 smartforms

    hi ..
    iam unable 2 find print programs for respective smartforms.
    through STXFADM and STXFADMT tables im getting only smartforms.
    and the following smartform print programs r not exits in my pc..
    is there any other method r table 2 find corresponding printprograms 4 smartforms
    thanks

    Hi,
    check the table TNAPR or the tcode NACE....NACT
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • New-page for smartform

    Hello all,
    I am facing a problem using smartforms. I am printing a report where there is a loop running for a list of plants. For printing the information of each plant, I need to use a new page. Information of one plant may take several pages but for every new plant, I need to insert a page break.
    I am using a COMMAND with a checked next page option in my EVENT ON SORT BEGIN for the plant code.
    This does the trick, but if I use the command at the bottom, it inserts a blank page at the end of the report. If I use the command at the top of the event, it first shows a blank page and then the data from the 2nd page.
    Please sugest how can I fix this.
    Anmol

    Hi Friend,
            You can use following tips for generating smartforms for every new plant.I have generated sales order report using this steps.You can refer it.Tips are given below:
    1.Define the structure,workarea and internal table for sales order header and details and also define
    select-options for sales order.
    2.Also define the one STRUCTURE which has type as ssfctrlop.
    e.g. control type ssfctrlop.
         This variable we have to define because we are going to use this in
    SSF_OPEN function.This is used to avoid print preview while openning smartform
    for every sales order.
    3. Select data from vbak for sales header.
    4. Call function SSF_FUNCTION_MODULE_NAME.
    e.g.*CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = w_formname
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  =  w_functionname
       EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    5.Now here define the various features or field in control structure.
    This is controls for smartform.
    e.g.  control-no_dialog = 'X'.
         control-preview   = 'X'.
         control-no_open   = 'X'.
         control-no_close  = 'X'.
    6. Call function SSF_OPEN.
         Here you have to pass the control structure which you have define in declaration.
    e.g.
    CALL FUNCTION 'SSF_OPEN'
        EXPORTING
      ARCHIVE_PARAMETERS       =
      USER_SETTINGS            = 'X'
      MAIL_SENDER              =
      MAIL_RECIPIENT           =
      MAIL_APPL_OBJ            =
      OUTPUT_OPTIONS           =
          control_parameters       = control
    IMPORTING
      JOB_OUTPUT_OPTIONS       =
       EXCEPTIONS
         formatting_error         = 1
         internal_error           = 2
         send_error               = 3
         user_canceled            = 4
         OTHERS                   = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    7. Take loop at header internal table .
    8. Select data from vbak for sales details. Also select data from respective tables
    like makt,kna1 here.
    9.Then call function module which generated after executing smartform. And also pass the control structure
    in import parameter in this function module.
    e.g.  CALL FUNCTION '/1BCDWB/SF00000397'
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
        control_parameters         = control
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
          wa_vbak                    = wa_vbak
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
          it_vbak                    = it_vbak
          it_vbap                    = it_vbap
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    10.After endloop call function SSF_CLOSE.
         If it will help you reward me points.
    Regards,
    Santosh.

  • Printers for smartforms

    Hi Gurus,
    Can you tell me the what are the printers are support for smartforms?
    Because my client has changes the printer,then the smartforms is not printing the Barcodes are support?
    Regards
    Kiran

    Hi
    For printing Barcodes we have to use special Barcode printers
    where as for printing general smartforms we can use any general printer
    but some times certain printers won't accept all fonts and doesn't print the logos barcodes properly, then you have to change the printer settings
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Creating pageformat for smartform

    hi everyone,
    i want to create a new page format for smartform,can any one help me out inthis.
    thanks.

    Hi ,
    In smartforms we can switch between Portrait and Landscape formats in the tab "OUTPUT OPTIONS"
    In the FORM ATTRIBUTES, "OUTPUT OPTIONS" tab we can select the type of page format, Characters per inch, lines per inch etc.
    Hope this solves your query.
    Reward points if useful.
    Thanks,
    Mohammed

  • Role for SMARTFORMS tcode in DEV system?

    Hi all,
    I gave access for an ABAP Developer in QA and MIRROR system with a Z_ARCHITECT_MIRROR[Super role with access to all transactions] role.
    Whic is restricted in PROD system.
    There is a SAP role which contains access for SMARTFORMS tcode in PROD.
    As far as I know this is not possible in PROD system??
    Would like to know if there is a solution for this?
    Regards,
    Bharath.
    Edited by: SAP Learner on Apr 14, 2008 4:07 PM

    as long as your PRD system is locked against changes (tx. SCC4) there should not be a problem when the abaper can view smartforms.
    check the settings of your PRD-system (no changes allowed in SE06) and no customizing and repository changes allowed in client XXX in tx. SCC4 and you should be safe.

  • SPOOL REQUEST FOR SMARTFORM

    HI experts,
    how to create the spool request for smartform. can anyone help me. give me the complete procedure.
    thanks in advance for ur responce.

    The user which send the smartform to the spool (probably wf-batch) needs an output device. You can maintain this in SU01.
    Just look at sample code:
    1.Send Smart Form output to spool using the FM <ws_formname> (FM name derived from the export parameters of SSF_FUNCTION_MODULE_NAME).
    //Start of Code Sample
    DATA : ws_formname TYPE rs38l_fnam.
    TYPES: BEGIN OF ty_script,
    trans_ref LIKE eanl-anlage,
    cont_ref TYPE e_edmideservprovcontractid,
    trans_code TYPE char05,
    trans_reason TYPE char05,
    market_sect LIKE eanl-zzmktscode,
    efffrm_date LIKE sy-datum,
    mprn LIKE iflot-zzmprn,
    mlc TYPE char01,
    subbuild_no(40) TYPE c,
    build_no LIKE adrc-str_suppl1,
    dep_fare LIKE adrc-str_suppl3,
    post_town LIKE adrc-city1,
    post_code LIKE adrc-post_code1,
    asset_code LIKE egerh-kombinat,
    paymnt_code(2) TYPE c,
    model_code LIKE equi-typbz,
    manuf_code LIKE equi-herst,
    year_manuf LIKE equi-baujj,
    serial_no LIKE equi-sernr,
    meter_code TYPE char01,
    meter_mech(2) TYPE c,
    meas_cap TYPE zmeasur_cap,
    role_code TYPE char03,
    market_name LIKE eservice-serviceid,
    status TYPE char01,
    END OF ty_script.
    DATA: i_scriptdata TYPE STANDARD TABLE OF ty_script
    WITH HEADER LINE.
    DATA: wa_output_options TYPE ssfcompop,
    wa_control_params TYPE ssfctrlop,
    wa_spoolnum TYPE rspoid,
    wa_printdata TYPE efg_strn_printdata.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Your Form Name'
    IMPORTING
    fm_name = ws_formname
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    CALL FUNCTION ws_formname
    EXPORTING
    control_parameters = wa_control_params
    c = wa_printdata
    IMPORTING
    job_output_info = wa_job_output_info
    TABLES
    i_scriptdata_input = i_scriptdata(Your Script Data)
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    MOVE wa_job_output_info-spoolids] TO wa_spoolids[.
    READ TABLE wa_spoolids INTO wa_spoolnum INDEX 1.
    IF sy-subrc = 0.
    DATA :id LIKE tsp01-rqident.
    MOVE wa_spoolnum TO id.
    ENDIF. .
    Comments-Id Contains the Spool Request for the given smart form
    //End of Code Sample
    Convert Smart Form Output to Raw
    Format
    2.Convert the Spool Output to OTF using the FM RSPO_RETURN_SPOOLJOB.
    //Start of Code Sample
    data i_soli LIKE soli occurs 0 with header line.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
    EXPORTING
    rqident = id
    desired_type = 'OTF'
    TABLES
    buffer = i_soli
    EXCEPTIONS
    no_such_job = 1
    job_contains_no_data = 2
    selection_empty = 3
    no_permission = 4
    can_not_access = 5
    read_error = 6
    type_no_match = 7
    OTHERS = 8.
    Comments- i_soli contains the OTF data
    //End of Code Sample
    3.Convert the OTF using FM
    SX_OBJECT_CONVERT_OTF_RAW.
    DATA content_bin TYPE solix_tab.
    DATA objhead TYPE soli_tab.
    DATA i_soli_tab TYPE soli_tab.
    DATA boolean TYPE sx_boolean.
    DATA length TYPE so_obj_len.
    LOOP AT i_soli.
    APPEND i_soli TO i_soli_tab[].
    ENDLOOP.
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_RAW'
    EXPORTING
    format_src = 'OTF'
    format_dst = 'RAW'
    CHANGING
    transfer_bin = boolean
    content_txt = i_soli_tab
    content_bin = content_bin
    objhead = objhead
    len = length
    Convert Smart Form Output to Raw
    Format
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    REward points if useful.

  • Create coustom page size for Smartforms

    Dear All
    How to create coustom page size for smartforms.
    rgds
    pramod

    HI
    To define a new page format, choose
    Administration -> CCMS -> Print->® Spool Administration.
    Choose Full Administration and then Page Formats on the Device Types tab page. On the next screen choose Change and  Create or  Create with Reference. Fill out the fields on the next screen.
    Activating a New Page Format
    Before using a new page format, you must specify it as a page format in a SAPscript form. Be careful when replacing a page format in a standard SAPscript form as the form may not necessarily fit on the new page format.
    You also have to define a format and device type format for the new page format before you can use it.
    Thanks and Regards
    Santosh   Kate

  • Hi..how we enter standard text for smartform using include text

    hi
    guru
    ..how we enter standard text for smartform using include text..
    i know only using so10 we write text..
    in smartform it asking text-object
                                     text-id,
    so what values we should give to get text

    Hi,
       Do u want to print Standard Text or the Texts that are maintained at the Transaction level.
    If it is standard text , then u use text id as ST or if it is Texts that are maintained at the Transaction level then u have to go to that specific transaction and check for that text , then go to text editor ,in the goto menu u have header data where u get the Text id , text name.... , use them in ur smartform in the INCLUDE text.
    Further u have the option of text modules in smartforms which act as standard texts, so if u r going for creation of standard texts then its better to use text modules.
    Regards,
    Shafivullah Mohammad

  • Duplex printing for smartform

    Hi,
    Has anyone worked on Duplex printing for smartform? If yes, please tell me the procedure/steps that need to be taken for the same.
    Thanks
    Regards

    Hi,
    You can select Duplex printing in th epage properties of a page (D = Duplex)
    The printer STARTS duplex printing from that page. This means that the printer triggers a pagefeed on that exact moment and starts printing on a new page. So when you have 1 page that stretches over more that one sheet of paper this means trouble. after every page the flow of the program starts a new Duplex print (thus feeding the current sheet and starts at a new page) this results in a new sheet of paper every page. this is not what you want.
    You can solve this by creating 2 pages and set their respective NEXT PAGE to each other. Page 1 you set to DUplex, pagae 2 you leave blank..
    But notice that when you select duplex printing most (if not all) printers start printing on the backside of the paper. When you use pre-printed (logo) paper, you will find that it prints the front on the back etc.
    This can sometimes be corrected (if needed) by sending prescribe commands to the printer directly.
    Good luck!
    Joris

  • Material document printing: is program SAPM07DR prepared for smartforms?

    Hi everyone.
    We need to do a smartform to print material documents through a new output type. Do you know if program SAPM07DR is prepared to work with smartforms? I don't think so, I see that it is prepared for sapscripts and PDF-forms, but it seems not to be prepared for smartforms.
    In case that it is not prepared to work with smartforms, do you know any standard program that print smartforms for material documents?
    Thanks in advance.
    Regards.

    These programs doesn't fit with the requirements. I have found program SAPFM07P_SMART, but the problem is that this program is prepared to print an smartform per material document item, and I need to print a smartform for the whole material document information.
    So if you don't know any other program, I suppose we will have to addapt a copy of SAPFM07P_SMART to work with the whole material document, and not with every item.
    Thanks.

  • Get Spool number for Smartform

    Hi All,
    I have created a smartform to print the POs created through ME21n. I have changed the config to use this smartform when a PO is changed/created. Everything is working fine. All I need is the spool number for each of the PO this is being printed. Can you please let me know how I can achieve this through the FM for smartform?
    I AM USING 4.6C.
    This is how I am using the function module
      CALL FUNCTION FM_NAME
           EXPORTING
                CONTROL_PARAMETERS = CONTROL
                OUTPUT_OPTIONS     = OUTPUT
                USER_SETTINGS      = ' '
                EKKO               = L_DOC-XEKKO
                PEKKO              = L_DOC-XPEKKO
                DRUVO              = L_DRUVO
           IMPORTING
                JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
           TABLES
                EKPO               = L_DOC-XEKPO
                PEKPO              = L_DOC-XPEKPO
                XAEND              = IT_XAEND
           EXCEPTIONS
                FORMATTING_ERROR   = 1
                INTERNAL_ERROR     = 2
                SEND_ERROR         = 3
                USER_CANCELED      = 4
                OTHERS             = 5.
    All your inputs are greatly appreciated.
    Thanks!
    Sandeep

    Hi,
    JOB_OUTPUT_OPTIONS is of type SSFCRESOP, which does not have a SPOOLIDS field/table.
    I knwo that the function module SSF_CLOSE returns the spool id in a table. But, I am not sure how to use SSF_OPEN and SSF_CLOSE. Can you please throw some light on how I can use these to get the spool numbers?
    This is what I have right now.
      JOB_OUTPUT_OPTIONS-TDDEST = ITCPO-TDDEST.
      JOB_OUTPUT_OPTIONS-TDNEWID = 'X'.
      L_FORMNAME = TNAPR-FONAM.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                 FORMNAME           = TNAPR-SFORM
                FORMNAME           = L_FORMNAME
           IMPORTING
                FM_NAME            = FM_NAME
           EXCEPTIONS
                NO_FORM            = 1
                NO_FUNCTION_MODULE = 2
                OTHERS             = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION FM_NAME
           EXPORTING
                CONTROL_PARAMETERS = CONTROL
                OUTPUT_OPTIONS     = OUTPUT
                USER_SETTINGS      = ' '
                EKKO               = L_DOC-XEKKO
                PEKKO              = L_DOC-XPEKKO
                DRUVO              = L_DRUVO
           IMPORTING
                JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
           TABLES
                EKPO               = L_DOC-XEKPO
                PEKPO              = L_DOC-XPEKPO
                XAEND              = IT_XAEND
           EXCEPTIONS
                FORMATTING_ERROR   = 1
                INTERNAL_ERROR     = 2
                SEND_ERROR         = 3
                USER_CANCELED      = 4
                OTHERS             = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        SELECT RQIDENT RQOWNER RQCRETIME FROM TSP01 INTO TABLE IT_TSP01
        WHERE RQOWNER = SY-UNAME.
        IF SY-SUBRC = 0.
          SORT IT_TSP01 BY RQCRETIME DESCENDING.
          READ TABLE IT_TSP01 INDEX 1.
          SPOOLID = IT_TSP01-RQIDENT.
          PERFORM PROTOCOL_UPDATE USING '320' SPOOLID SPACE SPACE SPACE.
        ENDIF.
      ENDIF.
    The SELECT part is wrong, I need to replace this code to get the correct spool numbers.
    Thanks in advance.
    Sandeep

Maybe you are looking for

  • Can't update anything from CC on any of my machines

    Process:         Creative Cloud [275] Path:            /Applications/Utilities/Adobe Creative Cloud/*/Creative Cloud.app/Contents/MacOS/Creative Cloud Identifier:      com.adobe.acc.AdobeCreativeCloud Version:         1.5.0.367 (???) Code Type:      

  • Web content not showing up anymore.

    My article inside have a container that contain a HTML/JS web content. Once I edit the html content and update the article, the container is empty. I remove the article and upload again still get the same result, it is empty. How can I solve this pro

  • Significance of video icon in a clip in the event browser

    Hello to all, I happen to notice a 'video icon' in one of the clips I have on my event browser and would like to no its significance. Screen shot : Thanks in advance. DR.SOMANNA

  • Extra field in the WOrklist

    Hi Specialist I would like to ask about add one extra field in the layout of the worlikst. there is a field: VERZN  --> Days in Arrears by Net Due Date that I would like to add in my layout. I check by the standard way using the "change layout" but t

  • Video formats, sizes, best to share in pods

    I'm looking for the following advice. 1.  Best format to upload video in to use in the "share pods" 2.  Suggested max file size 3.  I did upload .SWF files but it doesn't seem like I can control the video once I call it up on the share pod...? 4.  I