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

pdf file using smartforms

hi folks,

smartform experts.. I am currently working on developing smartforms for Financial statements . Further requirement is that these statements need to be converted into pdf files (because it is possible to do so)

I know that the form documents can be converted to pdf files but I have not worked on it, how much work hours would it approximately take to generate that pdfs?

Any insight and input would be really helpful.

Thanks

Santhosh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 16, 2005 at 08:19 PM

    Pretty easy actually:

    report ztest.
    
    parameters: spoolid like tsp01-rqident obligatory.  
    
    data begin of pdf_table occurs 0.
            include structure tline.
    data end   of pdf_table.
    
    data pdf_fsize type i.
    
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
         exporting
              src_spoolid   = spoolid
              no_dialog     = 'X'
         importing
              pdf_bytecount = pdf_fsize
         tables
              pdf           = pdf_table
         exceptions
              others        = 0.
    
    call function 'DOWNLOAD'
         exporting
              bin_filesize = pdf_fsize
              filetype     = 'BIN'
         tables
              data_tab     = pdf_table.
    
    

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 17, 2005 at 03:31 AM

    Hi,

    Here is a sample program for the same:

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap-code-samples/smartforms/smart form in abap.pdf

    In the above code, after the CONVERT_OTF function module, use the beloe code.It will save the PDF in your system.

    data w_filesize type i.

    call function 'WS_DOWNLOAD'

    Exporting

    bin_filesize = v_len_in

    filename = 'd: est.pdf'

    filetype = 'BIN'

    importing

    filelength = w_filesize

    tables

    data_tab = i_tline.

    Best Regards,

    Anjali

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 17, 2005 at 10:44 AM

    Hi,

    Try this.

    REPORT zzz_test3 .

    • Internal Table declarations

    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,

    i_tline TYPE TABLE OF tline WITH HEADER LINE,

    • Work Area declarations

    w_objhead TYPE soli_tab,

    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.

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

    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.

    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.

    Kindly reward points if it is helpful.If you need more clarifications,kindly get back.

    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.