Script 2 pdf outputs?

I'm looking for a workflow solution where it's required to output 2 pdfs, one for production and one for proof.
Basically, it's a pain in the hoop to create 2 pdfs each time.
What I'm looking for is a way via script to export to PDF
Chooses currently open PDF(s)
Dialog box looks something like:
PDF Production
<Choose PDF Joboption> | <Current Filename> | <Choose Location>
PDF Proof
<Choose PDF Joboption> | <Current Filename> | <Choose Location> | Append Filename [_xx]
Be great if the Script recognised current folder the file is in.
Any help is appreciated.

If I've understood correctly, then something like this should work.
With a document open, run the script. It will open a Save Dialog which should default to the folder of the current ID document.
Click ok, and it will export 2 copies of the document to PDF, according to the presets listed at the beginning of the script, and with a suffix attached to the name of the second PDF, as indicated towards the end of the script.
// BS"D
// All rights reserved (c) 2015 by Id-Extras.com
// Free to use and modify but do not delete this copyright attribution.
// This script will export 2 pdfs of the current document
// Choose the PDF presets by altering their names below
// The second PDF gets a suffix added to its name.
// Modify the line below beginning name2 = to change the suffix.
// For more InDesign scripts: www.Id-Extras.com
d = app.activeDocument;
// Here you can choose the PDF preset
preset1 = app.pdfExportPresets.itemByName("[High Quality Print]");
preset2 = app.pdfExportPresets.itemByName("[Smallest File Size]");
if (!(preset1.isValid && preset2.isValid)){
    alert("One of the presets does not exist. Please check spelling carefully.");
    exit();
if (d.saved){
    thePath = String(d.fullName).replace(/\..+$/, "") + ".pdf";
    thePath = String(new File(thePath).saveDlg());
else{
    thePath =  String((new File).saveDlg());
thePath = thePath.replace(/\.pdf$/, "");
name1 = thePath+".pdf";
// Here you can set the suffix at the end of the name
name2 = thePath+"_xx.pdf";
d.exportFile(ExportFormat.PDF_TYPE, new File(name1), false, preset1);
d.exportFile(ExportFormat.PDF_TYPE, new File(name2), false, preset2);

Similar Messages

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • Script PDF output is printing distorted

    Hi,
    At the time of printing script output I have set Option paramter 'ITPO' to generate spool request.I sent this spool request PDF output to external mail by SP01. But when I download this PDF output form mail and print, priting quality gets distorted. Why this is happening? Please help how to overcome this issue.
    Regards

    Hi,
    Thanks for ur reply.
    What I deed and what I want is explained below:
    1. I have developed a script form and driver program which is used for invoice printing.
    2. Our client wants to send this invoice on external mail. What i deed for this that I am using the spool request which is created during the print of output.
    3. Then I am using transaction code SP01 to send spool PDF to external mail.
    4. This script PDF output is sent successfully on external mail as an attachment. User saves this PDF attachement and print on their printer.
    5. PROBLEM is when user open this attachment and prints this PDF, the printing gets distorted.
    Note: I have also used another way by function module and program, but the result is same, PDF attachemnt printing gets distorted. It is not the same as get printing through ZTCODE printing of this script.
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid                    = SPOOLID
          NO_DIALOG                      = ' '
        DST_DEVICE                     =
        PDF_DESTINATION                =
      IMPORTING
        PDF_BYTECOUNT                  =
        PDF_SPOOLID                    =
        OTF_PAGECOUNT                  =
        BTC_JOBNAME                    =
        BTC_JOBCOUNT                   =
       TABLES
          PDF                            = PDF
      LOOP AT PDF.
        TRANSLATE PDF USING ' ~'.
        CONCATENATE gd_buffer PDF INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    PERFORM process_email.
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    ENDFORM.
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'PDF Attachment'.
      APPEND it_mess_bod.
    it_mess_bod        = 'Message Body text, line 2...'.
    APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Regards
    Dinesh Singh

  • Convert Script to PDF using RVADOPFO, w/o using spool and send via email

    I want to convert output type script to pdf using the standard include RVADOPFO in the program. The output type is defined as medium '5' and comm starategy is also defined as INT(email) as want to send the output via email.
    Now the Include RVADOPFO contains ADDR_KEY-ADDRNUMBER & ADDR_KEY-PERSNUMBER. Where to maintain this info and how to pass in the include..below code is in the include..
    IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
      ... use stratagy to get communication type
        CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
             EXPORTING
                  STRATEGY           = NAST-TCODE
                ADDRESS_TYPE       =
                ADDRESS_NUMBER     = VBDKA-ADRNR
                PERSON_NUMBER      = VBDKA-ADRNP
                  ADDRESS_NUMBER     = ADDR_KEY-ADDRNUMBER
                  PERSON_NUMBER      = ADDR_KEY-PERSNUMBER
             IMPORTING
                  COMM_TYPE          = LVS_COMM_TYPE
                  COMM_VALUES        = LVS_COMM_VALUES
           TABLES
                STRATEGY_TABLE     =
             EXCEPTIONS
                  ADDRESS_NOT_EXIST  = 1
                  PERSON_NOT_EXIST   = 2
                  NO_COMM_TYPE_FOUND = 3
                  INTERNAL_ERROR     = 4
                  PARAMETER_ERROR    = 5
                  OTHERS             = 6.
    Please provide solution asap. Thanks in advance

    Hi,
    Check this links:
    Sending Mail from SAP
    https://wiki.sdn.sap.com/wiki/display/sandbox/SendMailwithPDFAttachment?showChildren=false#children
    Thanks.

  • How to convert sap script to pdf and send it as email attachment

    hi,
    my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
    thanks in advance

    Hi
    See this sample code and after that use the fun module to send the mail
    SO_NEW_DOCUMENT_ATT_SEND_API1
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    Setting the options
    w_options-tdcopies = 1 ."Number of copies
    w_options-tdnoprev = c_x."No print preview
    w_options-tdgetotf = c_x."Return of OTF table
    w_options-tddest = c_locl."Spool: Output device
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = w_res
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    codepage = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Converting OTF data to single line
    LOOP AT i_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
    ENDLOOP.
    Converting to PDF Format
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = c_otf
    format_dst = c_pdf
    devtype = c_printer
    CHANGING
    transfer_bin = w_transfer_bin
    content_txt = i_content_txt
    content_bin = i_content_bin
    objhead = i_objhead
    len = v_len_in
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    v_size = v_len_in.
    Downloading the PDF File
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_size
    filename = c_name
    filetype = c_bin
    TABLES
    data_tab = i_content_bin.
    If you r using this function module check it once....
    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.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
    follow this link for sample program.
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
    check...
    How to send smart form via email
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
    Regards
    Anji

  • Convert sap script to pdf and send mail before close_form

    hi experts,
    I am converting a sap script to PDF and then sending that pdf to vendor mail ids.
    I am getting the Data for the conversion of pdf From close_form.But it contains the data for all the vendors . But i have to Send the mail to the specific vendors.For ex if my script output has 5 sheets each with different vendors . I have to send  1 sheet as a pdf mail for that particular vendor. so,1 sheet each for 5 differrent vendors . But the data i get from close_form is the data for all the 5 vendors. How to split the data ?. can any one help me on this issue.
    with thanks in advance,
    syed

    Hi,
        Change your driver program so that it calls the script n no of times .. and every time send mail to particular vendor ..
        Loop at vendors.
         call the form ...
         send mail ...
        endloop ...
    Regards,
    Srini.

  • My Concurrent Program PDF output is in Russia instead of in English.  Why?

    I have selected Format as PDF and Style as "Landscape" and I am using English version as many others. Why am i getting Russian(or its some other language I really dont know that script) characters when I run the report?
    I am using
    RDBMS : 10.2.0.2.0
    Oracle Applications : 11.5.10.2
    Oracle Forms Version : 6.0.8.27.0
    Application Object Library : 11.5.0
    Please suggest me to get English font in my PDF output file.
    I forgot to mention that I am able to see output in english when I run the report with Format as "Text".

    Since your characterset is set to UTF8, generating any report in PDF format (with or without printing) is not supported. Oracle Reports 6i cannot generate PDF output with multi-byte characters. In Oracle Applications 11i with Oracle Reports 6i, PDF output is supported for only Latin-1 character sets such as US7ASCII, WE8ISO8859P1 or WE8MSWIN1252.
    Under UTF8, generating PDF via the XML Publisher is supported and it can be done. Alterative workaround is to use another format like Postscript (Assuming that PASTA is already installed and configured).

  • Script to PDF format

    Dear all,
    I am converting script to PDF format, after convention other than English text is problem.
    (English is text is visible and other language text is converting into symbol) how to solve this problem.
    When I am taking a printout or print preview it is ok.
    Thanks in advance
    Regards
    Manohar

    Hi Manohar,
    You have to log on in the environment specific to the language to see the output correctly. Eg: if ur script has japanese font you have to login in japanese environment to get it right in the PDF format.
    Regards,
    Sookshma

  • Invoice PDF output duplicated

    Hi,
    Some times the PDF output of the invoice is duplicated with that of previous invoice,where the invoices are created simultaneously via transaction VF04.
    We use a custom program and Sapscript for this purpose.
    But this doesn't happen all the time and only happens occasionally even with two invoices.
    Not too sure if some buffering concept is invloved.
    Could not find any relavant notes describing similar problem in the SAP service.
    I have tried tracing the output of FM 'CONVER_OTF',but with no clue.
    Can someone guide me in sorting this problem.
    Many thanks in advance.
    Regards,
    Babul
    Edited by: Babul on Mar 31, 2010 11:31 AM

    I don't think the problem is in the OTF conversion. It looks more like an error in the output processing program - either the invoice number gets "stuck" somewhere or something is getting called numerous times. I'm afraid you'll have to go through it with a fine comb, especially check for SELECT statements, any loops and subroutine calls.
    It is less likely but the problem might be in the script as well.

  • Script to pdf to email????

    I have to convert a script to pdf format and then download it to presentation server and then send  it as an attachment by email ( to the external mail ids).
    please help me with this.
    waiting in anitcipation.
    regards.
    suki.

    Use...HRHAP_DOC_CONVERT_SMF_TO_PDF or SX_OBJECT_CONVERT_OTF_PDF
    or CONVERT_OTF_2_PDF to convert data to PDF...
    Use the below code to send an email...
    FUNCTION Z_SEND_EMAIL.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(SENDER) LIKE  SOUD3-USRNAM
    *"     VALUE(SUBJECT) LIKE  SOOD1-OBJDES
    *"     REFERENCE(SUPPRESS_COMMIT) TYPE  CHAR01 DEFAULT ''
    *"  TABLES
    *"      RECEIVERS
    *"      EMAIL_TEXT STRUCTURE  SOLI OPTIONAL
    *"  EXCEPTIONS
    *"      ACTIVE_USER_NOT_EXIST
    *"      COMMUNICATION_FAILURE
    *"      COMPONENT_NOT_AVAILABLE
    *"      FOLDER_NOT_EXIST
    *"      FOLDER_NO_AUTHORIZATION
    *"      FORWARDER_NOT_EXIST
    *"      NOTE_NOT_EXIST
    *"      OBJECT_NOT_EXIST
    *"      OBJECT_NOT_SENT
    *"      OBJECT_NO_AUTHORIZATION
    *"      OBJECT_TYPE_NOT_EXIST
    *"      OPERATION_NO_AUTHORIZATION
    *"      OWNER_NOT_EXIST
    *"      PARAMETER_ERROR
    *"      SUBSTITUTE_NOT_ACTIVE
    *"      SUBSTITUTE_NOT_DEFINED
    *"      SYSTEM_FAILURE
    *"      TOO_MUCH_RECEIVERS
    *"      USER_NOT_EXIST
    *"      ORIGINATOR_NOT_EXIST
    *"      X_ERROR
    *"      OTHERS
    Modification Log: (Please Flag all changes with the Correction Number)
    Date(MMDDYYYY) Programmer    Corr. #       TM ID
    Description:
    3/18/04        SpechtBN      D81K900520  Updated function module call
                                             for so_object_send, exception
                                             handling and commit work.
    03/02/2005     miranddn      D81K910999  Add option to suppress
    COMMIT WORK statement. Interfering with form outputs. Entered as
    optional parameter so that objects using this function can remain
    unchanged and the function will behave normally for them.
      CLEAR:   T_OBJECT_HD_CHANGE,
               T_USER,
               T_OBJCONT,
               T_OBJHEAD,
               T_OBJPARA,
               T_OBJPARB,
               T_RECEIVERS.
      REFRESH: T_OBJCONT,
               T_OBJHEAD,
               T_OBJPARA,
               T_OBJPARB,
               T_RECEIVERS.
    determine receivers:
      LOOP AT RECEIVERS.
        T_RECEIVERS-RCDAT         = SY-DATUM.
        T_RECEIVERS-RECESC        = 'U'.
        T_RECEIVERS-RECNAM        = 'U-'.
        T_RECEIVERS-RECEXTNAM     = RECEIVERS.
        T_RECEIVERS-SNDART        = 'INT'.
        T_RECEIVERS-SNDPRI        = 1.
        T_RECEIVERS-DELIVER       = 'X'.
        T_RECEIVERS-READ          = 'X'.
        T_RECEIVERS-ADR_NAME      = RECEIVERS.
        T_RECEIVERS-SORTFIELD     = RECEIVERS.
        T_RECEIVERS-SORTCLASS     = 5.
        T_RECEIVERS-SNDCP         = ' '.   " not a copy to ...
        APPEND T_RECEIVERS.
      ENDLOOP.
    Message Header (including subject)
      T_OBJECT_HD_CHANGE-OBJLA  = SY-LANGU.
      T_OBJECT_HD_CHANGE-OBJNAM = 'MESSAGE'.
    Subject
      T_OBJECT_HD_CHANGE-OBJDES = SUBJECT.
      T_OBJECT_HD_CHANGE-OBJSNS = 'S'." sensitivity Std,Func,Priv. S,F,P
      T_OBJECT_HD_CHANGE-VMTYP  = 'R'.     "object type T = transaction
      T_OBJECT_HD_CHANGE-ACNAM  = 'U'.
    Sender
      IF SENDER = SPACE.
        T_USER-SAPNAM             = SY-UNAME.
      ELSE.
        T_USER-SAPNAM             = SENDER.
      ENDIF.
      CALL FUNCTION 'SO_NAME_CONVERT'
        EXPORTING
          NAME_IN  = T_USER
        IMPORTING
          NAME_OUT = T_USER
        EXCEPTIONS
          OTHERS   = 8.
      IF SY-SUBRC NE 0.
        T_USER-SAPNAM      = 'SPECHTBN'.
      ENDIF.
      T_OBJPARA-NAME            = 'MESSAGE'.
      T_OBJPARA-LOW             = SY-DATUM.
      APPEND T_OBJPARA.
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
      FOLDER_ID                        = ' '
      FORWARDER                        = ' '
      OBJECT_FL_CHANGE                 = ' '
        OBJECT_HD_CHANGE                 = t_object_hd_change
      OBJECT_ID                        = ' '
        OBJECT_TYPE                      = 'RAW'
      OUTBOX_FLAG                      = ' '
        OWNER                            = SENDER
      STORE_FLAG                       = ' '
      DELETE_FLAG                      = ' '
      SENDER                           = ' '
      CHECK_SEND_AUTHORITY             = ' '
      CHECK_ALREADY_SENT               = ' '
      GIVE_OBJECT_BACK                 =
      ORIGINATOR                       = ' '
      ORIGINATOR_TYPE                  = 'J'
      LINK_FOLDER_ID                   = ' '
      SEND_REQUEST_OID                 = ' '
    IMPORTING
      OBJECT_ID_NEW                    =
      SENT_TO_ALL                      =
      ALL_BINDING_DONE                 =
      OFFICE_OBJECT_KEY                =
      ORIGINATOR_ID                    =
      E_SEND_REQUEST_OID               =
        TABLES
          OBJCONT                          = email_text
          OBJHEAD                          = t_objhead
          OBJPARA                          = t_objpara
          OBJPARB                          = t_objparb
          RECEIVERS                        = t_receivers
      PACKING_LIST                     =
      ATT_CONT                         =
      ATT_HEAD                         =
      NOTE_TEXT                        =
      LINK_LIST                        =
      APPLICATION_OBJECT               =
       EXCEPTIONS
         ACTIVE_USER_NOT_EXIST            = 1
         COMMUNICATION_FAILURE            = 2
         COMPONENT_NOT_AVAILABLE          = 3
         FOLDER_NOT_EXIST                 = 4
         FOLDER_NO_AUTHORIZATION          = 5
         FORWARDER_NOT_EXIST              = 6
         NOTE_NOT_EXIST                   = 7
         OBJECT_NOT_EXIST                 = 8
         OBJECT_NOT_SENT                  = 9
         OBJECT_NO_AUTHORIZATION          = 10
         OBJECT_TYPE_NOT_EXIST            = 11
         OPERATION_NO_AUTHORIZATION       = 12
         OWNER_NOT_EXIST                  = 13
         PARAMETER_ERROR                  = 14
         SUBSTITUTE_NOT_ACTIVE            = 15
         SUBSTITUTE_NOT_DEFINED           = 16
         SYSTEM_FAILURE                   = 17
         TOO_MUCH_RECEIVERS               = 18
         USER_NOT_EXIST                   = 19
         ORIGINATOR_NOT_EXIST             = 20
         X_ERROR                          = 21
         OTHERS                           = 22
      IF SY-SUBRC <> 0.
        case sy-subrc.
          when 1.
            raise ACTIVE_USER_NOT_EXIST.
          when 2.
            raise COMMUNICATION_FAILURE.
          when 3.
            raise COMPONENT_NOT_AVAILABLE.
          when 4.
            raise FOLDER_NOT_EXIST.
          when 5.
            raise FOLDER_NO_AUTHORIZATION.
          when 6.
            raise FORWARDER_NOT_EXIST.
          when 7.
            raise NOTE_NOT_EXIST.
          when 8.
            raise OBJECT_NOT_EXIST.
          when 9.
            raise OBJECT_NOT_SENT.
          when 10.
            raise OBJECT_NO_AUTHORIZATION.
          when 11.
            raise OBJECT_TYPE_NOT_EXIST.
          when 12.
            raise OPERATION_NO_AUTHORIZATION.
          when 13.
            raise OWNER_NOT_EXIST.
          when 14.
            raise PARAMETER_ERROR.
          when 15.
            raise SUBSTITUTE_NOT_ACTIVE.
          when 16.
            raise SUBSTITUTE_NOT_DEFINED.
          when 17.
            raise SYSTEM_FAILURE.
          when 18.
            raise TOO_MUCH_RECEIVERS.
          when 19.
            raise USER_NOT_EXIST.
          when 20.
            raise ORIGINATOR_NOT_EXIST.
          when 21.
            raise X_ERROR.
          when 22.
            raise OTHERS.
        endcase.
      ENDIF.
    Begin of D81K910999
    if suppress_commit is initial.
      commit work.
    else.
    Do nothing
    endif.
    End of D81K910999
    ENDFUNCTION.

  • Report Pdf output getting Junk characters for some boiler Plate fields

    Hi All
    For Dunning Letter Report registered in Oracle Applications,made changes in Column headings like added customer number as Kunde for German Letter
    but in pdf output it's appearing as junk characters even date field is happening like that. It's happening for German, Spanish, Italy and French Letters. Working ok for Netherlands, English.
    any input to fix this solution will be great
    Thanks
    Kamalakar.G

    Maybe you check the NLS_LANGUAGE-settings on the client where you "edit" the reports-definition.

  • XML Publisher Report not generating the PDF output.

    Hi,
    I am trying to develop a XML Publisher Report in R12 Vision Instance.
    I have developed the rdf report and concurrent program with XML as output format. Ran the concurrent program and I got the XML output. Based on XML output I have created the rtf template. Using both the template and xml output I have created in Data Definition and Template in XML Publisher Administrator Responsibility. Now I am comming to the concurrent program and running the program, here instead of generating the PDF output it is generating again the XML output and concurrent program completing with warning status.
    When I am trying to do the same in 11i Vision Instance, Concurrent Program completing with normal status and when trying to view the output it is saying "Unable to Publish output for the Processed Request".
    Kindly please help me out in this issue.
    Thanks,
    Manasa.

    Hi Mahesh,
    Here the concurrent programs are not erroring out. It is completing with Warning status and when we click on View Output the output is coming in XML format instead of PDF, this is in R12 Vision Instance.
    In 11i Vision Instance, concurrent program is completing with Normal Status but when we click on View Output it is saying "Unable to Publish output for specified request".
    Thanks,
    Manasa.

  • PDF output does not refresh data in BI Publisher, XML and HTML do refresh

    I just upgraded to BI Publisher 10.1.3.4.0 and I noticed that the PDF format of the reports does not reflect recent changes in data, while XML data and HTML output do reflect changes in data immediately.
    I'm using BI Publisher to print APEX applications reports. When I change some data in APEX forms, I click again in the Print button and the data remains unchanged. I made some testing inside Oracle BI Publisher, and noticed that XML data and HTML output do reflect changes, but PDF output remains with the old data for some unknown amount of time. I cannot identify a method to force the PDF to refresh, just un-log and log in again several times until the data appears updated. This is serious because when users change data and print again, they expect the changes to be reflected in the new printable report, and may not notice that the data is the old version.
    OS is Oracle Enterprise Linux.
    Any help on this will be very welcome.
    Francisco

    Open the report in Edit Mode Click on the reports and in the properties section Uncheck the
    Enable Document Cache Property and your issue should be resolved.

  • Animated GIF in PDF output

    Hi all,
    is it possible to hand an animated GIF to the PDF output (remaining animated)?
    FM10 and AcrobatX work together rather fine concerning other animation formats such as SWF or AVI. I am not sure however wether the PDF format supports animated GIFs at all.
    Robert

    As a side, I've never ever got an embedded avi to covert to pdf.  I do it all in the pdf.

  • PDF outputs continually crash after editing an html source file

    I have English and multiple localized versions of a RoboHelp webhelp project. I have created several PDF outputs for the localized versions. I can generate the PDFs fine when I don't touch any of the html source files.
    However, I had to make a change to one of the html source files to remove a <dl> from the source file. After making the change to the source file in an outside text editor (Notepad ++), I went back to RoboHelp to generate the PDF, and the PDF output crashed.
    The reason I was using an outside text editor is that when I tried to edit the <dl> HTML tags in RH, its HTML editor deleted all text within the tags being edited.  There was no undo at this point.  In anotehr attempt to use the RH Design editor, RH didn’t delete the <dd> or <dt> tags when those tag styles were changed to <h4> and <p>, respectively. RH inserted the new html wrapper inside the existing ones, instead of replacing it.
    Also, during the PDF generation process, a Visual Basic error message will appear dozens of times stating that the application was interrupted.  I must press OK to continue for each error message.
    What gives with the PDF generation failing like this?

    I hate to say it but it sounds like something you are doing in the external editor is not liked by RoboHelp.
    It could just be the way that text editor codes the file. I use EditPad Pro and that has various options for text encoding. My guess is your editor is not set to what RoboHelp expects.
    Aftr that what I would do here is create a new one topic project and recreate the problem, with the minimum of text. It may help you spot the code RoboHelp does not like.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

Maybe you are looking for