Transfer ITAB contents to PDF format

Hi,
I want to transfer ITAB contents to PDF.format. For this iam following above steps:
(Note: my output in Z-report1 is in classical format and year wise but in output it contain all 12 moths data so i want to generate new PDF file for each month separately if i run this report in background then it will generate only one spool request for all 12 months)
1) Z- report through which iam transferring ITAB comtents to memory ID.
2) then through SUBMIT iam calling new Z-report1.
3) then iam importing ITAB content to Z-report1.
4) Now to get the Spool no i want to execute Z-report1 in background (automatically it should run in background because iam calling Z-report1 in Z-report).
SO is there any function module so that i can pass report name (Z-report1) and it will run in background
Please help.
Thanks .
Regards.
Hemant.

You can submit a program via job. Check the F1 help on submit button.
I'm doing something similar :
Here is the code snippet for submitting the program and getting the spool request.
  SUBMIT (gwa_rkb1d-rname) TO SAP-SPOOL COVER TEXT t_stamp
  WITHOUT SPOOL DYNPRO IMMEDIATELY flag KEEP IN SPOOL flag_kisp
  WITH    SELECTION-TABLE seltab   USING SELECTION-SET p_vari
  AND RETURN.
  SELECT SINGLE *
    INTO t_tsp01
    FROM tsp01
    WHERE rqfinal   IN ('.','X')
    AND   rqclient  = sy-mandt
    AND   rqowner   = sy-uname
    AND   rqtitle   = t_stamp.
  IF sy-subrc = 0.
    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
      EXPORTING
        rqident              = t_tsp01-rqident
      TABLES
        buffer               = buffer
      EXCEPTIONS
        no_such_job          = 1
        not_abap_list        = 2
        job_contains_no_data = 3
        selection_empty      = 4
        no_permission        = 5
        can_not_access       = 6
        read_error           = 7
        OTHERS               = 8.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDIF.
Also Job_open, job_submit and Job_close functions can be used.
regards,
Advait

