How to run 2 reports to send 1 PDF e-mail attachment instead of 2 e-mails.

I used 9i Reports to create 2 reports in a PDF format. I run these reports from a 9i form using the web.show_document command. XML is used to send the 2 e-mails with the reports.
Is there a way I can combine the running of the reports to make one PDF to created 1 e-mail attachment or run the reports at the same time and attach 2 PDF files to 1 e-mail.
I have no problems running 1 report and sending 1 e-mail attacment!
This is example of the XML used in creating the e-mail:
- <destinations>
- <foreach>
- <file id="Test" name="REPORT_1.pdf" format="pdf" instance="XXXX">
<include src="report" />
</file>
</foreach>
- <!-- Send a mail with an attachment
-->
- <mail id="ex1" to="&DESNAME" from="&DESNAME" subject="&DESNAME;*;&p_postal_number: was submitted for
approval on &p_postal_date">
<body srcType="text">This is to notify you of a new submission that requires an approval before being
sent to out. Please use the URL link below to review the information as soon as possible.
https://xxxx.aaaa.sss.com:234/web_html/static.html AAAA Administrator</body>
- <attach format="pdf" name="Report_1&.pdf" srcType="report">
<include src="mainSection" />
</attach>
</mail>
</destinations>

You can use iText to combine two PDF files into one.

