SmartForm on PO document

Hi people,
I have a simple question.
Is it possible to create a SmartForm instead a SAPscript for PO document?
Today, NACE is calling a standard FORM ENTRY.
So I just need to change it to a Z program and create the SMARTFORM there?
I've been requested to change the PO document, so I want to use smartform to practice my skills..
tks

Hi,
The following are the standard smartform name, form routine, and standard driver program for PO.
Driver Prgram : SAPFM06P
Form Routine : ENTRY_NEU
Smartform Name : /SMB40/MMPO_A
You can use the same or you can copy it to Z program and Z form name for your customized requirements.
Regards,
Prabu

Similar Messages

  • Exporting smartform into word document

    how to export smartform into word document . i tried converting into pdf and then download but it showing run time error that conversion is not possible and also it tells that otf command // missing. is it not possible to export directly to word document instead of pdf.plz give clear description of what to be done exactly with sample codes.
    marks will be rewarded.

    Hi Lavanya,
    Converting the output from Spool to Word is possible.
    Here is the sample code.
    I cut pasted a code from a link i got in the website, see if it helps.
    ZSPOOL2WORD
    Genera un fichero Word a partir de una orden de spool
    MÓDULO : FI *
    TIPO : Listado *
    TITULO : Generación fichero Word
    DESCRIPCION : Genera un fichero Word a partir de una orden de spool
    AUTOR: Andres Picazo FECHA: 24/03/2003 *
    MODIFICACIONES *
    FECHA NOMBRE DESCRIPCION *
    REPORT ZSPOOL2WORD
    NO STANDARD PAGE HEADING
    LINE-COUNT 065
    LINE-SIZE 080.
    INCLUDE OLE2INCL.
    *----TABLAS/ESTRUCTURAS--
    *----TABLAS INTERNAS--
    DATA I_BUFFER(132) OCCURS 1000000 WITH HEADER LINE.
    *----VARIABLES--
    *----PARAMETER/SELECT-OPTIONS EN PANTALLA--
    SELECTION-SCREEN BEGIN OF BLOCK BLK_PAR WITH FRAME TITLE TEXT-SEL. "Pará
    PARAMETERS: P_SPOOL LIKE TSP01-RQIDENT OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK BLK_PAR.
    SELECTION-SCREEN BEGIN OF BLOCK BLK_WOR WITH FRAME TITLE TEXT-WOR.
    PARAMETERS: P_WORD AS CHECKBOX DEFAULT 'X'.
    PARAMETERS: P_FWOR LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.DOC'.
    PARAMETERS: P_PLAN LIKE RLGRAP-FILENAME
    DEFAULT 'D:DATOSAPISMAYORPLANTILLA LIBRO MAYOR.DOC'.
    SELECTION-SCREEN END OF BLOCK BLK_WOR.
    SELECTION-SCREEN BEGIN OF BLOCK BLK_FIC WITH FRAME TITLE TEXT-FIC.
    PARAMETERS: P_CTXT AS CHECKBOX DEFAULT ''.
    PARAMETERS: P_FTXT LIKE RLGRAP-FILENAME DEFAULT 'C:MAYOR.TXT'.
    SELECTION-SCREEN END OF BLOCK BLK_FIC.
    LOGICA DEL PROGRAMA
    INITIALIZATION
    INITIALIZATION.
    START-OF-SELECTION.
    START-OF-SELECTION.
    PERFORM LEER_SPOOL.
    IF NOT P_CTXT IS INITIAL.
    PERFORM GRABA_FICHERO.
    ENDIF.
    IF NOT P_WORD IS INITIAL.
    PERFORM LANZA_WORD.
    ENDIF.
    FORMS ADICIONALES
    *& Form LEER_SPOOL
    Lee la orden de spool en el buffer
    FORM LEER_SPOOL.
    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
    EXPORTING
    RQIDENT = P_SPOOL
    FIRST_LINE = 1
    LAST_LINE = 9999999
    TABLES
    BUFFER = I_BUFFER
    EXCEPTIONS
    NO_SUCH_JOB = 1
    NOT_ABAP_LIST = 2
    JOB_CONTAINS_NO_DATA = 3
    SELECTION_EMPTY = 4
    NO_PERMISSION = 5
    CAN_NOT_ACCESS = 6
    READ_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error' SY-SUBRC
    'al leer la orden de spool' P_SPOOL.
    ENDIF.
    ENDFORM. " LEER_SPOOL
    *& Form GRABA_FICHERO
    Graba el contenido del spool a fichero de texto.
    FORM GRABA_FICHERO.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = ' '
    CODEPAGE = ' '
    FILENAME = P_FTXT
    FILETYPE = 'ASC'
    MODE = ' '
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    COL_SELECT = ' '
    COL_SELECTMASK = ' '
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    DATA_TAB = I_BUFFER
    FIELDNAMES =
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TABLE_WIDTH = 4
    INVALID_TYPE = 5
    NO_BATCH = 6
    UNKNOWN_ERROR = 7
    GUI_REFUSE_FILETRANSFER = 8
    OTHERS = 9.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error' SY-SUBRC
    'al grabar el fichero' P_FTXT.
    ENDIF.
    ENDFORM. " GRABA_FICHERO
    *& Form LANZA_WORD
    Abre la plantilla de Word y pega el contenido del portapapeles.
    FORM LANZA_WORD.
    DATA: WORDAPP TYPE OLE2_OBJECT,
    DOCUMENT TYPE OLE2_OBJECT,
    SELECTION TYPE OLE2_OBJECT.
    Copia el contenido del buffer en el portapeles
    CALL FUNCTION 'CLPB_EXPORT'
    TABLES
    DATA_TAB = I_BUFFER
    EXCEPTIONS
    CLPB_ERROR = 1
    OTHERS = 2.
    Abre Word
    CREATE OBJECT WORDAPP 'word.application'.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'No se ha podido abrir el Word'.
    ENDIF.
    Lo pone en visible
    SET PROPERTY OF WORDAPP 'Visible' = 1.
    Cogemes el objeto documento
    CALL METHOD OF WORDAPP 'Documents' = DOCUMENT.
    Abrimos el fichero plantilla
    IF P_PLAN IS INITIAL.
    CALL METHOD OF DOCUMENT 'Add'.
    ELSE.
    CALL METHOD OF DOCUMENT 'Open' EXPORTING #1 = P_PLAN.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error al leer el fichero plantilla'.
    ENDIF.
    ENDIF.
    Coge el objeto selección
    CALL METHOD OF WORDAPP 'Selection' = SELECTION.
    Pega el contenido del portapapeles
    CALL METHOD OF SELECTION 'Paste'.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error al pegar contenido del portapapeles'.
    ENDIF.
    Graba el fichero
    CALL METHOD OF WORDAPP 'ActiveDocument' = DOCUMENT.
    CALL METHOD OF DOCUMENT 'SaveAs' EXPORTING #1 = P_FWOR.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error al grabar el nuevo documento'.
    ENDIF.
    Cierra Word
    CALL METHOD OF WORDAPP 'Quit'.
    IF SY-SUBRC NE 0.
    MESSAGE E398(00) WITH 'Error al cerrar Word'.
    ENDIF.
    ENDFORM. " LANZA_WORD
    check this also.................
    By using FM RSPO_RETURN_ABAP_SPOOLJOB you will be able to get the ASCII text of your Spool, which you can download to your local HD and open with M$ Word.
    Check the function module
    CALL FUNCTION 'RSPO_DOWNLOAD_SPOOLJOB'
         EXPORTING
              id    = p_spool
              fname = p_file.
    Give the file extn as .DOC. it will downlaod it as a
    Word doc.But I fear you wont get the table formats and
    all.
    ~~Guduri

  • Smartforms: print accompanying documents

    Hi,
    I have to reproduce in Smartforms the same output as the existing legacy system.
    Legacy system automatically outputs
    1)A Quotation
    2)A Condition of Sale document (always printed out)
      (PDF file, 2 pages, contents are numbered and appear in
       2 columns on each page).
    3)A technical document (only printed if a criteria is
      satisfied in the logic within the Quotation)
      (PDF file, 1 page, contents appear in 2 columns on the
       page [which includes some technical drawings])
    Smartforms
    I have no problem reproducing the Quotation in Smartforms but not so sure how to output the 2 accompanying documents automatically with the Quotation.
    Currently, the Smartforms has the following design:
    1) First page
    2) Next  page
    Question
    a)Does anyone know how to get the 2 PDF files printed automatically with the Quotation without having to bring the contents into Smartforms?
    b)If the PDF contents of the 2 files has to be integrated into the Smartform, what would be the best approach?
    Bear in mind that one of the documents contain technical drawings.
    Am thinking it would be good to create at least another page (ie LAST page) and maybe incorporating the contents of the 2 files in there somehow (maybe the technical file as a scanned object and the other file contents contained in multiple windows of the LAST page).  No MAIN window in the LAST page. 
    Would my proposed approach work?  Any ideas, anyone?
    c)Have been playing with the order sequence of the different pages. Have not got it quite right yet?
    Page          Next
    First         Next
    Next          Next  ?
    Last          ?
    How to get the system to process the last page only once?
    Or is there another way???

    any suggestion?

  • SmartForm error: Express document "update was terminated" received from aut

    Hi friends
    we requirement to send PO smartform through Print out as well as through mail.
    after creating PO i am getting popup box saying that :
    " Express document "update was terminated" received from author "XXXX".
    Please help me.
    my code as follows:
        IF sy-subrc = 0.
          CLEAR g_outop.
          SELECT  SINGLE ldest dimme FROM nach INTO (g_outop-tddest,
         g_outop-tdimmed) WHERE knumh EQ knumh.
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname           = 'YNZ_PO'
            IMPORTING
              fm_name            = sf_name
            EXCEPTIONS
              no_form            = 1
              no_function_module = 2
              OTHERS             = 3.
          w_ctrlop-getotf = 'X'.
          w_ctrlop-no_dialog = 'X'.
          w_compop-tdnoprev = 'X'.
          CALL FUNCTION sf_name
            EXPORTING
              output_options     = g_outop
              user_settings      = 'X'
              wa_ynz_po_head     = wa_ynz_po_head
              control_parameters = w_ctrlop
           IMPORTING
             job_output_info    = w_return
            TABLES
              t_ynz_po_item      = t_ynz_po_item
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
    for mail
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname           = 'YNZ_PO'
            IMPORTING
              fm_name            = sf_name
            EXCEPTIONS
              no_form            = 1
              no_function_module = 2
              OTHERS             = 3.
           CLEAR g_outop.                   " Commented by sharma
           g_outop-tddest = nast-ldest.
           g_outop-tdimmed = nast-dimme.
          w_ctrlop-getotf = 'X'.
          w_ctrlop-no_dialog = 'X'.
          w_compop-tdnoprev = 'X'.
          CALL FUNCTION sf_name
            EXPORTING
              output_options     = w_compop
              user_settings      = 'X'
              wa_ynz_po_head     = wa_ynz_po_head
              control_parameters = w_ctrlop
            IMPORTING
              job_output_info    = w_return
            TABLES
              t_ynz_po_item      = t_ynz_po_item
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
      i_otf[] = w_return-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = v_len_in
        TABLES
          otf                   = i_otf
          lines                 = i_tline
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 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.
    Convert PDF from 132 to 255.
      LOOP AT i_tline.
    Replacing space by ~
        TRANSLATE i_tline USING ' ~'.
        CONCATENATE w_buffer i_tline INTO w_buffer.
      ENDLOOP.
    Replacing ~ by space
      TRANSLATE w_buffer USING '~ '.
      DO.
        i_record = w_buffer.
    Appending 255 characters as a record
        APPEND i_record.
        SHIFT w_buffer LEFT BY 255 PLACES.
        IF w_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      REFRESH: i_reclist,
      i_objtxt,
      i_objbin,
      i_objpack.
      CLEAR w_objhead.
    Object with PDF.
      i_objbin[] = i_record[].
      DESCRIBE TABLE i_objbin LINES v_lines_bin.
    Object with main text of the mail.
      i_objtxt = 'Find attached the output of the smart form.'.
      APPEND i_objtxt.
      i_objtxt = 'Regards,'.
      APPEND i_objtxt.
      i_objtxt = 'Narasimha'.
      APPEND i_objtxt.
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    Document information.
      w_doc_chng-obj_name = 'Smartform'.
      w_doc_chng-expiry_dat = sy-datum + 10.
      w_doc_chng-obj_descr = 'Smart form output'.
      w_doc_chng-sensitivty = 'F'. "Functional object
      w_doc_chng-doc_size = v_lines_txt * 255.
    Pack to main body as RAW.
    Obj. to be transported not in binary form
      CLEAR i_objpack-transf_bin.
    Start line of object header in transport packet
      i_objpack-head_start = 1.
    Number of lines of an object header in object packet
      i_objpack-head_num = 0.
    Start line of object contents in an object packet
      i_objpack-body_start = 1.
    Number of lines of the object contents in an object packet
      i_objpack-body_num = v_lines_txt.
    Code for document class
      i_objpack-doc_type = 'RAW'.
      APPEND i_objpack.
    Packing as PDF.
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num = 1.
      i_objpack-body_start = 1.
      i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = 'PDF'.
      i_objpack-obj_name = 'Smartform'.
      CONCATENATE 'Smartform_output' '.pdf'
      INTO i_objpack-obj_descr.
      i_objpack-doc_size = v_lines_bin * 255.
      APPEND i_objpack.
    Document information.
      CLEAR i_reclist.
    e-mail receivers.
      i_reclist-receiver = '[email protected]'.
      i_reclist-express = 'X'.
      i_reclist-rec_type = 'U'. "Internet address
      APPEND i_reclist.
    Sending mail.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = w_doc_chng
          put_in_outbox              = 'X'
           commit_work                = 'X'
        TABLES
          packing_list               = i_objpack
          object_header              = w_objhead
          contents_bin               = i_objbin
       contents_hex               = i_objbin
          contents_txt               = i_objtxt
          receivers                  = i_reclist
        EXCEPTIONS
          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 <> 0.
        WRITE:/ 'Error When Sending the File', sy-subrc.
      ELSE.
        WRITE:/ 'Mail sent'.
      ENDIF.

    Hi ashok
    thanks for your reply.
    i got the error at commit in the below Func module.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = w_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = i_objpack
    object_header = w_objhead
    contents_bin = i_objbin.
    if i remove commit = 'X'.  no error but mail is not sending.
    please advice.

  • Convert Smartform in WORD Document

    Hi Gurus
    How can i convert a smartform Output in a word document ??? and  download into PC..
    Regards
    Gregory

    There is no standard possibility to do Word outputs in SAP.
    Anyway you can develop connection of Mail-merge technology of Microsoft and SAP ABAP class i_oi_document_proxy.
    http://help.sap.com/saphelp_sm32/helpdata/EN/e9/0be980408e11d1893b0000e8323c4f/content.htm
    with interface get_mail_merge_interface:
    http://help.sap.com/saphelp_sm32/helpdata/en/6e/8fc2e3dd0d11d2bdba080009b4534c/content.htm
    Simple example I found here:
    http://www.sap2word.de/abap.html
    Hope, it helps
    Edited by: Dimy IT dev on Sep 7, 2009 2:58 PM

  • Smartform for billing documents

    Hi,
    I want to know the smartform and the printing program to print billing documents in sales and distribution module.
    In the customizing there's a sapscript form but not a smartform. Is not recommended to use smartforms?.
    Thanks in advance.
      Best Regards.
        Mercedes

    hi,
    standard print program for invoice is RLB_INVOICE. and the smartform name is LB_BIL_INVOICE
    if u want more details then goto NACE-->select V3 (billing). look for more forms
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Attach a Smartform as a document to an Opportunity

    Does anyone know if it is possible to automatically attach a Smartform as document to an Opportunity.
    e.g.
    I have created an Opportunity and I have printed out the Offer (Smartform) But now I want this Offer to be saved as an attachement (Document tab) to this Opportunity.
    I hope there is someone who an help me!
    Thanks in advance!
    Best regards,
    Joost Goudriaan

    Couple of points.
    Someone with only Pages '09, or early Pages v5 releases, will not be able to open that Pages v5.2.2 document
    Pages v5.2.2 saves documents as folders. Right-click on the document, and then choose compress.
    The document is now a single file object (filename.pages.zip), and will attach to Mail with no problem
    Recipients save from Mail, and double-click to convert back to filename.pages.

  • Smartform output in word document

    hi all,
    how to download a smartform in word document so that the user can make changes in it. i tried converting the output into OTF format but formatting is not coming properly.how to overcome this?

    Hi,
    Even i had the same requirement for a sales order form to download in word and then change it manually before sending to customer. I tried a lot of ways to do the same and finally raised a sap noted for the same.i got a reply from SAP that it is not possible to download forms in word with same allignments maintained with logo. SAP note 641560 says the same thing.
    All you need to do is find a technical solution to fill the data which they want to fill maually or go for adobe form. Thats amazing technology to solve your issue.

  • 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.

  • How to print smartform from a report

    Im displaying a report, which contains several documents, whereby which ewch document is connected to a smartform.
    The page displaying the report contains a button 'Print'
    When clicking on the Print button, all the documents in the report should be printed.
    But my program is creating a spool file of the report, which will be printed further - its not what I want
    I want the program to print the smartforms of each documents on the report directly.
    heres my code and I dont know what I should do to be able to print the smartforms directly
    Get the function module name of the smartform.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname = '/EU000/FI_PRINT_DEBIT_NOTE'
          IMPORTING
            fm_name  = g_fm_name.
    gw_options-tdnoprev = ' '.
    gw_options-tddest = 'LOCL'.
    gw_options-tdprinter = 'LOCL'.
    gw_options-tdnewid = 'X'.
    gw_options-tdimmed = 'X'.
    gw_control-preview = ' '.
    gw_control-no_dialog = 'X'.
    write: text-006,' ', text-007, ' ', text-008.
    write:/.
    For all the documents
        LOOP AT gi_all_data INTO gw_all_data.
          write: gw_all_data-gjahr(4), ' ',gw_all_data-belnr,'     ', gw_all_data-belnr.
          write:/.
    CASE SY-UCOMM.
    WHEN 'PRINT'.
    Call the smarform
          CALL FUNCTION g_fm_name
            EXPORTING
              gw_all_data = gw_all_data
              user_settings = ' '
              output_options = gw_options
              control_parameters = gw_control.
    WHEN 'BACK'.
    LEAVE SCREEN.
    ENDCASE.

    DATA:   x_control_parameters TYPE ssfctrlop,
            x_output_options TYPE ssfcompop.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_prin LIKE usr01-spld.
    SELECTION-SCREEN BEGIN OF LINE.
    INITIALIZATION.
      SELECT  spld
              FROM usr01
              INTO p_prin UP TO 1 ROWS
              WHERE bname = sy-uname.
      ENDSELECT.
    START-OF-SELECTION.
      x_output_options-tdimmed = c_x.
      x_output_options-tddest = p_prin.
      x_output_options-tdnewid = c_x.
      x_output_options-tdreceiver = sy-uname.
      x_output_options-tdcopies = '001'.
      x_control_parameters-device = 'PRINTER'.
      x_control_parameters-no_dialog = c_x.
      x_control_parameters-langu = sy-langu.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
         formname                 = 'Z_SMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        fm_name                  = f_name1
      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.
    IF P_PRI = 'X'.
      CALL FUNCTION F_NAME1
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS          = X_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS              = X_OUTPUT_OPTIONS
      USER_SETTINGS              = 'X'
          wa_header                  = wa_zmexh51
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
          tab_item                   = TAB_ZMEXD51
          tab_item1                  = TAB_ZMEXS51
    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.
    ELSEIF P_PRE = 'X'.
      CALL FUNCTION F_NAME1
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS          = X_CONTROL_PARAMETERS
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS              = X_OUTPUT_OPTIONS
      USER_SETTINGS              = 'X'
          wa_header                  = wa_zmexh51
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
          tab_item                   = TAB_ZMEXD51
          tab_item1                  = TAB_ZMEXS51
    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.
    ENDIF.
    Check the above code its just similar requirement  it may helpful to you.
    Thanks,
    Phani.

  • SMARTFORMS: 'OUTPUT CANNOT BE ISSUED error

    Hi,
    I have designed a smartform for Delivery document. One of the delivery has 700 lines of Packing for 1 single line item. When I execute this delivery, the output is not displayed The error message is "the output could not be issued".
    In debug mode I find that it is giving error in function module SSFCOMP_WRITE_TEXT for the 518th line of the packing list. The data in this line is similar to previous lines and there does not seem to be anything different in this line. The function module is returning sy-subrc = 2.
    if i reduce the packings to 517lines, then the document gets printed correctly. Otherwise it gives an error.
    I need to display the line item alongwith the entire packing lines.
    Please help.
    Thanks and Regards,
    shilpa

    Hi Shilpa,
    First don't run thro the program.
    u just activate the smartform and then execute the Smartform. then u see the exception. the error belongs to window size is not enough space to write the text. Maybe it is overlapping the other windows.
    So correct the window size then u run thro the program.
    Otherwise it is related to Alignment problem.  That means check margins and positions.
    - Selvapandian Arunachalam

  • Output for PO document type

    I have created 4 document types in PO
    Domestic, Import, Service, Subcontracting,
    I have to add extra one document type and i want the print out of this document type should be different from remaining 4
    only for this 5th document type i need to have different output..
    Is it possible in SAP

    Hi,
    You should have different document types for all process( Domestic, Import, Service, Subcontracting and 5th one) and can have one output type for all document type ( where you have one  SmartForm)  OR you can have different output types( five SmartForm ) for each document type.Just talk to ABAPer for inclusion of all PO output formats with all condition types.
    Regards,
    Biju K

  • Download form in word document

    Hi,
    Can i download the smartform in word document. I know it is possible in PDF, but my requirement is they want that form in word document.

    Hi,
    you can find usefull documents from the following link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ed/62073c44564d59e10000000a114084/frameset.htm
    Hope it helps.
    Regards.
    Sukanya

  • Smartforms to PDF and PDF to adobe interactive forms

    Dear all,
    Is there any way to convert Smartforms to PDF document and import it programatically to Adobe interactive forms(SFP) and make it interactive.
    Regards
    Aravind

    Hi:
    Smartform to PDF
    ATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    Work Area declarations
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i.
    Step 1:
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZZZ_TEST2'
    importing
    fm_name = v_form_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.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    Step 2:
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    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.
    Step 3:
    i_otf] = w_return-otfdata[.
    Step 4:
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 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.
    For Smartform to Adobe is possible
    as [Adobe|http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm]
    Regards
    Shashi

  • Smartform in web dynpro Abap

    Hi,
    I'm trying to implement a web dynpro abap with a smartform.
    I used the "How to Display a Smartform as PDF document in Web Dynpro for ABAP" document that e can find on sdn.
    My problem is that when the form is called, there is  a dump
    "Please maintain an output device in your user master data. ".
    I copied  the code in a report and the form is displayed.
    Did I miss something?
    Kr
    Karim

    This workaround solution for smartForms sends the output to the Spool and then converts the spool to PDF.  For it to work it has to have a printer id for the formatting to the spool. You must maintain a default printer in your user ID or pass in a printer into the output settings of the smartForms function module. Because all of this is occuring in the background, the smartForms function modules can't just popup a dialog asking for a printer.

Maybe you are looking for

  • How to create a DataSource in BI 7.0?

    Hi, I need a steps to create a DS in BI 7.0. Thanks, Arun.M.D

  • Strange tty behaviour with xorg 1.8

    So, my girlfiend has an ooooold machine, I've decided to install arch on it - and I'm stuck with a strange thing there - when I start Xorg ( with startx, which works fine ), I cannot switch back to tty1-6 (e.g. I think, I can, but it shows nothing )

  • Multiple account assignment with non valuated gr

    hi, For multiple account assignement - One PO - MORE THAN ONE ASSETS - the GRN becomes "non valuated " (automatically- the field is grayed out). The account document will not be generated. The asset value will be captured on the MIRO date. pls explai

  • PDF won't display correctly after being sent from iPad/iPhone

    Hi, Wondering if anyone can help me, we have a PDF come in to one of our users outlook accounts, it opens fine on the computer. However, he has then proceeded to forward this to a colleague through his iPad and when the colleague opens it on their co

  • Formmail.pl issue

    I have a Flash form connected to a formmail.pl script. The formmail opens a new generic thank you page. Does anyone know how to stop this or otherwise suppress the perl's redirect? Thanks