Form in pdf format.

hi experts.
i want to have the pdf format on the local disk.....
please help me how to have the pdf format or any other format to have in local disk...
are they any funaction modules or  standard programs to this.

REPORT yKTREE_smartform1_new .
***************************DECLARATIONS*******************************
TABLES: zKTREE_t1,sflight.
DATA: cparam TYPE ssfctrlop,
outop TYPE ssfcompop,
fm_name TYPE rs38l_fnam,
my_tabix TYPE sy-tabix,
file_size TYPE i,
bin_filesize TYPE i.
DATA: tab_otf_data TYPE ssfcrescl,
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
itab LIKE TABLE OF zshail_t1 WITH HEADER LINE,
otab TYPE TABLE OF sflight WITH HEADER LINE,
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE.
start-of-selection.
suppressing the dialog box****************************
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = space.
cparam-getotf = 'X'.
****************for the first smartform*******************************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSHAIL_SMFORM2'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_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.
SELECT my_id my_income my_name FROM zshail_t1 INTO TABLE itab.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = outop
user_settings = space
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = tab_otf_data
JOB_OUTPUT_OPTIONS =
TABLES
it_tab = itab[]
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.
*********appending the otf data into the final table*********************
tab_otf_final[] = tab_otf_data-otfdata[].
*************for the second smartform************************************
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSHAIL_SMTAB'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_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.
SELECT carrid connid fldate price FROM sflight INTO CORRESPONDING FIELDS
OF TABLE otab.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = outop
user_settings = space
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = tab_otf_data
JOB_OUTPUT_OPTIONS =
TABLES
itab = otab[]
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.
**removing the initial and final markers from the OTF data*********
DELETE tab_otf_data-otfdata WHERE tdprintcom = '//'.
searching for the end-of-page in OTF table************
READ TABLE tab_otf_final WITH KEY tdprintcom = 'EP'.
my_tabix = sy-tabix + 1.
appending the modified OTF table to the final OTF table****
INSERT LINES OF tab_otf_data-otfdata INTO tab_otf_final INDEX my_tabix.
converting OTF data into pdf data**************************
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
IMPORTING
bin_filesize = bin_filesize
BIN_FILE =
TABLES
otf = tab_otf_final
lines = pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 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.
************downloading the converted PDF data to your local PC*******
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = 'D:\TEST.PDF'
filetype = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
filelength = file_size
TABLES
data_tab = pdf_tab
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
hope this works.....i got this from one friend in sdn and it worked for me with small changes hope the same with u
regards,
Durgaprasad

