Problem in output type determantion in smart forms

Hi all,
I have one problem in smart forms mentioned below:
In this program RVADOR01 i hav used RVORDER01 for displaying the output in the output type determination(print preview) for a particular quotation no.
In VA23 for a particular quotation I clicked on preview button and i got d output for smart form(RVORDER01).
Can u plz tell me where i can find that in which part of d program(RVADOR01) is d QUOTATION NO called.
so that i dont want to hard code the quotation no in the program.
Thanks
Regards
SANJAY CHOBDAR

not really helping you on the issue, but some things here need clarification i sense.
Outputtype determination has actually NOTHING to do with print preview.
In output type determination the output types for the actual document get determined via output schema which is assigned to either documenttype or itemtype.
RVADOR01 is the SAP-standard (SAP-SCRIPT) driver program for offers/orders.
RVORDER01 is the SAP-standard SAP-SCRIPT form for offers/orders.

Similar Messages

  • What is the purpose of Output types for a particular FORM

    Hi,
    All
    can any body explain me what an output type is for a form, and also why we use it and where we use it

    hi,
    Output types are represent how you want to output information. In SAP Script context it links the print program with SAP script. Output types are part of Output determination procedure which is linked to the application (e.g. Purchsing). Output types are also linked to Access sequence, which allows you to create condition records so that output types can be processed automatically.
    check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/19884743b111d1896f0000e8322d00/frameset.htm

  • Problem with Output type NEU in PO

    hI all,
    I would like to have the possibility to send the PO document via mail.
    Therefor I changed the smartform and the program as I did it for some other. I tested it and it works.
    To do so, I've created a new output type ZNEU by copying the NEU output type.
    I've created a new schema including my ZNEU output type in place of the standard NEU.
    I inculded the schema I've created for output type ZNEU.
    I did all the customizing in the NACE transaction, I've created the condition record for ZNEU in the transaction MN05 on the level 'document type', and also set  the communication strategy.
    But there is somethin missing, because by creating a PO, the system doesn't set the ZNEU message type in the PO automatically. Looking the protocol, it says that a valid output condition has been found but it is still not set in the PO.
    Any idea ? I looking for this problem for hours...
    thank you

    It is a possibility that 'smartform' has formatting error and although it is going to the print program as guided by condition records..
    But not assigning the output type with PO document
    Can you please do two things:
    1. Put a break-point in print program and see if control goes there or not
    2. Test the output after adding it in manually in PO
    Thanks.

  • Problem with output type--urgent

    Hi experts,
      My requirement is i need to post a vendor lkiability. For that we create a output type 'ZALV'. We also created a report program . In nace we attached the program and output type with medium '8'. we call the same subroutine Entry which available in standard program (CMSR_OUTPUT_ENTRY whcich is attched to medium 8 and o/p type:CMSF). Up to this one my output type works fine and processed successfully.In that Entry some function modules called.
    When i added my own code in report program it gives a error
    saying that '   POSTING_ILLEGAL_STATEMENT".
       Statement "CALL SCREEN" is not allowed in this form.
    There is probably an error in the program
    "SAPLTAX1".
    This program is triggered in the update task. There,
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    In my code i am not used these statements also.
    The error in code is:PERFORM skftabn_ergaenzen.
    xbset-first = 1.
    xkzinc = space.
    IF bkpf-xmwst = 'X'.
      ok-code = 'CALC'.
      IF bkpf-xsnet = space.
        xkzinc = 'X'.
      ENDIF.
    ELSE.
      ok-code = 'PRUF'.
    ENDIF.
    IF i_xsimu NE 'S'.
      xnodia = 'X'.
    ELSE.
      xnodia  = space.
      ok-code = 'SHOW'.
    ENDIF.
    Bild dunkel prozessieren -
           evtl. veraenderte Steuern merken
    IF xusvr = 'X'.
      PERFORM ustaxes_detail USING i_bkpf.
    ELSE.
      IF sy-tcode(1) = 'M'
      or bkpf-tcode(1) = 'M'.
      OR bkpf-tcode(1) = 'M' OR NOT dynpro_501 IS INITIAL.
        CALL SCREEN 301.
      ELSE.
        CALL SCREEN 300.
      ENDIF.
    ENDIF.
    ok-code = space.
    Please give me a solution --- It is very urgent.
    Regards
    Pratap.M

    Hi ,
    Use this one . These are standarrd includes you need to include.
    INCLUDE riprid01.            " General DATA and TABLE struct.
    INCLUDE riprif01.               " General PRINT routines
    PERFORM print_paper.
    Main Form which is called.
    FORM print_paper.
    Import Data ---Copied From SAP Program
      PERFORM data_import. * This you have to copy from standard SAP program
    *&-- Populate internal table for header part of form.
      PERFORM data_population.
    Your scrpit printing logic will be done in this.
    *&--Script printing.
      PERFORM main_print.               " Print the PAPER now
    Do reward.
    Thanks,
    Madhura

  • Problem with output type..

    Hi All,
    I have  a query regarding output type.
    A particular customer want the order confirmation to be sent to the ship-to via fax instead of the sold-to.
    Can someone tell where this setting can be done.
    Regards,
    Anoop

    Hi Anoop
    As this is related to output and there will be many customers who should receive the output in the same way so first of all copy the standard output type to Z output type .
    Now in Z output type , assign the access sequence maintained by you in the Z output type . in that access sequence maintain the key combination as  ship to party only . and maintain the Transmission medium as Fax 
    Now while maintaining the condition record  VV11 give the ship to party number and the fax number of the ship to party (Because of Transmission medium as fax)
    Regards
    Srinath

  • Problem in multiple printing in the Smart Forms

    Hi Experts,
    From the driver program I am passing Internal table with multiple records for employee,
    But the smart forms is printing only single form for the employee.
    Could you please suggest what need to be done in order to print multiple forms for employee.
    Regards,
    IFF

    IF sy-tabix EQ 1 .------>only for first loop it will give dialog box
          CALL FUNCTION fm_name
            EXPORTING
              user_settings      = 'X'
              vbeln              = it_vbeln-vbeln
              pdf                = r2
              rbiclear           = c3
            IMPORTING
              job_output_options = job_out
              einv               = einv.
        ELSE.
               c_par-no_dialog = 'X'.----
    > if u set this then u will not get dialog box again and again
           out_opt-tdnoprev = 'X'.
            out_opt-tddest = job_out-tddest.
            out_opt-tdprinter = job_out-tdprinter.
          CALL FUNCTION fm_name
            EXPORTING
              control_parameters = c_par
              output_options     = out_opt
              user_settings      = space
              vbeln              = it_vbeln-vbeln
              pdf                = r2
              rbiclear           = c3
            IMPORTING
              job_output_options = job_out
              einv               = einv.
        ENDIF.

  • PROBLEM IN FILED BESG-DMBTR IN SMART FORMS

    Hi All,
    I have a problem in smartforms
    I have created a structure using bkpf& bseg,
    i have defined a itab like the above structure.
    I am getting data for select query into this itab.
    then loop at itab into a work area.
    everything isworking fine except,
    if i am trying to display wa-dmbtr, i am getting the message like
    Reference field WA_DISP-DMBTR unknown in form.
    Message no. SSFCOMPOSER601
    appropriate points will be rewarded.
    Regards
    Arun kumar

    Hi Arun,
    Try this:
    Declare a variable of type dmbtr & assign the value of wa-dmbtr to variable & pass the variable. One time i also faced the same error for currency field.
    Ashvender

  • Output type for the managed codes cut letter is hard coded

    Hello,
    Very Good afternoon!
    I have a requirement to create new Output Types for a Smart Form.
    The already existing Output types are hard coded as shown Below :
    CONSTANTS : c_kschl_order LIKE nast-kschl
                             VALUE 'ZUS0',
                c_kschl_order1 LIKE nast-kschl
                             VALUE 'ZUS1',
    Now they do not want to use ZUS1. Insted they wnat to use New Output Types.
    u2022 Remove ZUS1 as we no longer use this one.
    u2022     Add ZAU0
    u2022     Add ZNZ0
    u2022     Add ZJP0
    u2022     Add ZCN0
    u2022     Add ZKR0
    How to add these Output types without Hardcoding as shown ABove.
    Any Suggestions will be appreciated.....
    For reference..I will paste the code of the Program here.
    Here is the code  :
                     PROGRAM DECLARATION
    PROGRAM ID           Z_RVADOR01_SALES_CUT_LETTER
    TABLES: vbak,    "Sales Document: Header Data
           vbap,    "Sales Document: Item Data
           vbpa,    "Sales Document: Partner
           vbep,    "Sales Document: Schedule Line Data
           kna1,    "General Data in Customer Master
           MARA,    "Material Master
            KOMK,                          "Communicationarea for conditions
            KOMP,                          "Communicationarea for conditions
            KOMVD,                         "Communicationarea for conditions
            VBCO3,                         "Communicationarea for view
            VBDKA,                         "Headerview
            VBDPA,                         "Itemview
            VBDPAU,                        "Subitemnumbers
            CONF_OUT,                      "Configuration data
            SADR,                          "Addresses
            TVAG,                          "Reason for rejection
            VEDKA,                         "Servicecontract head data
            VEDPA,                         "Servicecontract position data
            VEDKN,                         "Servicecontract head notice data
            VEDPN,                         "Servicecontract pos. notice data
            RISERLS,                       "Serialnumbers
            KOMSER,                        "Serialnumbers for print
            TVBUR,                         "Sales office
            TVKO,                          "Sales organisation
            ADRS,                          "Communicationarea for Address
            FPLTDR,                        "billing schedules
            WTAD_ADDIS_IN_SO_PRINT,        "additional
            WTAD_BUYING_PRINT_EXTRA_TEXT,  "texts belonging to additional
            adrc,
            adr6,
            t247.
    INCLUDE RVADTABL.
    INCLUDE RVDIREKT.
    INCLUDE VEDADATA.
    data for access to central address maintenance
    INCLUDE SDZAVDAT.
    TYPE-POOLS: ADDI.
    DATA PRICE_PRINT_MODE(1) TYPE C.       "Print-mode
    DATA: RETCODE   LIKE SY-SUBRC.         "Returncode
    DATA: REPEAT(1) TYPE C.
    DATA: XSCREEN(1) TYPE C.               "Output on printer or screen
    DATA: BEGIN OF STEU,                   "Controldata for output
            VDKEX(1) TYPE C,
            VDPEX(1) TYPE C,
            KBKEX(1) TYPE C,
            KBPEX(1) TYPE C,
          END OF STEU.
    DATA: BEGIN OF TVBDPA OCCURS 0.        "Internal table for items
            INCLUDE STRUCTURE VBDPA.
    DATA: END OF TVBDPA.
    DATA: BEGIN OF TKOMV OCCURS 50.
            INCLUDE STRUCTURE KOMV.
    DATA: END OF TKOMV.
    DATA: BEGIN OF TKOMVD OCCURS 50.
            INCLUDE STRUCTURE KOMVD.
    DATA: END OF TKOMVD.
    DATA: BEGIN OF TVBDPAU OCCURS 5.
            INCLUDE STRUCTURE VBDPAU.
    DATA: END   OF TVBDPAU.
    DATA: BEGIN OF TKOMCON OCCURS 50.
            INCLUDE STRUCTURE CONF_OUT.
    DATA: END   OF TKOMCON.
    DATA: BEGIN OF TKOMSERVH OCCURS 1.
            INCLUDE STRUCTURE VEDKA.
    DATA: END   OF TKOMSERVH.
    DATA: BEGIN OF TKOMSERVP OCCURS 5.
            INCLUDE STRUCTURE VEDPA.
    DATA: END   OF TKOMSERVP.
    DATA: BEGIN OF TKOMSERVHN OCCURS 5.
            INCLUDE STRUCTURE VEDKN.
    DATA: END   OF TKOMSERVHN.
    DATA: BEGIN OF TKOMSERVPN OCCURS 5.
            INCLUDE STRUCTURE VEDPN.
    DATA: END   OF TKOMSERVPN.
    DATA: BEGIN OF TKOMSER OCCURS 5.
            INCLUDE STRUCTURE RISERLS.
    DATA: END   OF TKOMSER.
    DATA: BEGIN OF TKOMSER_PRINT OCCURS 5.
            INCLUDE STRUCTURE KOMSER.
    DATA: END   OF TKOMSER_PRINT.
    DATA: BEGIN OF TFPLTDR OCCURS 5.
            INCLUDE STRUCTURE FPLTDR.
    DATA: END   OF TFPLTDR.
    DATA: TADDI_PRINT TYPE ADDI_SO_PRINT_ITAB WITH HEADER LINE.
    TYPES:BEGIN OF ty_orders ,
         xblnr    LIKE  mkpf-xblnr,       "delivery number
         erfmg    LIKE  mseg-erfmg,       "goods issue quantity
         custname LIKE  kna1-name1,       "customer name
         bstnk    LIKE  vbak-bstnk,       "purchase order number
         ean11    LIKE  vbap-ean11,       "upc
         kdmat    LIKE  vbap-kdmat,       "customer material code
         arktx    LIKE  vbap-arktx,       "description
         csrno    LIKE  kna1-kunnr,       "customer service rep number
         spras    LIKE  kna1-spras,       "customer language key
         csrname  LIKE  kna1-name1,       "customer service rep name
         csremail LIKE  adr6-smtp_addr,   "csr email
         csrphone LIKE  kna1-telf1,       "csr telephone
         csrext   LIKE  adrc-tel_extens,  "csr extension
         csrfax   LIKE  kna1-telfx,       "csr fax
         total    LIKE  lips-lfimg,       "cut quantity
         ldate(18)    TYPE c,
       END OF ty_orders.
    CONSTANTS: c_kschl_order LIKE nast-kschl
                             VALUE 'ZUS0',
                c_kschl_order1 LIKE nast-kschl
                             VALUE 'ZUS1',            c_parvw_shipto LIKE vbpa-parvw
                             VALUE 'WE',
                c_parvw_csr    LIKE vbpa-parvw
                             VALUE 'ZS',
                 c_eng(1)       TYPE c VALUE 'E',
                 c_sep(1)       TYPE c VALUE '/',
                 c_sale(25) type c VALUE 'Sales Order'.
    DATA: WA_VBAK TYPE VBAK,
          tbl_ord TYPE ty_orders OCCURS 0 WITH HEADER LINE,
          w_csrname(30)  TYPE c,
         w_csrno(30)    TYPE c,
         w_email    LIKE adr6-smtp_addr,
         f_shipto_found     TYPE c,
         w_custname(30) TYPE c,
         w_month(2),
         w_ldate(18),
         w_total LIKE lips-lfimg,
         w_lines        TYPE i VALUE 0,
         f_mail(1)  TYPE c,
         cnt_1          TYPE i VALUE 0,
         cnt_2          TYPE i VALUE 0,
         tbl_otf     LIKE itcoo OCCURS 0 WITH HEADER LINE,
         w_type(25)     TYPE c,
         st_doc_data   LIKE sodocchgi1,
         tbl_objtxt    LIKE solisti1 OCCURS 10 WITH HEADER LINE,
         tbl_line      LIKE tline OCCURS 0 WITH HEADER LINE,
         tbl_attach    LIKE solisti1 OCCURS 10 WITH HEADER LINE,
         tbl_objhead   LIKE solisti1 OCCURS 10 WITH HEADER LINE,
         tbl_proc_para LIKE soparai1 OCCURS 10 WITH HEADER LINE,
         tbl_maillist  LIKE somlreci1 OCCURS 10 WITH HEADER LINE,
         tbl_pack_list LIKE sopcklsti1 OCCURS 10 WITH HEADER LINE,
         tbl_cpo      LIKE itcpo OCCURS 0 WITH HEADER LINE,"SAPscript output
                                                                " interface
         tbl_cpp LIKE itcpp OCCURS 0 WITH HEADER LINE,"SAPscript output
                                                       " parameters
         tbl_smtp  TYPE szadr_adsmtp_line OCCURS 0 WITH HEADER LINE,
         tbl_cdhdpos LIKE cdshw OCCURS 0 WITH HEADER LINE,
         tbl_cdpos LIKE cdshw OCCURS 0 WITH HEADER LINE,
         wrk_lines LIKE sy-tabix,
         hltlines   TYPE i,
         off1       TYPE p,
         fle1(2)    TYPE p,
         fle2(2)    TYPE p,
         htabix     LIKE sy-tabix,
         hfeld(500) TYPE c.
    FORM ENTRY USING RETURN_CODE US_SCREEN.
    if sy-tcode = 'VA01'.
      IF nast-kschl = c_kschl_order.
      SELECT SINGLE * FROM VBAK INTO WA_VBAK WHERE vbeln = nast-objky.
      IF SY-SUBRC = 0.
      CLEAR RETCODE.
      XSCREEN = US_SCREEN.
      PERFORM PROCESSING USING us_screen.
      IF RETCODE NE 0.
        RETURN_CODE = 1.
      ELSE.
        RETURN_CODE = 0.
      ENDIF.
       ELSE.
          retcode = sy-subrc.
          syst-msgid = 'ZVERROR'.
          syst-msgno = '000'.
          syst-msgty = 'E'.
          syst-msgv1 = NAST-KSCHL.
         syst-msgv1 = 'Sales Order cut letter
                       for this order already issued'.
         syst-msgv2 = ' '.
          PERFORM protocol_update.
        ENDIF.
    ELSE.
        CLEAR retcode.
        xscreen = us_screen.
        PERFORM processing USING us_screen.
        IF retcode NE 0.
          return_code = 1.
        ELSE.
          return_code = 0.
        ENDIF.
      ENDIF.
    endif.
    ENDFORM.
          FORM PROCESSING                                               *
    FORM PROCESSING USING proc_screen.
    CASE nast-kschl.
        WHEN c_kschl_order.
          PERFORM get_orders.
          CHECK retcode = 0.
          PERFORM openform USING proc_screen vbak-landtx.
          CHECK retcode = 0.
          PERFORM layout.
          CHECK retcode = 0.
          CHECK proc_screen NE 'X'.
          w_type = c_sale.
          PERFORM send_email USING proc_screen.
      WHEN c_kschl_order1.
         PERFORM get_orders.
         CHECK retcode = 0.
         CHECK proc_screen NE 'X'.
         w_type = c_sale.
         PERFORM send_email USING proc_screen.
       WHEN OTHERS.
          retcode = 1.
          syst-msgid = 'E0'.
          syst-msgno = '430'.
          syst-msgty = 'E'.
          PERFORM protocol_update.
      ENDCASE.
      IF retcode EQ 0.
        syst-msgid = '69'.
        syst-msgno = '254'.
        syst-msgty = 'S'.
        syst-msgv1 = nast-kschl.
        PERFORM protocol_update.
      ELSE.
        syst-msgid = 'CKCC'.
        syst-msgno = '036'.
        syst-msgty = 'E'.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.
          FORM PROTOCOL_UPDATE                                          *
          The messages are collected for the processing protocol.       *
    FORM PROTOCOL_UPDATE.
      IF xscreen EQ space.
        CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
           EXPORTING
                MSG_ARBGB = SYST-MSGID
                MSG_NR    = SYST-MSGNO
                MSG_TY    = SYST-MSGTY
                MSG_V1    = SYST-MSGV1
                MSG_V2    = SYST-MSGV2
                MSG_V3    = SYST-MSGV3
                MSG_V4    = SYST-MSGV4
           EXCEPTIONS
                OTHERS    = 1.
       ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    ENDFORM.
    *&      Form  get_orders
          text
    -->  p1        text
    <--  p2        text
    FORM get_orders.
    DATA : f_csr_found        TYPE c.
    SELECT SINGLE vbeln vkorg vdatu bstnk kunnr
        FROM   vbak
        INTO  (vbak-vbeln,vbak-vkorg,vbak-vdatu,vbak-bstnk,vbak-kunnr)
        WHERE vbeln EQ nast-objky.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'VN'.
        syst-msgno = '203'.
        syst-msgty = 'E'.
        syst-msgv1 = 'VBAK'.
        syst-msgv2 = sy-subrc.
        PERFORM protocol_update.
      ENDIF.
      SELECT vbeln posnr matnr pmatn arktx abgru kdmat werks
      FROM vbap
      INTO (vbap-vbeln,vbap-posnr,vbap-matnr,vbap-pmatn,
    vbap-arktx,vbap-abgru,vbap-kdmat,vbap-werks)
      WHERE vbeln = vbak-vbeln
      AND abgru NE space "select items havng Rejection Reason
      and PSTYV NE 'ZHDR'.
    to check whether the reason for rejection was picked from the
    managed codes tables
    data: war_abgru type abgru,
          w_exist type c.
    clear : war_abgru, w_exist.
      select single abgru  from ZMAT_REJ002
                    into war_abgru
                    where vkorg = vbak-vkorg
                    and kunnr <> vbak-kunnr
                    and MATNR = vbap-matnr
                    and datef <= vbak-vdatu
                    and datet >= vbak-vdatu.
       if sy-subrc <> 0.
             select single abgru from ZMAT_REJ003
                              into war_abgru
                              where vkorg = vbak-vkorg
                              and kunnr <> vbak-kunnr
                              and MATNR = vbap-matnr
                              and datef <= vbak-vdatu
                              and datet >= vbak-vdatu.
             if sy-subrc <> 0.
                    select single abgru from ZMAT_REJ001
                              into war_abgru
                              where vkorg = vbak-vkorg
                              and werks <> vbap-werks
                              and matnr = vbap-matnr
                              and datef <= vbak-vdatu
                              and datet >= vbak-vdatu.
                    if sy-subrc <> 0.
                         select single abgru from ZMAT_REJ004
                                             into war_abgru
                                             where vkorg = vbak-vkorg
                                             and matnr = vbap-matnr
                                             and datef >= vbak-vdatu
                                             and datet <= vbak-vdatu.
                         if sy-subrc <> 0.
                         else.
                         w_exist = 'X'.
                         endif.
                   else.
                   w_exist = 'X'.
                   endif.
             else.
             w_exist = 'X'.
             endif.
       else.
       w_exist = 'X'.
       endif.
    if w_exist = 'X'.
    end for check from managed codes table
    *to find the quantity fields
        SELECT SINGLE wmeng bmeng
        FROM vbep
        INTO (vbep-wmeng,vbep-bmeng)
        WHERE vbeln EQ vbap-vbeln
        AND   posnr EQ vbap-posnr.
    *to get info about the customer
        SELECT SINGLE kunnr
        FROM vbpa
        INTO vbpa-kunnr
        WHERE  vbeln EQ vbak-vbeln
        AND    parvw EQ c_parvw_shipto.
         IF sy-subrc EQ 0.
          f_shipto_found = 'X'.
          SELECT SINGLE name1 spras
            FROM kna1
            INTO (kna1-name1,kna1-spras)
            WHERE kunnr EQ vbpa-kunnr.
          IF sy-subrc EQ 0.
            w_custname = kna1-name1.
            CLEAR kna1-name1.
          ENDIF.
         ENDIF.
         SELECT SINGLE kunnr
        FROM vbpa
        INTO vbpa-kunnr
        WHERE vbeln EQ vbak-vbeln
        AND   parvw EQ c_parvw_csr.
        IF SY-SUBRC EQ 0.
         f_csr_found = 'X'.
          SELECT SINGLE kunnr name1 name2 adrnr
           FROM kna1
           INTO (kna1-kunnr,kna1-name1,kna1-name2,
                 kna1-adrnr)
           WHERE  kunnr EQ vbpa-kunnr.
          IF sy-subrc EQ 0.
            w_csrno = kna1-kunnr.
            w_csrname = kna1-name1.
            CLEAR kna1-name1.
               SELECT SINGLE tel_number tel_extens fax_number
                 FROM adrc
                 INTO (adrc-tel_number,adrc-tel_extens,
       adrc-fax_number)
                 WHERE addrnumber EQ kna1-adrnr.
            CLEAR: adr6, w_email.
            SELECT SINGLE * FROM adr6 WHERE addrnumber = kna1-adrnr.
            IF sy-subrc = 0.
              w_email = adr6-smtp_addr.
            ENDIF.
          ENDIF.
        ENDIF.
    *to get the date format in french
        IF kna1-spras NE c_eng.
          w_month = sy-datum+4(2).
          SELECT SINGLE ltx
            FROM t247
            INTO t247-ltx
            WHERE spras EQ kna1-spras
            AND mnr EQ w_month.
          CONCATENATE sy-datum+6(2)
                      t247-ltx
                      sy-datum+0(4)
                      INTO w_ldate
                      SEPARATED BY space.
          ELSE.
          CONCATENATE sy-datum+4(2)
                      sy-datum+6(2)
                      sy-datum+0(4)
                      INTO w_ldate
                      SEPARATED BY c_sep.
        ENDIF.
        w_total = vbep-wmeng - vbep-bmeng.
         IF w_total GT 0.
         PERFORM fill_orders.
        ELSE.
          IF vbap-abgru NE space.
            w_total = vbep-wmeng.
            PERFORM fill_orders.
          ENDIF.
        ENDIF.
        CLEAR vbap.
        endif.           " check for w_exist for Managed Codes entry
    ENDSELECT.
    IF tbl_ord[] IS INITIAL.
        retcode = 1.
        syst-msgid = 'FZ'.
        syst-msgno = '027'.
        syst-msgty = 'E'.
        PERFORM protocol_update.
      ENDIF.
      IF f_csr_found IS INITIAL.
        syst-msgid = '8B'.
        syst-msgno = '127'.
        syst-msgty = 'W'.
        syst-msgv1 = c_parvw_csr.
        PERFORM protocol_update.
      ENDIF.
      IF f_shipto_found IS INITIAL.
        syst-msgid = '8B'.
        syst-msgno = '127'.
        syst-msgty = 'W'.
        syst-msgv1 = c_parvw_shipto.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " get_orders
    *&      Form  layout
          text
    -->  p1        text
    <--  p2        text
    FORM layout.
    SORT tbl_ord BY bstnk kdmat.
      LOOP AT tbl_ord.
        AT FIRST.
          PERFORM writeform_text.
        ENDAT.
        PERFORM writeform.
        AT LAST.
          PERFORM writeform_footer.
        ENDAT.
      ENDLOOP.
      CLEAR : cnt_1,cnt_2.
      PERFORM closeform.
    ENDFORM.                    " layout
    *&      Form  openform
          text
    FORM openform USING us_screen us_country.
    DESCRIBE TABLE tbl_ord LINES w_lines.
      IF w_lines EQ 0.
        retcode    = '1'.
        syst-msgid = 'FE'.
        syst-msgno = '078'.
        syst-msgty = 'E'.
        PERFORM protocol_update.
      ENDIF.
      CHECK retcode EQ 0.
    INCLUDE zrvadopfo.
    ENDFORM.                    " openform
    *&      Form  send_email
          text
         -->P_PROC_SCREEN  text
    FORM send_email USING    PROC_SCREEN.
    f_mail = 'X'.
      PERFORM openform USING proc_screen vbak-landtx.
      LOOP AT tbl_ord.
        AT FIRST.
          PERFORM writeform_text.
        ENDAT.
        PERFORM writeform.
        AT LAST.
          PERFORM writeform_footer.
        ENDAT.
      ENDLOOP.
      CLEAR cnt_2.
      PERFORM closeform.
      CALL FUNCTION 'CONVERT_OTF'
           EXPORTING
                format                = 'PDF'  "'ASCII'
           IMPORTING
                bin_filesize          = st_doc_data-doc_size
           TABLES
                otf                   = tbl_otf
                lines                 = tbl_line
           EXCEPTIONS                                           "DEVK912166
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                OTHERS                = 4.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'OA'.                                      "DEVK912166
        syst-msgno = '186'.                                     "DEVK912166
        syst-msgty = 'E'.                                       "DEVK912166
        PERFORM protocol_update.
      ENDIF.
      REFRESH tbl_objtxt.
      CLEAR tbl_objtxt.
      CLEAR tbl_proc_para.
      REFRESH tbl_proc_para.
      CLEAR tbl_maillist.
      REFRESH tbl_maillist.
      CLEAR tbl_pack_list.
      REFRESH tbl_pack_list.
      st_doc_data-obj_name   = 'Sales Order Cut Letter'.
      st_doc_data-obj_langu   = 'E'.                            "DEVK905849
      st_doc_data-sensitivty  = 'F'.                            "DEVK905849
      st_doc_data-obj_prio    =  1.                             "DEVK905849
      CONCATENATE w_type 'Cut Letter' INTO          "#EC NOTEXT
                                  st_doc_data-obj_descr  SEPARATED BY space.
      DATA w_line(3) TYPE c.
      PERFORM format_pdf.                                       "DEVK905849
      concatenate VBAK-VBELN '.PDF' into tbl_objhead.
    tbl_objhead = 'Sales Order Cut Letter.PDF'.
      APPEND tbl_objhead.
           "DEVK905849
      CLEAR wrk_lines.
      DESCRIBE TABLE tbl_attach LINES wrk_lines.
    fields needed for email
      tbl_maillist-com_type = 'INT'.
      tbl_maillist-receiver =  w_email.
      tbl_maillist-rec_type = 'U'.
      APPEND tbl_maillist.
    send email
      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                                      STARTING NEW TASK 'MAIL'
           EXPORTING
                document_data              = st_doc_data
                document_type              = 'PDF'
                COMMIT_WORK                = 'X'    " added after ECC6.0 upgrade
           TABLES
                object_header              = tbl_objhead
                object_content             = tbl_objtxt
                receivers                  = tbl_maillist
           EXCEPTIONS                                           "DEVK912166
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'ZA_G'.                                    "DEVK912166
        syst-msgno = '922'.                                     "DEVK912166
        syst-msgty = 'E'.                                       "DEVK912166
        syst-msgv1 = sy-subrc.                                  "DEVK912166
        syst-msgv2 = tbl_smtp-adsmtp-smtp_addr.                 "DEVK912166
        PERFORM protocol_update.
        syst-msgid = 'VW'.
        syst-msgno = '001'.
        syst-msgty = 'E'.
        syst-msgv1 = 'Print successful:email Recepient Invalid'."#EC NOTEXT
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " send_email
    *&      Form  fill_orders
          text
    -->  p1        text
    <--  p2        text
    FORM fill_orders.
    tbl_ord-bstnk    = vbak-bstnk.
      tbl_ord-kdmat    = vbap-kdmat.
      tbl_ord-xblnr    = vbak-vbeln.
      tbl_ord-ean11    = vbap-pmatn.
      tbl_ord-arktx    = vbap-arktx.
      tbl_ord-csrno    = w_csrno .
      tbl_ord-csremail = w_email.
      tbl_ord-spras    = kna1-spras .
      tbl_ord-csrphone = adrc-tel_number.
      tbl_ord-csrfax   = adrc-fax_number.
      tbl_ord-csrext   = adrc-tel_extens.
      tbl_ord-total    = w_total.
      tbl_ord-custname = w_custname.
      tbl_ord-csrname  = w_csrname .
      tbl_ord-ldate    = w_ldate.
      APPEND tbl_ord.
      CLEAR tbl_ord.
      CLEAR w_total.
      CLEAR w_ldate.
    ENDFORM.                    " fill_orders
    *&      Form  writeform_text
          text
    -->  p1        text
    <--  p2        text
    FORM writeform_text.
    CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                element = 'WTEXT'
                window  = 'WINDOW2'
           EXCEPTIONS
                element = 1
                window  = 2.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'EBR'.
        syst-msgno = '056'.
        syst-msgty = 'E'.
        syst-msgv1 = 'WTEXT'.
        syst-msgv2 = 'WINDOW2'.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " writeform_text
    *&      Form  writeform
          text
    -->  p1        text
    <--  p2        text
    FORM writeform.
    CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                element = 'EMAIN'
                window  = 'MAIN'
           EXCEPTIONS
                element = 1
                window  = 2.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'EBR'.
        syst-msgno = '056'.
        syst-msgty = 'E'.
        syst-msgv1 = 'WTEXT'.
        syst-msgv2 = 'WINDOW2'.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " writeform
    *&      Form  writeform_footer
          text
    -->  p1        text
    <--  p2        text
    FORM writeform_footer.
    IF nast-spras = 'N'.
        CALL FUNCTION 'WRITE_FORM'
             EXPORTING
                  element = 'FOOTER'
                  window  = 'MAIN'
             EXCEPTIONS
                  element = 1
                  window  = 2.
      ENDIF.
      CALL FUNCTION 'WRITE_FORM'
           EXPORTING
                element = 'WFOOTER'
                window  = 'WINDOW12'
           EXCEPTIONS
                element = 1
                window  = 2.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'EBR'.
        syst-msgno = '056'.
        syst-msgty = 'E'.
        syst-msgv1 = 'WFOOTER'.
        syst-msgv2 = 'WINDOW12'.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " writeform_footer
    *&      Form  closeform
          text
    -->  p1        text
    <--  p2        text
    FORM closeform.
    CALL FUNCTION 'CLOSE_FORM'
           TABLES
                otfdata                  = tbl_otf
           EXCEPTIONS
                unopened                 = 1
                bad_pageformat_for_print = 2
                OTHERS                   = 3.
      IF sy-subrc NE 0.
        retcode = sy-subrc.
        syst-msgid = 'PS'.
        syst-msgno = '005'.
        syst-msgty = 'E'.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.                    " closeform
    *&      Form  format_pdf
          text
    -->  p1        text
    <--  p2        text
    FORM format_pdf.
    FIELD-SYMBOLS <fs>.
      DESCRIBE TABLE tbl_line    LINES  hltlines.
    DESCRIBE FIELD tbl_line    LENGTH fle1 IN BYTE MODE . Defect#1579-
    DESCRIBE FIELD tbl_objtxt  LENGTH fle2 IN BYTE MODE . Defect#1579-
    Start of Defect#1579+
      DESCRIBE FIELD tbl_line    LENGTH fle1 IN CHARACTER MODE.
      DESCRIBE FIELD tbl_objtxt  LENGTH fle2 IN CHARACTER MODE.
    End of Defect#1579+
      CLEAR   tbl_objtxt.
      REFRESH tbl_objtxt.
      LOOP AT tbl_line.
        htabix = sy-tabix.
        MOVE tbl_line TO hfeld+off1.
        IF htabix = hltlines.
          fle1 = strlen( tbl_line ).
        ENDIF.
        off1 = off1 + fle1.
        IF off1 GE fle2.
          CLEAR tbl_objtxt.
          tbl_objtxt = hfeld(fle2).
          APPEND tbl_objtxt.
          SHIFT hfeld BY fle2 PLACES.
          off1 = off1 - fle2.
        ENDIF.
        IF htabix = hltlines.
          IF off1 GT 0.
            CLEAR tbl_objtxt.
            tbl_objtxt = hfeld(off1).
            APPEND tbl_objtxt.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " format_pdf
    ANy Suggestion or help will be appreciated!
    Regards,
    Kittu
    Edited by: Kittu on Jun 30, 2008 12:32 PM

    Hello Julie Waller,
    Very Good evening!
    Thank you very much for your response!
    Sometimes...I miss the basic things and start concentarcting on typical ways to fix the issue. ....which will only make my issue critical. 
    Hello Sathya,
    Thank you for your response!
    POints are rewarded..
    Have a great day ahead!
    Regards,
    Kittu

  • Regarding output type for billing doc

    i have one billing doc. i want to find out type for that billing doc. through that i need to find the program name and form name.
    i have lot of out put types. In that how to find the out put for my requirement

    HI pavan,
    It is not a good idea to check with the Program name or Layout set name without knowing the OUtput types because, Billing docu number can work with multiple Output types...you never know it. So in your case to check TNAPR table would be the best option...but again it is never recomended to go ahead without knowing the output type.
    And for one Output type there will be only one smart form/ script form and a Zprogram will be configured.
    It is not possible to configure multiple Smart forms for a same Output type.
    You can use single smart form in Multiple Output types but not single output type for diff Smart forms.
    Try to either know the smart form/script from name or the Zprogram so that you can search it in TNAPR table or by using Where used list icon.
    Regards,
    Kittu

  • CREDIT MEMO OUTPUT TYPE !

    I  got a stuff in www.****************  where they have used NEU as message type / output type in case of automatic idoc generation when PO is created or changed.
    I have a requirement for automatic idoc generation when credit memo is created...i have selected application V3 ..in NACE
    What will be the output type here ?

    check this link. it has given how to set output type for pdf/smart form, I think same output type need to be used but for Idoc type GSVERF
    http://help.sap.com/bp_bblibrary/500/Documentation/G93_BB_ConfigGuide_EN_US.doc
    In this step you define a Output Determination Procedere for the Billing Documents (Credit Memos) creating on Sales return Process.

  • Finding output type and form for the transaction

    hi all,
       i have a problem finding output type and form for the transaction j1iv .actually i need to find the standard output type and form name for the transaction j1iv. how can we do it.

    Hi Abinash,
         Go through the following steps.
                     1 . Go to the transaction <b>NACE.</b>
                     2. You will be able to see the <b>Application and description</b> tab over  
                         there. Select the Application for which you need the output type.
                     3. After selecting the Application..on the top you can see the tab--
                        output types...click in that..here you will be able to see all the <b>output
                        types for that application.</b>
                    4. Now select a output type ..and on the left side u will be able to see
                       the tab for processing routines...double click on it...
                    5. Here you will be able to see the standard SAP program...the form
                       routine...the form..attached to it..
                Please Reward..if helpful..
    Regards,
    Himanshu.

  • How to configure a interactive pdf form to an output type

    Hi all,
       The user has to open the form, do some manual entry in the form and finally print it. For this I have created a Webdynpro application with the adobe pdf form linked to it. It can be teted by testing the webdynpro application. But can it be linked to some output type, so that when the output type is triggered, the form is opened and user can do some corrections and print it. Please help me in this regard.
    Thanks
    Thivya

    Hello. I dont understand why would you do such a thing.
    First option is to link it. so if a user e.g. changes the order, he will get the form preview which he can fill and then print as you wanted. All this in ERP and print preview for the form in adobe reader.
    Or you can create a WD app, which must be manually opened, form created, form changed and printed.
    I hope it helps or you can try to clarify if i don´t understand your problem.

  • How to find output type givenSapscript form name and print program name

    Hi  Experts,
           Can anyone tell me how to find the output type of  a sapscript form if the print program name and sapscript form name is 
    known.

    Hi,
    There are two ways:
    1. Use table TNAPR .. Here is table give PGNAM as your print program name and FONAM as form name.. Now the field KSCHL will be the output type assigned to your script.
    2. You can also check the NACE t-code.. In that select a application(Corresponds to your area) -> click on Output types tab -> Here you get list of output type.. You need click on Processing Routine folder to get all other info..

  • Smart Form Download in PDF

    Hello All ,
                   I have created one smart form and provided option to download the same in PDF. My Problem is that is  downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
    I am using the following code can some one suggest me the what need to do the change after both option will work at  the same time.
    Please Note I have also made the use of property
    SSFCOMPOP-TDNOPREV
    But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
    DATA :
          WA_FMNM        TYPE  TDSFNAME,      " Smart Forms: Form Name
          WA_CNTL        TYPE  SSFCTRLOP,     " FOR PDF PRINT
          WA_POP         TYPE  SSFCOMPOP,     " printer name
          T_OTF_FROM_FM  TYPE  SSFCRESCL,
          T_PDF_TAB      LIKE  TLINE OCCURS 0 WITH HEADER LINE,
          T_OTF          TYPE  SSFCRESCL-OTFDATA,
          W_BIN_FILESIZE TYPE  I, " BINARY FILE SIZE
          W_FILE_NAME    TYPE  STRING,
          WA_FNMD        TYPE  RS38L_FNAM.    " Name of Function Module
    DATA:
          W_FORM_NAME    TYPE TDSFNAME,
          W_FMODULE      TYPE RS38L_FNAM,
          W_CPARAM       TYPE SSFCTRLOP,
          W_OUTOPTIONS   TYPE SSFCOMPOP,
          W_FILE_PATH    TYPE STRING,
          W_FULL_PATH    TYPE STRING.
    SMART FORM FUNCTION MODULE
    WA_FMNM  =  TEXT-113.
    W_FORM_NAME  =  TEXT-113.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = WA_FMNM
       IMPORTING
          FM_NAME                  = WA_FNMD
       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.
    END FORM
    WA_CNTL-GETOTF     =  'X'.
    WA_CNTL-NO_DIALOG  =  'X'.
    WA_CNTL-PREVIEW    =  SPACE .
    WA_POP-TDDEST      = 'LP01'.
    CALL FUNCTION WA_FNMD
    EXPORTING
        CONTROL_PARAMETERS         =  WA_CNTL
       OUTPUT_OPTIONS             = WA_POP
        V_APPLN_OB                 = V_APPLN_OB
        V_KUNNR_OB                 = V_KUNNR_OB
        V_EBELN                    = V_EBELN
        V_CAT_NAME                 = V_CAT_NAME
        V_VAR_NAME                 = V_VAR_NAME
    IMPORTING
      JOB_OUTPUT_INFO              = T_OTF_FROM_FM
      TABLES
        T_ZCNC18                   =  T_ZCNC18
    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.
    T_OTF[] = T_OTF_FROM_FM-OTFDATA[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
    IMPORTING
       BIN_FILESIZE                 = W_BIN_FILESIZE
      TABLES
        OTF                         = T_OTF
        LINES                       = T_PDF_TAB
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 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.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    EXPORTING
        PROMPT_ON_OVERWRITE = 'X'
    CHANGING
        FILENAME    = W_FILE_NAME
        PATH        = W_FILE_PATH
        FULLPATH    = W_FULL_PATH
    EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        OTHERS = 4 .
    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 'GUI_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE  = W_BIN_FILESIZE
      FILENAME      = W_FULL_PATH
      FILETYPE      = 'BIN'
      APPEND        = ' '
      WRITE_FIELD_SEPARATOR = ''
      HEADER                = '00'
      TRUNC_TRAILING_BLANKS = ''
      WRITE_LF              = 'X'
      COL_SELECT            = ''
      COL_SELECT_MASK       = ''
      DAT_MODE              = ''
      CONFIRM_OVERWRITE     = ''
      NO_AUTH_CHECK         = ''
      CODEPAGE              = ''
      IGNORE_CERR           = ABAP_TRUE
      REPLACEMENT           = '#'
      WRITE_BOM             = ''
      TRUNC_TRAILING_BLANKS_EOL = 'X'
    TABLES
      DATA_TAB              = T_PDF_TAB
    EXCEPTIONS
      FILE_WRITE_ERROR        = 1
      NO_BATCH                = 2
      GUI_REFUSE_FILETRANSFER = 3
      INVALID_TYPE            = 4
      NO_AUTHORITY            = 5
      UNKNOWN_ERROR           = 6
      HEADER_NOT_ALLOWED      = 7
      SEPARATOR_NOT_ALLOWED   = 8
      FILESIZE_NOT_ALLOWED    = 9
      HEADER_TOO_LONG         = 10
      DP_ERROR_CREATE         = 11
      DP_ERROR_SEND           = 12
      DP_ERROR_WRITE          = 13
      UNKNOWN_DP_ERROR        = 14
      ACCESS_DENIED = 15
      DP_OUT_OF_MEMORY = 16
      DISK_FULL = 17
      DP_TIMEOUT = 18
      FILE_NOT_FOUND = 19
      DATAPROVIDER_EXCEPTION = 20
      CONTROL_FLUSH_ERROR = 21
      OTHERS = 22   .
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Swati Namdev

    Hi Swati,
    Pls refer the below code:
    TABLES: ekko.
    DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
    DATA: wf_name TYPE rs38l_fnam.
    DATA: wf_so1.
    *For PDf Conversions
    DATA: int_tab_otf_data TYPE ssfcrescl,
          int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
          int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
          file_size TYPE i,
          bin_filesize TYPE i,
          file_name TYPE string,
          file_path TYPE string,
          full_path TYPE string,
          cparam TYPE ssfctrlop,
          outop TYPE ssfcompop.
    **Preview not allowed.
    outop-tddest = 'LP01'.
    cparam-no_dialog = 'X'.
    cparam-preview = ' '.
    cparam-getotf = 'X'.
    GET PARAMETER ID 'EBLEN' FIELD wf_so1.
    SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
    int_itab WHERE ebeln = wf_so1.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'Z_SMARTFORM_FINAL2'
      IMPORTING
        fm_name            = wf_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 wf_name
      EXPORTING
        control_parameters = cparam
        output_options     = outop
        user_settings      = space
      IMPORTING
        job_output_info    = int_tab_otf_data
      TABLES
        int_itab           = int_itab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    int_tab_otf_final[] = int_tab_otf_data-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format        = 'PDF'
        max_linewidth = 132
      IMPORTING
        bin_filesize  = bin_filesize
      TABLES
        otf           = int_tab_otf_final
        lines         = int_pdf_tab.
    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 METHOD cl_gui_frontend_services=>file_save_dialog
      CHANGING
        filename = file_name
        path     = file_path
        fullpath = full_path.
    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 'GUI_DOWNLOAD'
      EXPORTING
        bin_filesize = bin_filesize
        filename     = full_path
        filetype     = 'BIN'
      IMPORTING
        filelength   = file_size
      TABLES
        data_tab     = int_pdf_tab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Ramneet Ahuja

  • Printing issue in smartform with output type

    Hi ,
    I am facing issue while I am taking print from zebra printer.
    I am trying to take a print from MB90 but its not coming but its giving status 'processed' and same from the spool, in spool its showing status complete but not giving any printout.
    if I m attaching  my smartform with another output type which already working for another label(smartform), then its giving print.
    So, what I want to know..
    Its can be a problem with output type config or from basis side.
    Please help.
    Thanks,
    Sandeep

    well i have seen setting are correct but having one issue it doesnt trigger automatically I do it manually from MB90 and rest of the things are correct becaoz i have seen while debug its going correct form from driver program, when i am runniing from MB90 manually .
    Thanks,
    Sandeep

Maybe you are looking for