Similar Messages

  • Opening content in PDF format on 3120 classic?

    Is it possible to open contents in PDF format on 3120 classic?
    Which app is suitable?
    nokia 3120 classic, fw V 10.00 06-03-09, RM365

    I think it is normal for books to take longer when they include multiple big size reports. I had a similar problem at a client. We ended up not including all the reports in one book and create several books instead. In another situation, we scheduled batches and the books ran automatically. This way, the users just received an email with the whole book in one pdf instead of running it on an ad-hoc basis and wait for the outcome.
    Hope this helps.
    Cheers,
    Mehmet

  • How to set password in obiee delivery content reports (pdf format)

    Hi
    Dear All
    i Need your help on the Obiee !
    i hvae one Requirement how to set password in obiee delivery content (pdf format) its possible. what are the things i to do
    Kindly Advice me
    Advance Thanks
    satya

    933154 wrote: My profile says PDF, config, report, settings says PDF and I get an Excel when I run screening reports. Very odd.You may want to make sure that the file where the system setting gets stored can be updated. In your <Intradoc_Dir>\urm\data\reportpublisher\config\config.hda file, there is a result set named "RPAdminConfigInfo". The third column of that result set should match the value being shown on the configuration settings page. I've changed the format value in the UI, and this file gets updated (and thus I'm getting my screening reports in the format specified in this config file.)
    933154 wrote: Also, I wasn't clear on the second part of the question. The Screening Reports appear to use the template INTERNALITEMDETAILRPTTEMPLATE. Is that configuration set somewhere? Is there any way to have the screening reports use a different template or is changing that template the only way to change the screening report layout?Templates are not configurable in that respect - the template name values being called for a service are hardwired in the code (you'd need to override in a component - just not worth the hassle). I'd either edit the existing rtf file, or just check in a new revision to the existing one if the differences are that profound. You'd still need to conform to the BI Publisher standards/methodology in either case.

  • Print PLSQL Dynamic content region in PDF format in Oracle Apex

    Hi All,
    I have created a report region by selecting "PLSQL Dynamic Content".This region calls the procedure with some parameters.So i want this plsql dynamic content to be in PDF format.
    For an easy understanding, I have created an application in Apex.Oracle.Com where i have created a Plsql Dynamic content which calls procedure do display in region.
    Step 1: http://apex.oracle.com/pls/apex/f?p=4550:1:15635986742760:::::
    Step 2: Workspace : dev_dilip
    Username: [email protected]
    Pwd : 123456
    Step 3: Open PRINT_PDF application and Run the application.
    Step 4: Username: [email protected]
    Pwd : 123456
    The procedure code can be viewed by object browser.
    Once user cliks PDF (button inapplication) a new tab should open and that plsql region should in PDF format.
    I kindly request all to check and advice me with your valuable suggestion.
    regards,
    Doddi Dilip.

    SO, you want to print the output of the procedure in pdf format? If so, you can try apex Report Query feature. You can find a number of examples for the same in this forum and in the internet:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/hol08/apexprnt/apexprnt_otn.htm
    Or, have a IR based on a collection; the collection based on a function returning query. And then, use the IR's generic download option to print reports.
    http://www.oracleapplicationexpress.com/tutorials/71

  • Needs content not in pdf format

    Hi all,,
    I have an ABAP program where i could send mails to the recipients.
    But the recipients are able to receive the content of the mails only in attached pdf format.
    But could not get into the body of the mail.
    I had passed packing_list-Document type = 'RAW' in  in so_document_send_API1
    What should i need to do in the settings..
    will be awarded..

    Hi Naveena,
    given below is a sample code to send mail with both body and an attachment.
    pack-doc_type is RAW for sending the body.
    vérifier qu'une adresse a été rentrée
      CHECK NOT s_execut IS INITIAL.
    Zone objet du mail
      CLEAR str_docdata.
      str_docdata-obj_name  = text-m01.
      str_docdata-obj_descr = text-m03.
    Alim table des destinataires
      LOOP AT s_execut.
        tbl_dest-rec_type = 'U'.
        tbl_dest-receiver = s_execut-low.
        APPEND tbl_dest.
        CLEAR  tbl_dest.
      ENDLOOP.
    Alim tbl_text pour corps du mail
    "ne pas répondre"
      CLEAR tbl_text.
      REFRESH tbl_text.
      tbl_text-line = text-m02.
      APPEND tbl_text.
      CLEAR tbl_text.
    saut de ligne
      APPEND tbl_text.
    nb de lignes lues / en anomalie / … qui seront dans le corps du texte
      WRITE p_filpar TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE p_filali TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE p_recycl TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr2 tbl_text-line INTO tbl_text-line
                                        SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE w_enr_10 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr3 tbl_text-line INTO tbl_text-line
                  SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      WRITE w_enr_20 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      IF tbl_text-line IS INITIAL.
        tbl_text-line = '0'.
      ENDIF.
      CONCATENATE text-cr4 tbl_text-line INTO tbl_text-line
                  SEPARATED BY space.
      APPEND tbl_text.
      CLEAR tbl_text.
      APPEND tbl_text.
      WRITE text-cr5 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
      APPEND tbl_text.
      CLEAR tbl_text.
      CLEAR w_lines.
      DESCRIBE TABLE tbl_text LINES w_lines.
      CLEAR tbl_pack.
      REFRESH tbl_pack.
      tbl_pack-head_start = 1.
      tbl_pack-head_num   = 0.
      tbl_pack-body_start = 1.
      tbl_pack-body_num   = w_lines.
      tbl_pack-doc_type   = 'RAW'.
      tbl_pack-obj_name   = text-m01.  "Program name
      tbl_pack-doc_size   = ( w_lines - 1 ) * 255 + STRLEN( tbl_text-line ).
      APPEND tbl_pack.
    Alim tbl_text pour pièce jointe
    - en-tête des colonnes
      CLEAR tbl_text.
      CONCATENATE text-ti1 text-ti2 text-ti3 text-ti4
                  kst_retours
             INTO tbl_text-line SEPARATED BY ';'.
      APPEND tbl_text.
    contenu des colonnes
      LOOP AT tbl_compte_rendu.
        CLEAR tbl_text.
        CONDENSE tbl_compte_rendu-text1.
        CONCATENATE tbl_compte_rendu-text1
                    tbl_compte_rendu-text2
                    tbl_compte_rendu-text3
                    tbl_compte_rendu-text4
                    tbl_compte_rendu-text5
                    tbl_compte_rendu-text6
                    kst_retours
               INTO tbl_text-line SEPARATED BY ';'.
        APPEND tbl_text.
      ENDLOOP.
      DESCRIBE TABLE tbl_text LINES w_lines2.
      CLEAR tbl_pack.
      tbl_pack-head_start = 1.
      tbl_pack-head_num   = 0.
      tbl_pack-body_start = w_lines + 1.
      tbl_pack-body_num   = w_lines + w_lines2.
      tbl_pack-doc_type   = 'CSV'.
      tbl_pack-obj_name   = text-m07.
      tbl_pack-obj_descr  = text-m08.
      tbl_pack-doc_size   = ( w_lines2 - 1 ) * 255
                             + STRLEN( tbl_text-line ).
      APPEND tbl_pack.
    Envoi du mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = str_docdata
          put_in_outbox              = space
          commit_work                = 'X'
        TABLES
          packing_list               = tbl_pack
          contents_txt               = tbl_text
          receivers                  = tbl_dest
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    Message was edited by:
            Alvaro Tejada Galindo

  • Converting PDF file contents to base64Binary format

    Hi All,
    I have a requirement where I need to convert PDF form contents to base64Binary format and call the webservice to send it to outside world.
    Detail Description:
    I have two buttons on my application one "DISPLAY" & another "SEND". If user clicks on 'DISPLAY' then PDF form will be opened and printed. If user clicks "SEND" button then PDF form contents should be converted to base64Binary format and proxy class will be called to send to PI server.  Please let me know any function modules or codes for converting PDF form contents to base64Binary format.
    Your inputs on this will be highly appericiated.
    Regards,
    Santhosh
    Edited by: santhosh sontha on Dec 21, 2010 12:23 PM

    You can try one of the functions in function group SCMS_CONV (or search for others in SE37).  My standard process uses older code which still works with SX_TABLE_LINE_WIDTH_CHANGE, then SO_SOLITAB_TO_SOLIXTAB, then
    * Convert to XSTRING format
      LOOP AT gt_pdf_255x INTO gs_pdf_255x.
        ASSIGN gs_pdf_255x TO <fs_line> CASTING TYPE x.
        CONCATENATE e_pdfout <fs_line> INTO e_pdfout IN BYTE MODE.
      ENDLOOP.

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • How to display the data in PDF format : problem is splitting into 2 lines

    Hi ,
    I developed one report which downloads the data into PDF format and saved in C drive but my problem is
    in my program : Line size of the report is 255 in PDF it is splitting into 2 lines. it has to show in a single line. how to do it. how to reduce the width of the output? i am sending my code below. anybody can suggest me how to do it. if possible please send me the code.
    my code:
    report zmaheedhar.
    maheedhar-start
    TABLES : vbak.
    parameters : p_vbeln type vbak-vbeln.
    data : begin of itab occurs 0,
            vbeln type vbak-vbeln,
            ERDAT type vbak-erdat,
            ERZET type vbak-erzet,
            ERNAM type vbak-ernam,
            ANGDT type vbak-angdt,
            BNDDT type vbak-bnddt,
            AUDAT type vbak-audat,
            VBTYP type vbak-vbtyp,
            TRVOG type vbak-trvog,
            AUART type vbak-auart,
            AUGRU type vbak-augru,
            GWLDT type vbak-gwldt,
            SUBMI type vbak-submi,
            LIFSK type vbak-lifsk,
            FAKSK type vbak-faksk,
            NETWR type vbak-netwr,
            WAERK type vbak-waerk,
            VKORG type vbak-vkorg,
           end of itab.
    maheedhar-end
    DATA: pripar TYPE pri_params,
          arcpar TYPE arc_params,
          lay TYPE pri_params-paart,
          lines TYPE pri_params-linct,
          rows TYPE pri_params-linsz.
    DATA: val(1), val1(1).
    *---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
    DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
    DATA: name TYPE pri_params-plist VALUE 'Testing'.
    DATA: i_pdf TYPE STANDARD TABLE OF tline.
    DATA: spono TYPE tsp01-rqident.
    maheedhar-start
    top-of-page.
    write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
           'Date','Document Date','SD document category','Transaction group','Sales Document Type',
           'Order reason'.
    start-OF-SELECTION.
          select vbeln  ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
                  VBTYP  TRVOG AUART AUGRU GWLDT SUBMI LIFSK
                  FAKSK  NETWR WAERK VKORG from vbak
            into table itab
            where vbeln = p_vbeln.
    maheedhar-end
    --- Retreive local printer details
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = dest
        no_dialog              = 'X'
        immediately            = ' '
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- Set Spool printer details w.r.t local printer
    pripar-prdsn = 'DSN'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_archive_parameters    = arcpar
        in_parameters            = pripar
        no_dialog                = 'X'
        list_name                = name
      IMPORTING
        out_archive_parameters   = arcpar
        out_parameters           = pripar
        valid                    = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found   = 1
        invalid_print_params     = 2
        invalid_archive_params   = 3
        OTHERS                   = 4.
    IF sy-subrc EQ 0.
    ---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
      NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS pripar
      ARCHIVE PARAMETERS arcpar
      NO DIALOG.
    ELSE.
      WRITE:/ 'Unable to create spool'.
    ENDIF.
    *--- Output statements
    *WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
    *WRITE:/ 'Second Line'.
    LOOP at itab.
    write: itab-vbeln,
            itab-ERDAT,
            itab-ERZET,
            itab-ERNAM,
            itab-ANGDT,
            itab-BNDDT,
            itab-AUDAT,
            itab-VBTYP.
    ENDLOOP.
    "---> Close spool
    NEW-PAGE PRINT OFF.
    spono = sy-spono.
    Convert ABAP Spool to PDF
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid                    = spono
        no_dialog                      = 'X'
    TABLES
       pdf                            = i_pdf
    EXCEPTIONS
       err_no_abap_spooljob           = 1
       err_no_spooljob                = 2
       err_no_permission              = 3
       err_conv_not_possible          = 4
       err_bad_destdevice             = 5
       user_cancelled                 = 6
       err_spoolerror                 = 7
       err_temseerror                 = 8
       err_btcjob_open_failed         = 9
       err_btcjob_submit_failed       = 10
       err_btcjob_close_failed        = 11
       OTHERS                         = 12.
    Download PDF contents to presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\test.pdf'
        filetype                        = 'BIN'
      TABLES
        data_tab                        = i_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.
    thanks,
    maheedhar

    hi tripat,
    actual problem is what u said it is decreased the wiidht of the output.
    now the output is:
    Sales Document C Date Entry time Created By Quotation date Date Document Date
    SD document category Transaction group Sales Document Type Order reason
    62741 07/29/1996 11:54:38 DARLENE 00/00/0000 00/00/0000 07/29/1996 C
    actual output is:
    output should come in a single line. it is splitting into 2 lines.
    thanks,
    maheedhar

  • Convert document content to pdf

    Hi,
    I have a problem. I would like to import a document and save the content on the server (AL11) in the PDF format.
    First I convert the content into a xstring and then I put the content into a binary table. After that I write the binary table to the server.
    To test the functionality I have the opportunity to save the data manually onthe desktop from the AL11. If I do that I get not a PDF, but always the type of original document.
    Can anybody help me?
    Regards,
    Nik
    CODE:
    DATA: lr_cmdocument     TYPE REF TO if_bol_bo_property_access,
            lr_mixed_mode     TYPE REF TO cl_bsp_wd_mixed_node,
            lr_marked_item    TYPE REF TO cl_crm_bol_entity,
            lv_xpath          TYPE crmt_ic_ac_identify_path,
            ls_doc_attr       TYPE zssc_epa_doc_att_struc,
            lv_filename       TYPE string,
            lv_filesize       TYPE n,
            lv_content_type   TYPE char128,
            lv_xstring        TYPE xstring,
            l_tab_file        TYPE tsfixml,
            l_length_file     TYPE i,
    u2026
      lr_cmdocument ?= er_cmdocument.
      CHECK lr_cmdocument IS BOUND.
      lr_mixed_mode ?= lr_cmdocument.
      lr_marked_item ?= lr_mixed_mode-> if_bsp_wd_ext_property_access~get_model_node( ).
    CALL METHOD cl_crm_ic_content_management=>get_doc_content
        EXPORTING
          iv_doc    = lr_marked_item
        RECEIVING
          rv_result = lv_xstring.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer        = lv_xstring
        IMPORTING
          output_length = l_length_file
        TABLES
          binary_tab    = l_tab_file.
      IF lv_filename is not INITIAL.
        concatenate '/tmp/' lv_filename into lv_filename.
      ENDIF.
      pfad_sap = lv_filename.
      OPEN DATASET pfad_sap FOR OUTPUT in BINARY MODE.
      LOOP AT l_tab_file INTO wa_tab.
        TRANSFER wa_tab TO pfad_sap.
      ENDLOOP.
      CLOSE DATASET pfad_sap.
      CLEAR pfad_sap. CLEAR wa_tab.

    Hello Nik,
    Not sure what you are trying to do here and the purpose behind it.
    Do you want to upload the file in PDF format in AL11 and want to view it ins PDF format in AL11? If this is the requirement then you can't view a file in PDF format in AL11. Try using SAP standard transaction CG3Z (for upload to application server) and you will see that the PDF can be uploaded in application server but it will not be visible in that format in AL11. Over there it is in binary format.
    If however your idea is to upload the content of the PDF to application server and then be able to download it at a later stage - for viewing, email or whatever purpose - then what you can do is to use FM CONVERT_OTF to convert the content to OTF and then save it AL11.
    Whenever you want it view or read it then you can read it from AL11 and then use FM CONVERT_OTF_2_PDF to convert to PDF.
    Let me know if you took this approach and it worked for you.
    Good Luck,
    Neeraj

  • How to transfer itab to using FTP...

    Hello Experts,
    How do I transfer the contents of my itab to a given FTP location? I was asked to provide in
    my selection screen the ff:
    1. the path on where to save the file
    2. the IP address
    3. the host username
    4. the host password
    Can you please provide steps on how to do this based from the critera above. Hope you can help me guys.Thank you and take care!

    Hi,
    Below program will create a file on the specified FTP server by taking the data from the internal table.
    Replace 'XXX.XXX.XX.XXX' with your host name.
    Check the below code.
    tables: t777a.                        "Building Addresses
    Internal Table for  Building table.
    data: begin of it_t777a occurs 0,
            build like t777a-build,       "Building
            stext like t777a-stext,       "Object Name
            cname like t777a-cname,       "Address Supplement (c/o)
            ort01 like t777a-ort01,       "City
            pstlz like t777a-pstlz,       "Postal Code
            regio like t777a-regio,       "Region (State, Province, County)
          end of it_t777a.
    Internal Table for taking all fields of the above table in one line
    separated by ‘|’(pipe).
    data: begin of it_text occurs 0,
          text(131),
          end of it_text.
    Constants: c_key  type i value 26101957,
               c_dest   type rfcdes-rfcdest value 'SAPFTPA'.
    data: g_dhdl type i,      "Handle
          g_dlen type i,      "pass word length
          g_dpwd(30).         "For storing password
    Selection Screen Starts
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.
    parameters: p_user(30) default 't777a'          obligatory,
                p_pwd(30)  default 't777a'          obligatory,
                p_host(64) default 'XXX.XXX.XX.XXX' obligatory.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002.
    parameters: p_file like rlgrap-filename default 't777a_feed.txt'.
    SELECTION-SCREEN END OF BLOCK blk2.
    Password not visible.
    at Selection-screen output.
      loop at screen.
        if screen-name = 'P_PWD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    g_dpwd  = p_pwd.
    Start of selection
    start-of-selection.
    To fetch the data records from the table T777A.
      select build stext cname ort01 pstlz regio
             from t777a
             into table it_t777a.
    Sort the internal table by build.
      if not it_t777a[] is initial.
        sort it_t777a by build.
      endif.
    Concatenate all the fields of above internal table records in one line
    separated by ‘|’(pipe).
      loop at it_t777a.
        concatenate it_t777a-build it_t777a-stext it_t777a-cname
                    it_t777a-ort01 it_t777a-pstlz it_t777a-regio
                    into it_text-text separated by '|'.
        append it_text.
        clear it_text.
      endloop.
    To get the length of the password.
      g_dlen = strlen( g_dpwd ).
    Below Function module is used to Encrypt the Password.
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = g_dpwd          "Actual password
          SOURCELEN   = g_dlen
          KEY         = c_key
        IMPORTING
          DESTINATION = g_dpwd.         "Encyrpted Password
    *Connects to the FTP Server as specified by user.
      Call function 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Connecting to FTP Server'.
    Below function module is used to connect the FTP Server.
    It Accepts only Encrypted Passwords.
    This Function module will provide a handle to perform different
    operations on the FTP Server via FTP Commands.
      call function 'FTP_CONNECT'
        EXPORTING
          user            = p_user
          password        = g_dpwd
          host            = p_host
          rfc_destination = c_dest
        IMPORTING
          handle          = g_dhdl
         EXCEPTIONS
            NOT_CONNECTED.
      if sy-subrc ne 0.
        format color col_negative.
        write:/ 'Error in Connection'.
      else.
        write:/ 'FTP Connection is opened '.
      endif.
    **Transferring the data from internal table to FTP Server.
      CALL FUNCTION 'FTP_R3_TO_SERVER'
        EXPORTING
          HANDLE         = g_dhdl
          FNAME          = p_file
          CHARACTER_MODE = 'X'
        TABLES
          TEXT           = it_text
        EXCEPTIONS
          TCPIP_ERROR    = 1
          COMMAND_ERROR  = 2
          DATA_ERROR     = 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.
      ELSE.
        write:/ 'File has created on FTP Server'.
      ENDIF.
    Call function 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'File has created on FTP Server'.
    To Disconnect the FTP Server.
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          HANDLE = g_dhdl.
    To Disconnect the Destination.
      CALL FUNCTION 'RFC_CONNECTION_CLOSE'
        EXPORTING
          destination = c_dest
        EXCEPTIONS
          others      = 1.

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • Displaying Japanese Fonts on Report Builder 10g in PDF format.

    Hi,
    In one of my Report .I am using Japanese characters.All the contents are static data. If I run from Report builder it gives me perfect result and If I am trying to get output in PDF format from Report builder, I all the Japanese characters changed to some different fonts characters. Same problem with Report Server.
    Thanks in Advance
    I appreciate your Help.

    Hi,
    Try using the 'PDF Subsetting' feature.Go through the Chapter-Using PDF in Oracle Reports in "Oracle Application Server Reports Services Publishing Reports to the Web" - http://www.oracle.com/technology/documentation/reports.html.
    Hope this will help you.
    Thanks,
    Vidya

  • Report in pdf format in oracle apex

    how can i save the contents of a form as a report in pdf format by clicking on tha print button in oracle apex???
    plz help if anyone knows tha solution
    Edited by: user9139675 on Mar 9, 2010 11:14 PM

    how can i save the contents of a form as a report in pdf format by clicking on tha print button in oracle apex???You may create a report and call it in an Apex process fired by press a button.
    in the process:
    l_utl_http := utl_http.request(l_url);
    where set l_url like:
    http://167.165.243.209/dev60cgi/rwcgi60?repdevi_key&server=Rep60&report=my_rpt.rdf&DESFORMAT=PDF&DESTYPE=FILE&DESNAME=/arch/chrisweb/devi/cache/my_rpt.PDF&BACKGROUND=YES&P_1=PC00980
    The generated pdf report my_rpt.PDF is kept at /arch/chrisweb/devi/cache/

  • SMARTFORM TO PDF FORMAT

    Hi All,
    I have a requirement to get a print preview of the smartform in the pdf format and have the option to either print it or save it.
    meaning - the adobe application must automatically open and in it, there must be a window to display the smartform in the PDF format.
    the code i have so far is as below
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                FORMNAME           = W_FORM_NAME
           IMPORTING
                FM_NAME            = W_FMODULE
           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.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    gst_output_options-tddest = 'FRNT_End_Print'. "Frontend printer
    gst_output_options-tdnewid = sy-prnew.
    gst_output_options-tdimmed = 'X'.
    gst_output_options-tddelete = sy-prrel.
    clear gst_control_parameters.
    gst_control_parameters-no_dialog = 'X'.
    gst_control_parameters-getotf = 'X'.
    gst_control_parameters-preview = 'X'. "Deactivate preview!
    *Call the original function module.
    call function w_fmodule
    exporting
    control_parameters = gst_control_parameters
    output_options = gst_output_options
    importing
    job_output_info = gt_job_output_info
    job_output_options = gt_output_options
    tables
    tbl_amt = final_tab
    exceptions
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4.
    if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
      T_OTF[] = gt_job_output_info-OTFDATA[].
    call function 'SSFCOMP_PDF_PREVIEW'
    exporting
    i_otf = t_otf
    exceptions
    convert_otf_to_pdf_error = 1
    cntl_error = 2
    others = 3.
    if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    The adobe application is launched but the window inside does not hold anything.
    i get a pop-up inside the adobe window with the message " FILE DOES NOT BEGIN WITH '%PDF-' ".
    Any suggestions are greatly appreciated.
    hoping to hear from you all.
    thank you.
    Sandeep

    Hi Sandeep,
              Plz try with this code this code is working properly.
    DATA: form_name TYPE rs38l_fnam.
    DATA: wa_ctrlop TYPE ssfctrlop,
    wa_outopt TYPE ssfcompop.
    DATA: t_otfdata TYPE ssfcrescl,
    t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i.
    DATA: w_bin_filesize TYPE i.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZSM_PDF_1'
    * VARIANT = ' '
    * DIRECT_CALL = ' '
    IMPORTING
    fm_name = 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.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION form_name
    EXPORTING
    * ARCHIVE_INDEX =
    * ARCHIVE_INDEX_TAB =
    * ARCHIVE_PARAMETERS =
    control_parameters = wa_ctrlop
    * MAIL_APPL_OBJ =
    * MAIL_RECIPIENT =
    * MAIL_SENDER =
    output_options = wa_outopt
    user_settings = 'X'
    mydate = F_DATE
    IMPORTING
    * DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otfdata
    * JOB_OUTPUT_OPTIONS =
    TABLES
         ITAB = 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.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    * ARCHIVE_INDEX = ' '
    IMPORTING
    bin_filesize = w_bin_filesize
    TABLES
    otf = t_otf
    lines = t_pdf_tab
    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.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    bin_filesize = w_bin_filesize
    * CODEPAGE = ' '
    filename = 'C:\Users\KO58\Desktop\test1.pdf'
    filetype = 'BIN'
    * MODE = ' '
    * WK1_N_FORMAT = ' '
    * WK1_N_SIZE = ' '
    * WK1_T_FORMAT = ' '
    * WK1_T_SIZE = ' '
    * COL_SELECT = ' '
    * COL_SELECTMASK = ' '
    * NO_AUTH_CHECK = ' '
    IMPORTING
    filelength = w_filesize
    TABLES
    data_tab = t_pdf_tab
    * FIELDNAMES =
    EXCEPTIONS
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    OTHERS = 10
    IF sy-subrc <> 0.
    MESSAGE i003(z00) WITH 'File not downloaded succesfully'.
    ELSE.
    MESSAGE i003(z00) WITH 'File Test.pdf downloaded succesfully '
    'under D drive'.
    ENDIF.
    If usefull plz give rewards.
    Cheers
    Anirudh

  • How to generate an Letter in PDF format.. (APEX  4.0)

    Hi All,
    I want to generate a report in Letter format .. the output format is PDF.
    For example consider EMP table .. from this im going to query and show the columns of
    EMP_NAME , ADDRESS, SALARY,DESIGNATION
    And in this report i ll be have an check box for each row... if i check it for 5 particular employee from the report .. i have to generate an letters for those employees which i have checked in PDF format.
    OUtPUT should be like::
                                                                    Date:
    EMPNAME:: employee1
    ADDRESS::xyz
    dear sir ,
      content .. xyz
    thanking you
                                                                    Date:
    EMPNAME:: employee2
    ADDRESS::xyz
    dear sir ,
      content .. xyz
    thanking you
                                                                    Date:
    EMPNAME:: employee3
    ADDRESS::xyz
    dear sir ,
      content .. xyz
    thanking you.
                                                                    Date:
    EMPNAME:: employee5
    ADDRESS::xyz
    dear sir ,
      content .. xyz
    thanking youTHANKS IN ADVANCE FOR YOUR HELP
    regards,
    Arumugam

    Hi ALL
    Habib
    Tyson Jouglet
    Tony Miller
    Andy
    Thanks for yours replies...
    I have worked in JASPER REPORTS for generating reports .... just wanted too know that anyother way is there to generate pdf report in APEX.
    With your replies i came too know about other reporting tools .. once again thanks for your help ..
    So the conclusion is we cant get the PFD directly from Apex without integrating anyone those tools rite.......
    regards,
    Arumugam

Maybe you are looking for

  • Game Icon changed after Anna undate

    The Game Icon has turned into a standard Folder icon after the Anna update ! How could I get it to change into the purple game contoller icon, as is stanadard for phones with the Anna SW ? Has any one else had this problem and how did you guys/gals s

  • Retail Datawarehouse batch INVALID ITEM/STORE REPORT

    Hi, After running DataWarehouse batch, in the DWI server sometimes appears the following two files in the arch directory (/app/retail/data/arch/done.20110726): itemfile, vatfile when open itemfile, appers the following:         INVALID ITEM/STORE REP

  • I can't setup an email Alias

    Everytime I try I get the message box below. I think there is an error with the system and I'm not sure how to report it to the Apple people

  • Cant find Image processor in my new photoshop cc HELP !

    cant find Image processor in my new photoshop cc HELP !

  • [Solved] Firefox and Thunderbird (Startup crash)

    Hi guys, I've just installed arch linux + awesome wm with ati catalyst drivers from amd page. All works fine, just one problem. When I run thunderbird or firefox I have this message. I tried to reinstall both of them, and reinstall amd drivers but it