Regarding Smartforms and Print Programs in MM

HI
ALL
I need to customise the all  the standard smartforms  Purchase Requisition , Purchase Order,Goods receipt,Goods issue,Goods return in MM .For this I need the standard smartforms and driven programs(Print Programs) for these . send me the smartforms and printprograms for these.
Regards
Venkat

Hi,
  You can goto 'NACE' transaction and select the Required Application then Click on OUTPUT TYPES and select the required Output type and click on PROCESSING ROUTINES.
  In this way you can get the standard Smartforms.
Hope this may be helpful,
Regards,
Sravanthi

Similar Messages

  • Standard smartform and print program for sales document

    HI All,
    Is there a standard smartform and print program for sales document or sales order. If someone has worked with it do reply.

    Hi Shashank,
    What exactly you would like to print for Sales Orders in Smartforms..?
    regards,
    Ram.

  • Smartforms and print program

    Is there a way or transaction to tell the print program associated with a standard SAP smartform. The smartform is WB2_CONTRACT_VENDOR

    Hi Amrutha,
    Please note that the smartform WB2_CONTRACT_CUSTOMER will be using in trading contracts package "WB2B". I think you have to assign this form to O/P determination for trading contracts thru customization. then that will crate an entry in TNAPR table.
    Have you implemented Global Trading ? If so then you can see the print program for this form in table TNAPR.
    Hope this will help you.
    Lanka
    Message was edited by: Lanka Murthy

  • Standard samrtforms and print program for  Bill of Lading in delivery

    Is there a standard smartform  and print program for  Bill of Lading for delivery?

    Hi
    Check this:
    Print Program: RLE_DELNOTE.
    Smartform:   LE_SHP_DELNOTE.
    Regards,
    Vishwa.

  • How to Import customized internal table to smartform from Print Program

    Hi Gurus,
    I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
    With regards,
    S.Saravanan

    There is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
    Regards,
    Raymond

  • Daily & Monthly Backlog Reports and Printing program

    •     <b>Labeling program for Deliveries</b>: This program picks all deliveries created/updated on the current day, validates them by checking whether they have the required labeling information. If the program finds that the labeling information is missing, it populates WMS structures (header & detail) for further.
    •     <b>Daily & Monthly Backlog Reports and Printing program</b>: This program calls 2 separate reports (Daily & Qtrly. Backlog Reports), based on user selection, and directly prints the reports as well as converts them to PDF format and emails them as attachments to the MD.
              Please provide me the solution.

    For First program :
    Use table LIKP (SD Document: Delivery Header Data) & LIPS(item Data) for fetch inf all the data for selected date use field ERZET(Entry time) & ERDAT(Date creation of record) for created deliveries & refer TABLES - CDPOS and CDHDR for modified deliveries
    For Second object:
    Call multiple programs by using SUBMIT <program> with selection screen params.
    Print as per requirement by passing print parameters to Structure PRI_PARAMS &
       call function 'GET_PRINT_PARAMETERS'                     
       exporting destination = liprintr                         
                 mode        = 'CURRENT'                        
                 no_dialog   = 'X'                              
       importing out_parameters = pri_params.                       
    *To Convert ABAP List and SAP Script to PDF files use program - "RSTXPDFT4"
    ALSO REFER this nice weblog >
    /people/erwan.lebrun/blog/2007/04/16/tips-tricks-email-fax-through-the-same-output-type
    Hope it will help.
    Vishal
    Message was edited by:
            Vishal Tyagi

  • Attaching smartforms and print prog to invoice

    hi
    ive developed a smartform and a print program.
    da program has a selection screen dat asks user for doc number(vbeln).
    it den displays data in da smartform.
    now ive to attach it to va02.
    wen i attach it using v/40 output type(RD000) program name : zinvoice and pdf/smartform: zinv .and try to get print preview using vf03 da preview doesnt appear.also wen i click on print it shows message "output cannot be issued".
    can ny1 suggest wat da problem is and how to resolve it...
    points 'll b rewarded...
    rgds
    Message was edited by:
            abapuser

    1.
    How did u assigned the output type in NACE.
    2.
    did u go through the form routines of data/transfer copy controls in VOFM .
    if its VA02 and VF02 then VTFA has to be used for the same in setting the output type .
    if option 2 is not ur case then check with ur functional consultant as to which requirement this output is configured in the nace and in procedures.
    o/p cannot be issued is not able to pick the output type for the form and the print program.
    This output type has to be configured in NACE first of all.
    Then to test the invoice enable this output type for that vbeln number in GOTo-_header->output -> and enable the output type.
    regards,
    vijay

  • Reg: Smart forms and print programs

    Hi
    I would like to locate the print programs and the corresponding smart forms. say for invoice we have a smart form available and how to track the print program for it. pls advise.
    thkx
    Prabhu

    Hi Prabhu,
          You can track the Program through mainintaing table TNAPR.  TNAPR is the table which is having entries for "Processing Programs for output".
    Here you have fields like
    pgnam - Program Name
    sform -   Smartform Name
    fonam -  Script Name
    kschl -  Output type
    Here,You can maintain form against a program name.
    Hope you are clear.
    Regards,
    Siddhesh Sanghvi.

  • Is medruck form available in smartform including print program

    Can any one tell me a standard form name & print program name in smartforms for medruck in sap scripts.

    Hi
    For Purchase Order
    PUCHASE ORDER
    Output type         : NEU
    ScriptForm Name     : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name      : /SMB40/MMPO_L
    copy the std form or smartform and use it after attaching the same in NACE tcode
    Reward points if useful
    Regards
    Anji

  • How to assign smartform to print program for payment advice

    Hi!
    There is already a print program and a smartform for payment advice. This was working before as I was told. But when I checked table TNAPR, there is no entry in the table with the program name and neither for the smartform. How can I use them together again? This is used in tcode F110 so I could not use NACE.
    Any advise? Thanks!
    Cholen

    Hi Cholen,
    Configuration to assign Program and Form names for F110 is done in FBZP Transaction.
    Please Check under Paying company codes tab and Pmnt Methods in company Code tab where Smart form and other text modules are assigned.
    Under Pmnt methods in a country Print program is assigned.
    Thanks
    Sri

  • Develop a form and print program using VBAP, VBAK, MRKT.

    I have 2 tables VBAK [fields: VBELN, ERDAT, ERNAM, AUDAT, VBTYP, VKORG] and VBAP [Fields: POSNR, MATNR, CHARG, WAERK] and In output(form) i need the following fields,
    Output table:
    -VBELN
    -ERDAT
    -VKORG
    -POSNR
    -MATNR
    -MAKTX <- this field is from table MAKT. (I need the Material descriptions too for all the materials.)
    Form Layout should have Header, Logo (SAP ENJOY), Main, Footer.
    Problem is that i need footer only after the End of Complete data in Main Window, thats is footer should be placed only in last window. How should i do that ?
    Logic which i thot to make the print program is : First declare an internal table itab1 with VBAP, VBAP using the above fields from two tables and fetch the product based on matnr.
    declare one internal table itab2 and select the records from the table makt by checking the condition itab1 is not initial.
    sample code.
    IF ITAB1 IS NOT INITIAL.
    SELECT FIELD LIST FROM MAKT INTO TABLE ITAB2 WHERE MATNR EQ ITAB1-MATNR.
    ENDIF.
    hope this shuld work. ?????

    Hi
    see the sample script program and do accordingly
    *& Report  ZTEST12121
    *& SAPScripts Example 1
    REPORT  ztest12121.
    *DATABASE TABLES
    TABLES: ekko,ekpo,lfa1.
    *INTERNAL TABLES AND STRUCTURES
    DATA i_ekko LIKE ekko.
    DATA i_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA i_lfa1 LIKE lfa1.
    *PARAMETERS
    PARAMETERS: p_ebeln LIKE ekko-ebeln.
    *VARIABLES
    DATA MAT TYPE STRING VALUE 'MAT NO'.
    DATA iTe TYPE STRING VALUE 'ITEM NO'.
    DATA QTY TYPE STRING VALUE 'QTY'.
    DATA UOM TYPE STRING VALUE 'UOM'.
    DATA NET TYPE STRING VALUE 'NET PRICE'.
    Data var type integer value 0.
    *DATABASE SELECTS
    *Header data
    SELECT SINGLE * FROM ekko INTO i_ekko WHERE ekko~ebeln = p_ebeln.
    IF sy-subrc = 0.
    *Item Data
      SELECT * FROM ekpo INTO  TABLE i_ekpo WHERE ekpo~ebeln = p_ebeln.
      IF sy-subrc NE 0.
        WRITE 'PURCHASE DOCUMENT ITEM DATA ERROR'.
      ELSE.
    *Vendor Details
        SELECT SINGLE * FROM lfa1 INTO i_lfa1 WHERE lfa1~lifnr = i_ekko-lifnr.
        IF sy-subrc NE 0.
          WRITE 'VENDOR DOCUMENT ITEM DATA ERROR'.
        ENDIF.
      ENDIF.
    ELSE.
      WRITE 'THIS PURCHASE DOCUMENT NUMBER DOESNOT EXISTS'.
    ENDIF.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
        form                              = 'ZSCRIPT_1'
        language                          = sy-langu
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
    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 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'OFFICEAD'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'OFFICEAD'
    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 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'PODET'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'PODET'
    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 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TOP'
       FUNCTION                       = 'SET'
       TYPE                           = 'TOP'
       WINDOW                         = 'MAIN'
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT I_EKPO.
    var = i_ekpo-netpr * i_ekpo-menge.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'BODY'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Structure of a print program
    OPEN_FORM function
    CLOSE_FORM function
    WRITE_FORM
    START_FORM function
    END_FORM function
    CONTROL_FORM function
    The print program is used to print forms. The program retieves the necesary data from datbase tables, defines the order of in which text elements are printed, chooses a form for printing and selects an output device and print options.
    Function modules in a printprogram:
    • When you print a form you must used the staments OPEN_FORM and CLOSE_FORM. To combine forms into a single spool request use START_FORM and END_FORM.
    • To print textelements in a form use WRITE_FORM. The order in which the textelements are printed, is determined by the order of the WRITE_FORM statements. Note: for printing lines in the body, you can also use the WRITE_FORM_LINES function module.
    • To transfer control command to a form use CONTROL_FORM.
    Structure of a print program
    Read data
    Tables: xxx.
    SELECT *
    FROM xxx.
    Open form printing - Must be called before working with any of the other form function modules.
    Must be ended with function module CLOSE FORM
    call function 'OPEN_FORM'.....
    To begin several indentical forms containing different data within a single spool request, begin each form using START_FORM, and end it using END_FORM
    call funtion 'START_FORM'.....
    Write text elements to a window of the form
    call function 'WRITE_FORM'.....
    Ends spool request started with START_FORM
    call funtion 'END_FORM'.....
    Closes form printing
    call function 'CLOSE_FORM'...
    OPEN_FORM function
    Syntax:
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX =
    ARCHIVE_PARAMS =
    DEVICE = 'PRINTER'
    DIALOG = 'X'
    FORM = ' '
    LANGUAGE = SY-LANGU
    OPTIONS =
    MAIL_SENDER =
    MAIL_RECIPIENT =
    MAIL_APPL_OBJECT =
    RAW_DATA_INTERFACE = '*'
    IMPORTING
    LANGUAGE =
    NEW_ARCHIVE_PARAMS =
    RESULT =
    EXCEPTIONS
    CANCELED = 1
    DEVICE = 2
    FORM = 3
    OPTIONS = 4
    UNCLOSED = 5
    MAIL_OPTIONS = 6
    ARCHIVE_ERROR = 7
    INVALID_FAX_NUMBER = 8
    MORE_PARAMS_NEEDED_IN_BATCH = 9
    SPOOL_ERROR = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Some important parameters:
    FORM Name of the form
    DEVICE • PRINTER : Print output using spool
    • TELEFAX: Fax output
    • SCREEN: Output to screen
    OPTIONS Used to control attrubutes for printing or faxing (Number of copies, immediate output....
    The input for the parameter is structure ITCPO.
    CLOSE_FORM function
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT =
    RDI_RESULT =
    TABLES
    OTFDATA =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SEND_ERROR = 3
    SPOOL_ERROR = 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.
    Paramerters:
    RESULT Returns status information and print/fax parameters after the form has been printed. RESULT is of structure ITCPP.
    WRITE_FORM function
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = ' '
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    IMPORTING
    PENDING_LINES =
    EXCEPTIONS
    ELEMENT = 1
    FUNCTION = 2
    TYPE = 3
    UNOPENED = 4
    UNSTARTED = 5
    WINDOW = 6
    BAD_PAGEFORMAT_FOR_PRINT = 7
    SPOOL_ERROR = 8
    OTHERS = 9
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Some important parameters:
    ELEMENT Specifies which textelement is printed
    WINDOW Specifies which window is printed
    TYPE Specifies the output area of the main window. This can be:
    • TOP - Used for headers
    • BODY
    • BOTTOM - Used for footers
    FUNCTION Specifies whether text is to be appended, replaced or added
    Example of how to use the WRITE_FORM function module together with a script.
    Form layout of the MAIN window
    /E INTRODUCTION
    Dear Customer
    /E ITEM_HEADER
    IH Carrier, Departure
    /E ITEM_LINE
    IL &SBOOK-CARRID&, &SPFLI-DEPTIME&
    /E CLOSING_REMARK
    The print program
    Writing INTRODUCTION
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'INTRODUCTION'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Writing ITEM_HEADER
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Set ITEM_HEADER into TOP area of main window for subsequent pages
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'SET'
    TYPE = 'TOP'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Write ITEM_LINE
    LOOP AT .....
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_LINE'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8.
    ENDLOOP.
    Delete ITEM_HEADER from TOP area of main window
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'ITEM_HEADER'
    FUNCTION = 'DELETE'
    TYPE = 'TOP'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    Print CLOSING_REMARK
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'CLOSING_REMARK'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    OTHERS = 8
    START_FORM function
    CALL FUNCTION 'START_FORM'
    EXPORTING
    ARCHIVE_INDEX =
    FORM = ' '
    LANGUAGE = ' '
    STARTPAGE = ' '
    PROGRAM = ' '
    MAIL_APPL_OBJECT =
    IMPORTING
    LANGUAGE =
    EXCEPTIONS
    FORM = 1
    FORMAT = 2
    UNENDED = 3
    UNOPENED = 4
    UNUSED = 5
    SPOOL_ERROR = 6
    OTHERS = 7
    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 function
    CALL FUNCTION 'END_FORM'
    IMPORTING
    RESULT =
    EXCEPTIONS
    UNOPENED = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SPOOL_ERROR = 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.
    CONTROL_FORM function
    The CONTROL_FORM function module alows you to create SapScript control statements from within an APAB program.
    Syntax:
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    command =
    EXCEPTIONS
    UNOPENED = 1
    UNSTARTED = 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.
    Example:
    Protecting the text element ITEM_LINE
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'PROTECT'.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    TEXELEMENT = 'ITEM_LINE'.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND = 'ENDPROTECT'.
    Regards
    Anji

  • Attaching smartform and print prog to invoice

    hi
    ive developed a smartform and a print program.
    da program has a selection screen dat asks user for doc number(vbeln).
    it den displays data in da smartform.
    now ive to attach it to va02.
    wen i attach it using v/40 output type(RD000)  program name : zinvoice and pdf/smartform: zinv .and try to get print preview using vf03 da preview doesnt appear.also wen i click on print it shows message "output cannot be issued".
    can ny1 suggest wat da problem is and how to resolve it...
    points 'll b rewarded.
    rgds

    first call the function module name using ssf_function module _name
    and then inluce  ur fm.
    as below.
    Reading the NAST and DOC structures
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
    SmartForm from customizing table TNAPR
      gv_formname = tnapr-sform.
    Calling the layout set
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = gv_formname
        IMPORTING
          fm_name            = gv_fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        PERFORM protocol_update.
      ENDIF.
    For Print output:
      IF nast-nacha = '1'.                  " Print output
        ls_control_param-preview =   'X'.
        ls_control_param-no_dialog = 'X'.
      ENDIF.
    For fax output.
      IF nast-nacha = '2'.                  " Fax
    Create the Recipient Object
        CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
          EXPORTING
            ip_country        = gv_land1
            ip_faxno          = gv_telfx
            ip_type_id        = lv_fax_tp
          IMPORTING
            ep_recipient_id   = ls_recipient_id
          EXCEPTIONS
            invalid_recipient = 1
            OTHERS            = 2.
        IF sy-subrc NE 0.
       IF write_out = 'X'.
          FORMAT COLOR 6.
          WRITE AT /5 text-004.
       ENDIF.
          RAISE other.
        ENDIF.
    Create The Sender Object
        CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
          EXPORTING
            ip_sender      = sy-uname
          IMPORTING
            ep_sender_id   = ls_sender_id
          EXCEPTIONS
            invalid_sender = 1
            OTHERS         = 2.
        IF sy-subrc NE 0.
       IF write_out = 'X'.
          FORMAT COLOR 6.
          WRITE AT /5 text-003.
       ENDIF.
          RAISE other.
        ENDIF.
    Output options
        ls_output_options-tdteleland = gv_land1.
        ls_output_options-tdtelenum  = gv_telfx.
        ls_output_options-tdfaxuser  = sy-uname.
    Control parameters
        ls_control_param-device = lc_fax.
       ls_control_param-no_dialog = 'X'.
       ls_control_param-langu  = nast-tdspras.
      ENDIF.
      IF gv_fm_name IS NOT INITIAL.
    Below function module is used to show the Smart form
        CALL FUNCTION gv_fm_name
          EXPORTING
            is_nast            = l_nast
            doc                = l_doc
            control_parameters = ls_control_param
            output_options     = ls_output_options
            user_settings      = ' '
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
        IF sy-subrc <> 0.
    Error handling
          cf_retcode = sy-subrc.
          PERFORM protocol_update.
        ELSE.
        ENDIF.
      ENDIF.

  • Forms and Print program  Urgent please!!

    I have created a copy from a standard form (F150_dunn_01) and a print program (SAPLF150). Now, Could you tell me how can I know if the form is assigned to the program? or How to assign the program to the form?
    I mean, assign to the Zform and Zprogram
    Thanks and regards.

    Hi .
        There are two ways to find out the corresponding   
        print program for a sapscript form .
    they are ,
    1.go to the change editor of ur sapscript form in transaction se78 ,place ur cursor  at any of ur screen field and goto ->print program ->symbol definition with dialog .
    here u can find out the print program of ur corrsponding form.
    2.when u r in ur main screen of tansaction se78 ,goto
    form->check->texts.
    here u can find out the print program of ur corrsponding form.
    these r the two ways in finding out ur print programs of sapscript form.
    reg any doubt reply me .
    with regs,
    karthik srinivasan

  • How to use Text lements(/E) in Scripts and print program

    Hi all,
    I need to use Text elements from print program to Script output.
    I have included the text element name in WRITE_FORM and defined in the script with (/E) also.
    Still the data is not displaying.
    Please let me know how to use the text elements.
    thanks in advance..
    Rakesh
    <removed_by_moderator>
    Edited by: Julius Bussche on Nov 25, 2008 10:08 AM

    For printing the text directly on the formm the text element in form wud be as
    /E   ITEM_HEADER
    MH Quantity,,,,Description,,UOM,,Net Weight,,Gross Weight
    If you have variable define in the driver prog and you want to display,text elt. wud be as
    /E   ITEM LINE
    MH &CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&
    where CONF_OUT is a structure with fields ATBEZ and ATWTB
    MH is the paragraph format
    Hope this clears your doubt.
    Regards,
    Prashant

  • Form and print program

    Hello friends ,
    I have a print program that has been configured for HR . I have 2 z forms .When I activated the debugger it went to just one form . When I checked form2 it showed the z program as one of the print programs . How do I relate the form2 to my print program ? I need to change the layout of form2 . Before that I want to know when is the print program calling the form2 .
    Thanks  & Regards,

    Hello Hari,
    First create a output type for the form2. GO to Transaction NACE and assign the Form name , Print Program and Routine name to that Output type.
    Process the output tyepe now. You will get the second form.
    Regards,
    Vasanth

Maybe you are looking for