Similar Messages

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to run GR55 reports in background for cost center hierarchies

    1.  I have been asked by our users to create batch jobs to run in the background for some GR55 reports, that can then be sent directly to cost center managers via email.
    I have figured out the process to do this as long as the cost center manager only needs to see a single cost center at a time.  However, if they are in charge of multiple cost centers, we also want to send them a summarized report using the hierarchy we have set up.  I can't seem to make this work, as the job only seem to recognize the last cost center in the group and the report is for that cost center.
    Example.  cost centers 100, 200 and 300 belong to hierarchy abc.  If I run the job just for cost center 100 it is fine.  But if I have a variant to run hierarchy abc, or even if I use the range 100 to 300, all I get is a report for cost center 300.
    We cannot use BW because we only have revenue in BW.  I am being asked to make this work from standard R/3 within the GR55 realm of reporting.
    2.  In addition, the report selection criteria includes two separate plan/forecast versions.  They need to update these each month prior to running the reports and sending them out.  I looked at the variables associated with the versions and tried to set them up with default values that I hoped would update automatically so that they don't have to manually change 50 or so variants each month.  But I don't see any dynamic variables that I can use to have the system make that change without going into each variant individually.
    3.  There is another piece to this equation as well.  There is another report they want sent out in batch, but it is several pages wide in SAP and several pages long.  So when you run it in batch and either spool it or get it sent as an email, it is very ugly in the formatting due to all the page splits horizontally and vertically.  If anyone knows how to get the report to stay together like it would if you had excel integration turned on, it would be very helpful.  I have tried running it with that integration turned on, but the jobs are set up with user batch_mgr and not my id, so it isn't working well.  The batch_mgr id is just a system id, not a dialog id.  We also don't want the jobs set up with a regular user id because if people leave, then the jobs all need to be changed.

    Kim,
    I may have options for issues 1 and 2. In case of 3, what I can tell you is I understand the concern, but this is what  typically happens in some standard CO reports that are not ALV compatible, I don't think there is not much  there to do unless you add some custom code for the output.
    In regards to point 1, yes,  I have noticed that this happens in some standard and custom reporting, not sure what is going on. I came up with a work around that  made the trick for my client in a similar scenario; which is editing the cost center groups. For instance, instead  of having the group set as a range from 100 to 300,  the groups are have  listed the cost centers, 100, 200 and 300. Obviously, the disadvantage of  this option is  that it would require a bit of more cost center group maintenance.
    In regards to point 2,  I understand from your note  that your users already have set up selection variants for the report. One option for you is to get the help from a developer to create a custom period variable and tiny program that runs in batch every month that would update that variable accordingly. Once that's done, you may have to update at least once, the selection variant  attributes to change the period to a selection variable, so everytime from that point of time forward that the variable gets updated,  it will be ready with the right value for every selection variant that uses it.
    Hope this helps.
    GG

  • How to run a report from oracle 10g form in .csv format

    dear all,
    how to run a report from oracle 10g form in .csv format? i've already run in pdf & excel format.
    i'm using
    SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'PDF'); --for pdf
    SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'SPREADSHEET'); ---for excel
    Please Help..

    i have already tried.
    but the report show in htm or html format. that file will not save into csv. please help.

  • How to run a report in form 10g

    How to run a report in form 10g;

    RUN_REPORT_OBJECT - check the on line help and there is a great paper on otn.oracle.com/products/forms and click on 9i papers (it will be relevant for 10g as well)>
    Regards
    Grant Ronald
    Forms Product Management

  • How to Run a Report automatically in Background for every night

    Hi,
    How to run a report program in Background automatically for every nigh.
    Thanks
    Ramesh

    Hi Ramesh,
    You can use SM36 and use the "Job Wizard" to define a background job in simple step by step procedure
    Or
    Goto SM37 and specify a job name.
    Next specify the ABAP Program Name of the report you want to execute under Job Step.
    Then click on "Extended Job Selection" and goto the Period Tab.
    There select "Only Periodic Jobs" and then specify the frequency of execution based on Months, Weeks, Days, Hours or Minutes.
    Hope this helps,
    Regards,
    Madhur
    Message was edited by: Madhur Chopra

  • How to run a report in back ground

    how to run a report in background with out using job open, submit , close is there any other function module to run report in background.

    Hi,
               There are two ways for you to handle,
    one manually setting up the job through SM36 which is better and convinient,
    secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
    Find below steps in doing both:
    Procedure 1:
    1. Goto Trans -> SM36
    2. Define a job with the program and variant if any
    3. Click on start condition in application tool bar
    4. In the pop-up window, click on Date/Time
    5. Below you can see a check box "Periodic Job"
    6. Next click on Period Values
    7. Select "Other Period"
    8. Now give '15' for Minutes
    9. Save the job
    Procedure 2 via Program:
    Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
    L_RELEASE(1) TYPE c.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = 'ZTEMP2'
    IMPORTING
    JOBCOUNT = P_JOBCNT
    EXCEPTIONS
    CANT_CREATE_JOB = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING = 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.
    SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
    TO SAP-SPOOL WITHOUT SPOOL DYNPRO
    WITH DESTINATION = 'HPMISPRT'
    WITH IMMEDIATELY = SPACE
    WITH KEEP_IN_SPOOL = 'X' AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    JOBCOUNT = P_JOBCNT
    JOBNAME = 'ZTEMP2'
    STRTIMMED = 'X'
    PRDMINS = 15
    IMPORTING
    JOB_WAS_RELEASED = L_RELEASE
    EXCEPTIONS
    CANT_START_IMMEDIATE = 1
    INVALID_STARTDATE = 2
    JOBNAME_MISSING = 3
    JOB_CLOSE_FAILED = 4
    JOB_NOSTEPS = 5
    JOB_NOTEX = 6
    LOCK_FAILED = 7
    INVALID_TARGET = 8
    OTHERS = 9.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Hope the above helps you.
    <b>Reward points</b>
    REGARDS

  • How to run a report in SAP

    hi sap gurus
    can anybody tell me about how to run a report in sap (ABAP). what is the TCode for that one.while i am trying to post asset master it is asking to start a report first and then post. kindly reply me soon
    thanx in advance

    Hi,
    - normal ABAP reports are executed by a TCode or SE38
    - reports relating to assets are located at SPRO-Info Systems-Accounting-Fixed Assets
    Rgds.

  • How to run the report RM07CUFA?

    How to run the report RM07CUFA?

    Go to SE38 and enter RM07CUFA and click execute.
    in the next screen enter details for
    Movement Type
    Special Stock Indicator
    Company Code
    G/L Account
    and execute.
    If you have any inconsistency with fields that will be shown with red colour..

  • How to run OBIEE Reports in Multi-Org Environment?

    How to run OBIEE Reports in Multi-Org Environment of EBS.

    hi Rainer,
    My Forms and Reports Server is in Same System only. Actually i am giving this path
    http://vagee.ail/reports/rwservlet?
    server=rep_vagee_oracle10g_apps_server&report=D:\FP2
    \dealer_reports\oc_dealer.rep&userid=fp2/fp2erp@info
    &destype=cache&desformat=pdf&ODSNO=OC0809/00110&branch=DLR002
    In My AS System Running Successfully. But Client systems Page cannot be display message is displaying.
    but generally i m able to access the reports server using this path
    http://vagee.ail/reports/rwservlet?
    then Reports server page is displaying but
    when i specify that report server name
    http://vagee.ail/reports/rwservlet?server=rep_vagee_oracle10g_apps_server
    page cannot be displayed.
    what will be the problem. please help me. thank you.
    Regards,
    Kalyan.

  • How can run the report SAP_INFOCUBE_DESIGN?

    hI gURUS
    To know about the DIM Table size
    How can run the report SAP_INFOCUBE_DESIGN?
    Thanks
    Cheers
    Durai

    Function (se37):
    RSDEW_INFOCUBE_DESIGNS
    Try to see/run this function in order
    to get statistic about one InfoCube
    How to determine the size of DIM?
    From this Function u can determine
    how many rows in DIM u have.
    After this u can determine size of DIM table:
    ROWS * (How many Bytes are in one row) = Size of table.
    In order to determine how many Bytes are in one row,
    u can see transaction se11 -> Database table -> Tabkle name of DIM -> Display -> Fields -> just add the length*Bytes for all fields in this table.
    BR

  • How can I set information broadcasting (send Workbook with E-mail) in serv.

    FYI: I set a broadcasting schedule to send workbook with e-mail. The pre-calculated server was set already.
    How can I set information broadcasting (send Workbook via E-mail) when I cannot access enterprise portal ?

    Hi,
    Check this thread:
    Work book broadcasting
    Regards
    Pcrao.

  • Error opening the PDF file while sending the PDF as an attachment

    Hi All,
      I am sending a PDF as an attachment in the mail. I am using the code pasted on 'Jul 28, 2006 8:59 AM' subject OTF Format of Purchase Order in email unreadable.
      My problem is when I open the attachment in SOST or in the mail, I get the error message "Adobe could not open *.PDF because it is either not a supported file type or because the file type has been corrupted."
      Please let me know if anybody has faced such an issue.
    The code is found below.
    FORM MAIL_OBJECT                                              *
          This routine receives OTF data. OTF data is converted to PDF
          format and send to the Partner's email address
    FORM mail_object TABLES otf_data STRUCTURE itcoo .
      DATA: pdf_size TYPE i,                             " PDF Size
            pdf_itab_size TYPE i,                        " Attachment size
            mailtxt_size TYPE i,                         " Text in mail size
            l_vbeln LIKE vbdka-vbeln.                    " Order Doc
      DATA:
      it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,    " Mail Text
      it_pdf TYPE TABLE OF tline WITH HEADER LINE,           " OTF output
      it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
      it_mailhead LIKE solisti1   OCCURS  1 WITH HEADER LINE," Header data
      it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,   " Rec List
      it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE.  " Attachment data
      DATA: it_doc_att LIKE sodocchgi1.                 " Attri of new doc
      DATA: BEGIN OF it_pdfout OCCURS 0,                " PDF in 255 length
               tline TYPE char255,
            END OF it_pdfout.
    Sales doc and Customer
      DATA: BEGIN OF i_vbeln OCCURS 0,
              vbeln LIKE vbpa-vbeln,       " Sales Document
              adrnr LIKE vbpa-adrnr,       " Customer
            END   OF i_vbeln.
    Sender Address no and SMTP address
      DATA: BEGIN OF i_addrs OCCURS 0,
              addrnumber LIKE adr6-smtp_addr,
              smtp_addr  LIKE adr6-smtp_addr,
            END   OF i_addrs.
    Convert OTF to PDF
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format       = 'PDF'
        IMPORTING
          bin_filesize = pdf_size
        TABLES
          otf          = otf_data
          lines        = it_pdf.
    Make each line 255 characters
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        TABLES
          content_in  = it_pdf
          content_out = it_pdfout.
    Create the PDF File
      CLEAR it_pdfdata.
      REFRESH it_pdfdata.
    it_pdfdata[] = it_pdfout[].
      LOOP AT it_pdfout.
        MOVE it_pdfout-tline TO it_pdfdata-line.
        APPEND it_pdfdata.
        CLEAR it_pdfdata.
      ENDLOOP.
      DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
    Text in the mail.
      it_mailtxt-line  = 'ORDER ACKNOWLEDGEMENT'.
      APPEND it_mailtxt.
      it_mailtxt-line  = ' This is a test mail,  Line Number--1'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--2' &
                        ' This is a test mail,  Line Number--2'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5'.
      APPEND it_mailtxt.
      DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
    Document Number for Output
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = vbdka-vbeln
        IMPORTING
          output = l_vbeln.
    Attributes of new doc
      CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
                  INTO it_doc_att-obj_descr SEPARATED BY space.
      it_doc_att-sensitivty = 'F'.
      it_doc_att-doc_size   = mailtxt_size * 255.
    Create Pack to text in mail body.
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 0.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = mailtxt_size.
      it_mailpack-doc_type     = 'RAW'.
      APPEND it_mailpack.
    Create Pack to PDF Attach.
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = pdf_itab_size.
      it_mailpack-doc_type     = 'PDF'.
      CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
      CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
      it_mailpack-doc_size     = pdf_itab_size * 255.
      APPEND it_mailpack.
    *Get email addresses based on Sales document.
      SELECT vbeln adrnr INTO TABLE i_vbeln
             FROM vbpa
             WHERE vbeln = vbdka-vbeln AND
                   parvw = nast-parvw.
      IF NOT i_vbeln[] IS INITIAL.
        SELECT addrnumber smtp_addr INTO TABLE i_addrs
               FROM adr6 FOR ALL ENTRIES IN i_vbeln
               WHERE addrnumber =  i_vbeln-adrnr AND
                     smtp_addr NE space.
      ENDIF.
      IF i_addrs[] IS NOT INITIAL.
        LOOP AT i_addrs.
          it_reclist-receiver   = i_addrs-smtp_addr.
          it_reclist-express    = 'X'.
          it_reclist-rec_type   = 'U'.
          it_reclist-notif_del  = 'X'. " request delivery notification
          it_reclist-notif_ndel = 'X'. " request not delivered notification
          APPEND it_reclist.
          CLEAR: i_addrs.
        ENDLOOP.
      ENDIF.
    Call FM to send email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = it_doc_att
          put_in_outbox              = 'X'
        TABLES
          packing_list               = it_mailpack
          object_header              = it_mailhead
          contents_txt               = it_mailtxt
          contents_hex               = it_pdfdata
          receivers                  = it_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorizationfiltered= 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_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.
    ENDFORM.                    " MAIL_OBJECT
    Regards,
    Ajith

    Hi Ajith !!
    Please refer this link :
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Here a spool output is converted into PDF and then sent as an email.
    I think instead of using FM to change the width, try the logic mentioned in the link.
    Also instead of FM CONVERT_TO_OTF use :
    1. CONVERT_OTFSPOOLJOB_2_PDF
    I hope this should solve the problem.
    I had referred the same program from the link and it worked absolutely fine. Also check the adobe acrobat version, i guess old version doesnt support SAP, though not very sure.
    Best regards,
    Prashant

  • Sending a pdf with mail that is directly seen by opening the mail?possible?

    hello,
    I want to send a pdf by Mail but I would like the receiver to click on my email and that he/she will see the complete pdf immediately.
    is that possible?
    thanks
    Hein

    that depends on the mail client of your email recipient. There is nothing you can control on the sender end. For example, Mail will display pdf attachments inline automatically.
    Message was edited by: V.K.

  • How to run a report to a file ascii in forms/report 10G

    We have an application in form an report 6i and we are going to translate it in 10G dev suite.
    We have a problem with any forms modules which run report to file ascii with particular format.
    After these files are send to printer o machine with host comand (we use the webutil for the host comand).
    How can we run tese reports to file ascii ?

    Hi,
    if you print a Reports to the file system then this happens on the server. Your options are
    a) Run the Reports with destype=cache and have the user printing it from the Browser
    b) Print the Reports to the file system as before and make the directory accessible on the Web so that you can call the file using web.show_document()
    c) You use Run_Report_Object() and print the reports to a network printer next to the user
    d) check otn.oracle.com/products/forms for orarrp (an unsupported utility but working)
    Frank