Similar Messages

  • Is it possible to generate oracle forms in pdf format

    I have to generate a form in pdf format. Is it possible.
    If yes, how to achieve this.
    Thank you very much.
    Navya.

    One round about way to get a pdf screen shot is tick 'print to file' and use a printer which is set up with a postcript driver. This gives a postscript file which can be converted to pdf using 'ghostscript and gsview' (available free from gnu via various sites).

  • How to print form into pdf format using smart forms in abap

    please let me know how to print form into pdf format using smart forms in abap.
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Mar 25, 2011 2:04 PM

    Hi ,
    refer this link
    <removed by moderator>
    Regards,
    Dhina..
    Moderator message: please do not reply to questions that violate forum rules.
    Edited by: Thomas Zloch on Mar 25, 2011 2:04 PM

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • Print form  in pdf format

    hi,
    i want to print the form i created in sapscript. how to do that? need to save the form into pdf format and then print it.
    please advise.
    thanks.

    Hi
    This is my routine used to generate a pdf file from print, u need only to get the OTF data from CLOSE_FORM fm:
    CALL FUNCTION 'CLOSE_FORM'
             TABLES
                  OTFDATA                  = T_OTF
             EXCEPTIONS
                  UNOPENED                 = 1
                  BAD_PAGEFORMAT_FOR_PRINT = 2
                  SEND_ERROR               = 3
                  SPOOL_ERROR              = 4
                  OTHERS                   = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
        ELSE.
          PERFORM DOWNLOAD_PDF.
        ENDIF.
    FORM DOWNLOAD_PDF.
      DATA: BIN_FILESIZE TYPE I.
      DATA: T_FILE_PDF     TYPE STANDARD TABLE OF TLINE,
            DOCTAB_ARCHIVE TYPE STANDARD TABLE OF  DOCS.
      DATA: FILE_TABLE     TYPE FILETABLE WITH HEADER LINE.
      DATA: RC          TYPE I,
            USER_ACTION TYPE I.
      DATA: TITLE    TYPE STRING,
            FILENAME TYPE STRING.
      CHECK P_PDF = 'X'.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
           IMPORTING
                BIN_FILESIZE           = BIN_FILESIZE
           TABLES
                OTF                    = T_OTF
                DOCTAB_ARCHIVE         = DOCTAB_ARCHIVE
                LINES                  = T_FILE_PDF
           EXCEPTIONS
                ERR_CONV_NOT_POSSIBLE  = 1
                ERR_OTF_MC_NOENDMARKER = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
        EXIT.
      ENDIF.
      TITLE = 'Creare File'(T02).
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
         EXPORTING
           WINDOW_TITLE            = TITLE
           DEFAULT_EXTENSION       = '*.pdf'
        CHANGING
          FILE_TABLE              = FILE_TABLE[]
          RC                      = RC
          USER_ACTION             = USER_ACTION
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          OTHERS                  = 4
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        IF USER_ACTION = 9. EXIT. ENDIF.
        IF RC = 1.
          READ TABLE FILE_TABLE INDEX 1.
        ENDIF.
      ENDIF.
      MOVE FILE_TABLE-FILENAME TO FILENAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
           BIN_FILESIZE            = BIN_FILESIZE
           FILENAME                = FILENAME
           FILETYPE                = 'BIN'
        CHANGING
          DATA_TAB                = T_FILE_PDF
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        MESSAGE S208(00) WITH 'File creato con successo'(S01).
      ENDIF.
      CHECK P_OPEN = 'X'.
      CALL FUNCTION 'CALL_BROWSER'
           EXPORTING
                URL                    = FILE_TABLE-FILENAME
           EXCEPTIONS
                FRONTEND_NOT_SUPPORTED = 1
                FRONTEND_ERROR         = 2
                PROG_NOT_FOUND         = 3
                NO_BATCH               = 4
                UNSPECIFIED_ERROR      = 5
                OTHERS                 = 6.
      IF SY-SUBRC <> 0.
        MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
      ENDIF.
    ENDFORM.                    " DOWNLOAD_PDF
    Max

  • User being able to download filled out form in pdf format

    Hello,
    I'm testing the formscentral application and was wondering if the users are able to obtain a copy of the filled out form in pdf format versus just plain text in the email?
    Thanks

    No, respondents can only get the email with text responses. There is no way for them to get a PDF copy of what they filled out.

  • How to show Smart form in PDF format

    Hi Experts,
    I  have a requirement in which I have to show a smart form in
    PDF Format coming from the RFC .
    Please give your helpful suggestion.
    Thanks and Regards
    Upendra Agrawal

    Hi ,
    Just look this pdf
    see this link
    http://www.****************/Tutorials/Smartforms/SFinEPasPDF/Page1.htm
    Thanks
    Edited by: Anup Bharti on Nov 7, 2008 7:00 AM

  • Display W2 form in PDF format in ESS

    I am trying to develop a WebDynpro ABAP application to display W2 Form in the Portal 7.0 ESS. I have designed a view with an Adobe Form element to hold the W2 form, and looking for any ideas about getting W2 form in PDF format from the ECC 6.0 system by providing parameters like EE number, Tax Company, and year.
    I know that the tcode PU19 can be used for getting W2 in PDF format, but it involves too many steps to generate and view the W2 in PDF format. I am not sure what kind of coding (e.g. classes, methods, logic to retrieve W2) will I need to do in the Web Dynpro application to retrieve W2 in PDF format from the ECC system.
    I will appreciate and reward any useful answers or pointers.
    Thanks,
    Saurabh

    Saurabh,
    Have you found a way to produce the W2s without using tcode PU19.  I am looking at doing W2s in ESS for our company and am interested in anything you have done on this.
    Thanks,
    Robert

  • 1099 Form in pdf format

    All,
    We have a requirement to have 1099 form in pdf format to send the form via email to the vendors as well as we should be able to print to mail to the vendors.  I believe this will be part of form design and send an email as attachment would be a batch job to kick off. Would this be correct?
    Regards,
    Sri

    Hi,
    You would maybe need one program.  Process would be; standard form output spool is saved by user; then a periodic program execution can be scheduled which picks up these specific spools converts to PDF and mails them to the vendor. This program can also be triggered immediatly after execution of the earlier output or it could even be user initiated.
    Cheers

  • Calling a report from a web form & specifying PDF format

    Has anyone been able to call a report from Oracle Forms (6i or 9i) in a web browser (i.e. by pressing a button or any other link)? We are having problems generating the report in PDF format when we web deployed our forms. In client server mode it works fine with the report deferring to PDF. But in the web browser it reverts to a messy HTML format with the columns being distorted. Running a standalone report from the web is no problem but when it is linked with a form it goes back to HTML. In the old forms (5.0) we used a function like run_product but I am not sure what the problem is in the new environment.
    T.J.

    Hello,
    According to the way the reports is launched, the format of the reports output depends on the
    variables : FORMS60_REPFORMAT (for Forms 6.0 and 6i)
    Two others variables are used : FORMS60_OUTPUT and FORMS60_MAPPING.
    Can you check the variable FORMS60_REPFORMAT ?
    regards Dennis:
    Thanks for the info. Your suggestion of changing the windows registry setting FORMS60_REPFORMAT to 'PDF' worked! I did not have to make any other changes to the form. I left the run_product format as is in the form and it worked like a charm. When we eventually migrate to Oracle Reports/Forms 9i we will look into using run_report_object. But for now we will stick with Oracle Forms6i. There was no need to alter the other registry settings FORMS60_MAPPING and FORMS60_OUTPUT since I followed the instructions of setting the virtual directories (symbolic links) when I installed the forms and reports services.
    Thanks again for your help!
    T.J.

  • I want to have users submit the form in PDF format but it doesn't work using the email submit button

    Hi all,
    I have a form that I want to be returned to a specific email address as a PDF File. This is so that reservations people can open the pdf, and extract the information from it. Keeping it as a PDF will allow them to easily read and use the form.
    When I use the "Add and Email Submit button" approach, as outlined in the "How to" area, everything works fine, except that the format of the submitted file is in xml, not Pdf which is what I need it in.
    I then tried adding a Button to the document from the Library, and set it's "Control Type" to "Submit". This provided me with the submit sub-tab, where I set the "Submit Format" to PDF. In the "Submit to Url", I entered the following - "mailto:[email protected]" (without the quotes)
    The first approach works, but is not in the PDF format that I need (I believe).
    The second approach keeps giving the following error when one selects the submit button - "This operation is not permitted".
    We use Lotus Notes (yes, I know...not my favorite either, and it may be the problem here).
    Any help that might be provided is greatly appreciated!!
    Rob

    Thanks, but, using the "free" version of Reader, there is no opportunity to open nor import the xml data - the menu options do not exist - there is no import listed.
    If we try to open the xml file directly, then we get an error - something to the effect of "unsupported file type, or the file is corrupted".
    I just noticed in my Pro version that there is the command File ->Form Data ->Import Data to Form... command. Is this what you are referring to?
    What do you recommend? Perhaps the easiest thing to do would be to purchase a few copies of Acrobat Pro for the reservations people to use? I was hoping that the free version of reader would do it, but perhaps not?
    Thanks again,
    Rob

  • Designing of tech spec for check form in pdf format

    Hi ,
    i need to design the Technical Specification of Check Form(USA) in PDF format.
    i am new into the ADOBE Forms.
    can any one help me regarding this...
    if any one help me early it would be very much helpful for me.
    Regards,
    Bannur
    Moderator message : Not directly related to ABAP forums. Post the question if proper forum. Thread locked.
    Edited by: Vinod Kumar on Jun 7, 2011 4:39 PM

    Saurabh,
    Have you found a way to produce the W2s without using tcode PU19.  I am looking at doing W2s in ESS for our company and am interested in anything you have done on this.
    Thanks,
    Robert

  • Print, Save form in PDF Format from SAP

    Hi,
    The business users would like the ability to save, print a form, i.e. a Contract (VA42/43) in a PDF format.  My understanding is, this feature/option is should be available through Goto menu through a feature/option PDF Display which opens the form in a PDF Viewer that allows the user to Print and Save the form in a PDF Format. 
    My question is what is required in SAP to make this feature/option available to an end user, is it a security role, a user parameter, a trigger of a function module...etc.....any help on this would be much appreciated
    Thanks,
    Sean

    Hello Sean,
    you can define local printer as PDF printer (e.g FREEPDF) and print your PDF forms to that printer.
    To be able to generate a form, you can create new printer:
    name: locl_pdf
    device type: PDF1
    Host spool access method: G - front end printing
    This locl_pdf printer will generate a pdf and send to your local printer which is setup for PDF saving.
    Hope it helps,
    Evgenij

  • Email Form in PDF format

    I've created a form in LC Designer 8.05. I want users to be able to fill out my form and send the data back as a pdf. I've looked over the forum and tried using the an Email Submit Button and editing the XML Source, but then my button doesn't work. I also tried using a regular Button and a Submit control using the mailto: protocol but that's not working either. It only works when I use the Email Submit Button and an XML attachment. Anyone know why these two solutions are working for me? Thanks.

    Hi Cat --<br />I was finally able to resolve my issue.  Here's my notes.<br /><br /> <br /><br />Email buttons<br /><br />Form data is sent in XML format by default.  To change format to PDF, you must edit the XML Source.<br /><br />If you do not see the xml source tab, right click on the 'Design View' tab and select 'XML Source'. The tab should appear.Select the 'Design View' tab, and within the document, select the 'Submit Email' button. Now select the 'XML Source' tab. You should see the line for your email button control highlighted. <br /><br />Start looking down the code from here until you find a line that reads: <submit format="xml" textEncoding="UTF-8" target = "blah blah blah...<br /><br />Change the format from "xml" to "pdf", save the document and test it. It should now send the form as a PDF rather than xml. <br /><br /> <br /><br />Now, open form in Acrobat Professional. Select the 'Advanced' menu option. Select the 'Enable Usage Rights in Adobe Reader', and save the file. <br /><br />Open your file and test again. If you are running the form in Reader, and do not go through this process, you do not have save rights to the form in Reader. This allows the form to be saved, and ultimately, sent as an email. <br /><br />Jenny Fain<br />Windows Administrator<br />City of Roswell IT

  • Adobe Forms, XML(PDF format) to PDF binary

    Hi experts!
    I'm working with Interactive Adobe Forms and the form function return the PDF in a XML format (xstring) through the parameter FPFORMOUTPUT-XML.
    I need to save the PDF file (binary) without geting it through the "getpdf" parameter FPFORMOUTPUT-PDF.
    Because the "getpdf" don't permit to show the user dialog print options.
    How could I transform the XML(PDF) returned in binary PDF file?
    Thank you all!

    Hello Evaristo
    You can make use of CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' and CALL METHOD cl_gui_frontend_services=>gui_download to achieve this requirement.
    Regards
    Sandy
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
                   EXPORTING
                     buffer        = ls_params->es_output-s_form_output-xml
                   IMPORTING
                     output_length = lv_pdf_len
                   TABLES
                     binary_tab    = lt_pdf.
                 lv_file_name = p_xml.
    CALL METHOD cl_gui_frontend_services=>gui_download
                   EXPORTING
                     bin_filesize = lv_pdf_len
                     filename     = lv_file_name
                     filetype     = 'BIN'
                   CHANGING
                     data_tab     = lt_pdf
                   EXCEPTIONS
    OTHERS       = 1.

Maybe you are looking for