Skip to Content
avatar image
Former Member

smartform to word formate

Hi Experts,

My requirment is to convert the sap form to word formate

how it is possible plz suggest me , Is there any bapi or fm to convert this.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 23, 2009 at 06:58 AM

    Hi,

    Sap has not provided any option to convert the smartform to Word document instead you can convert to PDF. Even we have the same requirement but i could not get anny help on this.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 23, 2009 at 07:16 AM

    hi

    when you execute the smart form you will the data in the form of OTF

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

    formname = 'ZLB_BIL_INVOICE'

    IMPORTING

    fm_name = lv_fnam

    EXCEPTIONS

    no_form = 1

    no_function_module = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    CALL FUNCTION lv_fnam

    EXPORTING

    control_parameters = gs_control

    output_options = gs_output_options

    user_settings = space

    is_bil_invoice = lv_bill_invoice

    is_nast = lv_nast

    is_repeat = space

    IMPORTING

    job_output_info = gs_job_output_info

    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.

    CLEAR lv_bill_invoice.

    &----


    *& Populate OTF data table

    &----


    REFRESH gt_otfdata[].

    LOOP AT gs_job_output_info-otfdata INTO gs_otfdata.

    APPEND gs_otfdata TO gt_otfdata.

    CLEAR gs_otfdata.

    ENDLOOP. " LOOP AT t_outtab-otfdata

    DATA: lv_bytes TYPE p,

    lv_bin_file TYPE xstring,

    gt_pdfdata TYPE STANDARD TABLE OF tline INITIAL SIZE 0.

    CALL FUNCTION 'CONVERT_OTF_2_PDF'

    IMPORTING

    bin_filesize = lv_bytes

    TABLES

    otf = gt_otfdata

    doctab_archive = doc

    lines = lines

    EXCEPTIONS

    err_conv_not_possible = 1

    err_otf_mc_noendmarker = 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.

    so use the below FM's to convert the OTF to any kind of data

    STXBCU SAP Smart Forms Composer: UC Specials

    SSFCOMP_CONVERT_OTF_C2X

    STXBW Smart Forms: OTF output to screen

    SSFCONVERT_OTF_AND_FAX Convert OTF and send to SAPcomm via SO_OBJECT_SEND for faxing

    SSFCONVERT_OTF_AND_MAIL Transfer doc. in OTF format using functn SO_OBJECT_SEND to SAPconnect

    STXC SAPscript composer

    CONVERT_OTF_MEMORY SAPscript: Convert OTF from memory into text format

    STXW OTF screen output

    CONVERT_OTF

    CONVERT_OTFSPOOLJOB_2_PDF

    CONVERT_OTF_2_PDF

    CONVERT_OTF_2_PDF_ARCHIVELINK

    CONVERT_OTF_AND_ARCHIVE Interface Between SAPscript and Archive: OTF->OTF or OTF->PDF

    CONVERT_OTF_AND_FAX Convert OTF and send to SAPcomm via SO_OBJECT_SEND for faxing

    CONVERT_OTF_AND_MAIL Transfer doc. in OTF format using functn SO_OBJECT_SEND to SAPconnect

    CONVERT_OTF_AND_MAIL_NEW

    SX03 SAPconnect: Conversion Modules

    SX_OBJECT_CONVERT_OTF_PDF

    SX_OBJECT_CONVERT_OTF_PRT

    SX_OBJECT_CONVERT_OTF_RAW

    In ur case

    you may use last one RAW and then send the RAW data to GUI_DOWNLOAD to save as excel

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 26, 2009 at 12:04 PM

    check this thread

    /message/78868#78868 [original link is broken]

    кu03B1ятu03B9к

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 27, 2009 at 10:24 AM

    Refer this SAP note 641560, it says the same thing.

    What you want to do is to fill the data which they want to fill maually.

    Regards,

    Joan

    Add comment
    10|10000 characters needed characters exceeded