Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Download smartform as word document

Dear All,

I need to download smartform as word document. i have used CALL FUNCTION 'CONVERT_OTF' but only word document is creating and downloading without content. How to solve?  kindly see the below code, where i have missed? Kindly advice..


CALL FUNCTION 'CONVERT_OTF'

    EXPORTING

      format                      = 'DOC'

    MAX_LINEWIDTH               = 255

*   ARCHIVE_INDEX               = ' '

*   COPYNUMBER                  = 0

*   ASCII_BIDI_VIS2LOG          = ' '

*   PDF_DELETE_OTFTAB           = ' '

*   PDF_USERNAME                = ' '

*   PDF_PREVIEW                 = ' '

*   USE_CASCADING               = ' '

  IMPORTING

    BIN_FILESIZE                = bin_filesize

*   BIN_FILE                    =

     TABLES

      otf                         = t_otf

       lines                       = t_lines

    EXCEPTIONS

      err_max_linewidth           = 1

      err_format                  = 2

      err_conv_not_possible       = 3

      err_bad_otf                 = 4

      OTHERS                      = 5

             .

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

Thanks & Regards,

Ranjini

Former Member
Former Member replied

Hi Ranjini,

Try this,

pass the GETOTF parameter in the control parameters as 'X'

Hope this will solve the issue

Regards,

Shony

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question