Maybe you are looking for

  • Mac Mini using OS X Tiger does not see my HP Scanjet 4670 scanner! HELP!!!!

    I have an HP Scanjet 4670 scanner which worked fine on my pervious mac which was an emac with OS X Panther. However, I now own a G4 Mac Mini running with OS X Tiger and recenly tried to use my scanner with it for the first time only to get the messag

  • Default Background Colour not Black?

    I'm having a very irritating problem with the Windows default background colour. A while ago I had set it to this off-shade of yellow, but now whenever I make a new theme (or even load a saved one) my background colour reverts to this aforementioned

  • How to compile my own applications

    Hello, I have been working through a book on J2ee, and getting on very well, apart from the fact that I cant create my own applications because I dont know how to compile them!!! Im used to just typing javac classsname.java, and it all gets done - I'

  • AP Create Accounting - Error ORA-06512, XLA-95103, ORA-20001, ORA-20100

    *Hello all you patient Oracle Champs - I know issues like this are floating around the forum and web but I still can't seem to fine a match.* *> OA R12.1.3* *> Orcale Database Server 11.2.0.2* [010613_011550898][][EXCEPTION] SQLException encounter wh

  • BEA 38002 error in osb

    Hello Guys, I am getting a http response code "404" error "not found" for one of our soap based web services. Its an internal dot net webservice. I am able to telnet the IP and port of this webservice from my machine. Also I have tried to test only t