Skip to Content
author's profile photo Former Member
Former Member

Smartform in pdf format.

Hi All,

Can anyone help me out on ,how to convert the Smartforms into pdf format?

Thx in advance.

SK.

Add a comment
10|10000 characters needed characters exceeded

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 10:01 AM

    VISIT THIS LINK

    smartforms-to-pdf

    PLZ REWARD POINTS IF IT HELPS YOU

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 25, 2005 at 10:00 AM

    Hi Subrato,

    you can create direct PDF with smartform (depend of your release)

    or you can convert the spool with an external program, like this one : RSTXPDFT4

    Rgd

    Frédéric

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 25, 2005 at 10:01 AM

    Hi

    Check the below links..

    smartforms-to-pdf

    smartform-otf-as-pdf-and-sending-as-email-attachme

    Regards,

    Abdul

    Message was edited by: Abdul Hakim

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 10:35 AM

    CALL FUNCTION v_form_name

    EXPORTING

    Itab1 = ITAB1

    Itab2 = ITAB2

    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.

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 11:05 AM

    Hi All,

    This piece of code is not working and I can not use the program RSTXPDFT4.Requirment is pdf preview just.

    SK.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 11:07 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 11:11 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 25, 2005 at 11:19 AM

    Use the below code,Its working for me.After this give "download"

    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,

    i_tline TYPE TABLE OF tline WITH HEADER LINE,

    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,

    w_return TYPE ssfcrescl,

    w_data TYPE sodocchgi1,

    w_ctrlop TYPE ssfctrlop,

    w_compop TYPE ssfcompop,

    w_buffer TYPE string,"To convert from 132 to 255

    v_form_name TYPE rs38l_fnam,

    v_len_in LIKE sood-objlen,

    v_len_out LIKE sood-objlen,

    v_len_outn TYPE i,

    v_lines_txt TYPE i,

    v_lines_bin TYPE i.

    data Itab1 type ZSTRUCT_T.

    Start-OF-Selection.

    select ADRNR LIFNR LAND1 from LFA1

    into corresponding fields of table itab1

    where LAND1 in S_LAND1.

    call function 'SSF_FUNCTION_MODULE_NAME'

    exporting

    formname = 'ZSMART_S'

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

    CALL FUNCTION v_form_name

    EXPORTING

    Itab1 = ITAB1

    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.

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.