Dynamic file attachment in distribution.xml
Hi
I'm trying to attach a PDF file to a report using a distribution.xml file. If I hard code
the filename it works fine but I need to attach a different file to every report so want
to use a variable. Unfortunately this gives the error:
Terminated with error: <br>REP-34304: Cannot locate the external file '&p_attachment' specified in destination 'm1'
REP-34304: Distribution failed to complete; review the distribution lists My distribution.xml file is as follows:
<destinations>
<foreach>
<mail id="m1" to="&p_email_to" from="&email_from" subject="&email_subject">
<body format="html" srcType="report" instance="this">
<include src="mainSection"/>
</body>
<attach name="ReturnNotice.pdf" srcType="file">
<include src="&p_attachment"/>
</attach>
</mail>
</foreach>
</destinations>Any ideas?
Thanks
Martyn
To answer my own question, changing
<attach name="ReturnNotice.pdf" srcType="file">to
<attach name="ReturnNotice.pdf" srcType="file" instance="this">fixes the problem...
Similar Messages
-
Dynamic file name in Export: XML
I am generating a SQL report on a page that can be exported as XML File and It seems to me the file name come from the name of the report region by default and I 'd like use a value of an item as the XML file name.
I tried to put &P15_ITEM. as name of report region, then the XML file name I got is: p15_item[1]..xml. But if I change the Report Template back to Standard Template, the region name displays the value of P15_ITEM.
So, my question is, Is ther anyway we could reset the file name of the XML file, such as the value of an item, In Version 1.6.?
Million Thanks,
RanThank you Raj for the direction
The way to do it is :
1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
2. Put a "*" on the file name scheme
3. In IR, create a UDF to set up target file name :
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// set up file name for receiver adapter
String SourceFileName = conf.get(key);
conf.put(key, TargetFileName);
return " ";
4. Map the above UDF to the header level of the target structure.
Regards,
Idi -
Dynamic file name of the attachment in receiver mail adapter
Hi
I have configured a receiver mail adapter which receives the payload as an xml attachment.
Right now the file name of the attachment is hardcoded to "invoice.xml".
I want to set it to dynamic ie. instead of "invoice.xml"... i want it as "invoice<invoicenumber>.xml".
Invoice number is present in the payload.
please suggest a solution w/o the need to develop a custom adapter module.
Thanks!
Regards,
Faria MithaniHi,
Go through this thread..
Dynamic File Name for Receiver File Adapter
Regards,
Sarvesh -
Pass the file id or a parameter from a report (10g) to the distribution.xml
Is there any way to pass the file id or a parameter from a report (10g) to the distribution.xml file?
Hi,
Please review article ID 273960.1 on metalink.
The article actually describes an issue one may run into while enabling a reports distribution xml file to accept dynamic values, but you can extract the answer you're looking for by studying the above mentioned note.
Best Regards and Good Luck,
Mircea. -
Xml file in dynamic file name in file receiver adapter
Hi,
I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
Does anybody have the solution to my problem? thanks in advanceThank you Raj for the direction
The way to do it is :
1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
2. Put a "*" on the file name scheme
3. In IR, create a UDF to set up target file name :
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// set up file name for receiver adapter
String SourceFileName = conf.get(key);
conf.put(key, TargetFileName);
return " ";
4. Map the above UDF to the header level of the target structure.
Regards,
Idi -
Dynamic file name as mail attachment in receiver Mail Adapter?
Hi,
Can any one tell the possibility of attaching file as a mail attachment without using mail Package with dynamic filename.
Business requirement is to send error response as mail attachment with dynamic name.
Ex: Error_Response_20110802_13.24 where 20110802 is Date and next part represents time stamp.
File attachment name should change dynamically in Mail receiver Adapter. Thanks
Regards,
Sreeramulu Konjeti.there is no standard way.
you will have to write a module to get this in place.
other ways are;
XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping - /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Dynamic name in the mail attachment - pseudo "variable substitution" :
/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution -
Dynamic File Name attachment in Mail Adpater
Hi All,
We have Requirement where we need attach file with Dynamic Names in mail adapter PI7.0 .Right now we are using some of the modules to genarate file attachement with hard coded value for name of the file.
Java beans we are using are
localejbs/AF_Modules/StrictXml2PlainBean
localejbs/AF_Modules/MessageTransformBean
localejbs/AF_Modules/TextCodepageConversionBean
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
Please let us know how we can acheive this.
Thanks,
MadhuHi Madhusudhan,
File attachment with the dynamic name is possible by using the Adapter module as well as without the Adpater module through coding.
let me know which kind of attachment you want in mail and which is your sending system (like SAP R/3)?
Thanks & Regards
Jagesh -
File attachment in XML file of inbound interface
Hi friends
Working in ERP EHP6.0 and SRM7.0
I attached DMS file in PR document at ERP and transferred to SRM using interface PurchaseRequestERPSourcingRequest_out.
But PR generated XML in ERP does not have the attachment file eventhough they have attachment folder.
How to debug this ? which Func module attach the file to interface generated XML file?
Trying to use CPPR and transfering PR via BADI ME_REQ_Source_Cust.
I tried using saving file in content server and transfer using PR but attachment is not picked up in XML file while checking in SXMB_MONI.
Does the note: SAP Note 974332 - No attachments transfer within external requirements
is referring my problem?
I doubt whether the above is pointing for RFC transfer program...is it not?
Pls confirm.Hi Prince,
Check with BAPI_DOCUMENT_CHECKIN , it may help you.
Regards,
Ravindra -
No XML file attachment when using Submit by Email button
Hello all -
I'm using LiveCycle Designer 8.0 to create a simple form, and am using the Submit by Email button to return the user supplied data. When I save the form and test it with Adobe Acrobat Professional 8.1.1, the email goes through just fine, but there is no attachment. No XML file, no nothing. Just a blank email with my signature block at the bottom. Has anybody else experienced this? Any ideas on what could be wrong? All I want is the XML file.You have multiple options to sending whole PDF format.
1) Set the submit button to submit whole PDF format by using a mailto: [email protected] in the submit button action URL.
2) Set the submit button to fire a javascript that submits whole PDF format. See Adobe's Javascript reference guide for instructions.
Note: Methods #1 and #2 require Adobe Acrobat or Extended Reader Rights; because, Adobe Reader users are restricted to submitting just the data formats; such as FDF,XML, XFDF, XDP, and HTML. Beware extending reader rights to a PDF form using Adobe Acrobat places end user EULA restrictions, such as not more than 500 end user submissions for each form.
My Recommendations:
#3) Set the submit button to point to a URL of a server-side script; such as ASP.net. Then set the format to a data format; such as FDF, XML, XFDF, or XDP; and use ASP.net and iTextSharp (Free) to merge the data with a blank PDF form; and attach the submission to an outbound SMTP mail message and send without 3rd party email software such as MS OUTLOOK.
#4) A combination of #1 and #3; where you enable usage rights on the PDF using Adobe Acrobat; and send to a server-side script which bypasses client-side email software.
Check out the following website for online examples that submit to a server side script:
www.pdfemail.net/examples/ -
XML datasource: dynamic file name and location
I have an RDF file that uses an XML file as its datasouce. I have supplied it a valid DTD file location and a valid XML file location, via the report wizard. I would like to programatically change the name of the XML file at runtime. What are my options...use an XML customization? I would like to do it in an after parameter form trigger. Is this possible?
If I have to use an XML customization, is it possible to only customize part of the datasource tag. For example, here is my datasource tag (not from an RDF, but an XML report definition)
=====================================================
<dataSource name="QP_1">
<plugin factoryClass="oracle.reports.plugin.datasource.xmlpds.XMLDataSourceFactory"
majorVersionNumber="1" minorVersionNumber="2"
signOnParameter="XML_HTTPS">
<![CDATA[<xmlpds DTDVersion=" 1.0">
<dtd>file:C:/downloads/LVB.dtd</dtd>
<schema>null</schema>
<XSQLschema>null</XSQLschema>
<XSQLWithDTD>false</XSQLWithDTD>
<type>false</type>
<xmlWritten>true</xmlWritten>
<validate>false</validate>
<xml>file:C:/test/175.xml</xml>
<xsl>null</xsl>
<select>
<element name = "typef" type = "string" s_simpleTypeMapping = "string" /> <element name = "Volume" type = "string" s_simpleTypeMapping = "string" /> <element name = "Trades" type = "string" s_simpleTypeMapping = "string" /> <element name = "Percent_Total_Vol" type = "string" s_simpleTypeMapping = "string" /> <element name = "Percent_Total_Trd" type = "string" s_simpleTypeMapping = "string" /> </select>
<simpleTypesInfo></simpleTypesInfo></xmlpds>]]>
</plugin>
<displayInfo x="1.65002" y="1.00000" width="0.69995" height="0.19995"/>
<group name="G_1">
<displayInfo x="1.30188" y="1.94995" width="1.39624" height="0.77246"
/>
<dataItem> ...stuff here... </dataItem>
</group>
</dataSource>
==================================================
How can I only customize the <xml>file:C:/test/175.xml</xml>?
I only want to change the name of 175.xml to something like 176.xml.
I have to put in a valid XML when I create the report via Reports Builder, but once it is in there I need to change it.Hello Danny,
I am trying to pass a user parameter into the xml location <xml></xml> tags like you did but am having problems. If it's not too much trouble, would you please send me a sample of your source code so I can check my syntax? Below is my code and the error message I am getting. Any help would be greatly appreciated, I've been stuck on this for days! Thanks!
<rw:report id="recoveryCenterScheduleReport" parameters="server=myreportserver&userid=ssstage/ssstage@DEVL&p_xmlDataURL=http://10.3.35.119:9004/ssapp/servlet/ScheduleDataServlet">
<rw:objects id="objects">
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<report name="XMLscheduleReport" DTDVersion="9.0.2.0.0">
<xmlSettings xmlTag="XMLSCHEDULEREPORT" xmlPrologType="text">
<![CDATA[<?xml version="1.0" encoding="&Encoding"?>]]>
</xmlSettings>
<data>
<userParameter name="XML_HTTPS" datatype="character"
pluginClass="oracle.reports.plugin.datasource.xmlpds.XMLDataSourceFactory"
width="255" defaultWidth="0" defaultHeight="0" display="no"/>
<userParameter name="p_xmlDataURL" datatype="character" width="100"
precision="10" defaultWidth="0" defaultHeight="0"/>
<dataSource name="QP_1">
<plugin
factoryClass="oracle.reports.plugin.datasource.xmlpds.XMLDataSourceFactory"
majorVersionNumber="1" minorVersionNumber="2"
signOnParameter="XML_HTTPS">
<![CDATA[<xmlpds DTDVersion=" 1.0">
<dtd>null</dtd>
<schema>file:///C:/Practic Workspace/Practice/WEB-INF/xsd/scheduleReport.xsd</schema>
<XSQLschema>null</XSQLschema>
<XSQLWithDTD>false</XSQLWithDTD>
<type>false</type>
<xmlWritten>true</xmlWritten>
<validate>true</validate>
<xml>&<[b]p_xmlDataURL></xml>
<xsl>null</xsl>
javax.servlet.jsp.JspException: rwlib-1: REP-0002: Unable to retrieve a string from the report builder message file.
REP-0069: Internal error
XMLPDS-63004:Generic error while parsing the URL stream name instead of <.
REP-4111: Fail to create pluggable data source 'QP_1'
at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
at jsp.reports._schedule._XMLscheduleReport._jspService(_XMLscheduleReport.java:87)
.... -
Dynamically update swf file in sharepoint using xml data
Hi,
I need some help/enlightenment on how to auto-update the swf file in sharepoint using xml data.
I am encountering an error "Cannot access External Data" and pointing to adobe's Cross-domain policy file extension.
My questions is:
1. Where should the cross-domain file be copied? In the sharepoint webserver's root folder?
Right now, we generate the swf file from xcelsius and manually upload them in the sharepoint. However, we wish to automate the data content of this file.
Thanks for the help.
EmersonGetFileByServerRelativeUrl.... since you're getting a FILE, you'll need a URL to a FILE (not just a library)... by SERVER relative URL, so you'll need to include the site collection path and such, not just the subsite relative URL.
Now working fine....
url: appweburl + "/_api/SP.AppContextSite(@target)/web/ GetFileByServerRelativeUrl('/sites/apps/Shared Documents/test.txt')/CheckOut()?@target='" + hostweburl + "'",
method: "POST",
data: metatdata, -
Distribution.xml problem in 10g reports...
Hi freinds,
Iam generalizing the distrubution.xml file for emailing from the report. It looks like this.
<destinations>
<mail id= "mail_id" to= "&<P_recipient_email>" cc= "&<P_cc_email>" bcc= "&<P_bcc_email>"
from= "&<P_sender_email>" subject= "&<P_mail_subject>">
<body srcType="text">
"&<P_mail_body>"
</body>
<attach format= "&<P_format>" name= "&<P_attachment_name>" srcType="report">
<include src="report"/>
</attach>
</mail>
</destinations>
I have 3 problems.
1) When I pass dynamic value for "format" attribute it is giving following error :
REP-34304: 7
NMToken must contain atleast one NMChar.
REP-34304: Distribution failed to complete, please review the distribution lists
How Can I pass a dynamic value for "format" attribute in the < attachment > tag ?
2) When I pass dynamic value for "attachment name" attribute it is giving following error :
REP-34308: Invalid reference parameter 'P_attachment_name' in distribution list
How Can I pass a dynamic value for "name" attribute in the < attachment > tag ?
3) I want to pass the body text dynamically from the report. So Iam passing P_mail_body parameter from the report
and referencing in the distribution.xml file like this, "&<P_mail_body>".
But it is not printing the p_mail_body variable value.
It is printing "&<P_mail_body>" in the body of the email.
How to pass dynamic body text from the report into distrubution.xml file ?
Plese help me.
Thanks alot.Hi all,
first of all I would recommend not to use &, < and > inside the xml-definition. Use instead of
&<ename>
the following coding
&<ename>
This is because Reports and XML have a overlapped using of these signs.
1: no anser, sorry for that
2: I've testet with
name="Department &<deptno>.pdf"
which works fine
3: You can build your dynamic body for example in the header of the report and reference them in the distribution file. Then your XML-File looks like
<body srcType="report" format="html">
<include src="headerSection"/>
</body>
For the Header you had to use the same "Repeat On" Property Value than for your Report Body, if you use advanced bursting.
Hope that helps
Rainer -
How to determine the size of a flat file attachment in a mail sender cc?
Hi
I use PI 7.11
I have a scenario where a flat file attachment is being picked up by a MailSender adapter and if the size of the attached flat file is larger that 500 bytes the receiver is A and if the attachment is less that 500 bytes the receiver is B.
I have checked the Context Object list in the Conditions section of Receiver Determination, and it seems, that only the file adapter allows for validation on the file size.
I contemplated an extended receiver determination but the attachment is a flat file which just needs to be passed thru without being converted to an XML document, so my source document is not of XML format.
An other but not very nice way would be to use an intermediate folder to drop the attachment in and from there use a file sender adapter and thus get access to the filesize attribute in my receiver determination, but I would like to avoid this.
Any suggestions?
BR MIkaelHi
I have decided to make a module, where I plan to place the size of the attachment in the Dynamic Configuration variable "ProcessStep", but to my surprise, it seems that all the context objects in the receiver determination condition section are of type String and hence it is not possible to make a condition where I test for whether the value is smaller than say 500!? Only equal, NOT equal and LIKE are available (EX seems to be disabled as this probably only works in an xpath.
Would one way be to use the xpath expression like this ns1:Main\ProcessStep < 500 where ns1: http://sap.com/xi/XI/System?
MIkael -
Report distribution.xml Issue for Mailing!!!
In my distribution.xml file for mailing.
1. I want a to create hyperlink in email body for which few parameters need to come from report like formname,org_id & reqno which are already in .rdf.
I tried this in body but its NOT working like it works in subject cc bcc etc. to display
<body srcType="text" >
http://dw123:8889/forms90/f90servlet?config=myApp&firstparam=po_requisition_approval&secondparam=&<org_id>&thirdparam=&<reqno>
</body>
2.how can i use anchor tag of html in this above xml body .
For the same link i want to create a anchor tag and i wil give some desc.
for eg. "click here to approve"
by clicking on text the above link need to executed.
Quick response will be appreciated.
Thanks in Advance.Hi dmars,
What u said i right?
But still i did'nt got what i need.
i.e i want to replace the variable to actual data from report under email body
like i do in to,cc,bcc while mailing.
for eg here is my dist.xml file
<destinations>
<!-- Send a mail for each warehouse with the corresponding file attaceed-->
<foreach>
<mail id="ex2"
to="&<email>"
from="[email protected]"
subject="Auto Mail - Request for Purchase ">
<body srcType="text">
Dear &<name>
Please find the attached RFP (Request for Purchase) with the Mail.
Thank you,
</body>
</mail>
</foreach>
variable "to" is coming from report.
In the same way i want under body after Dear, the varible need
to be place which is too from report.
But this Dear &<name> does'nt work WHY???
</destinations> -
Error when attaching a remote XML source
Hello,
When I try and attach a remote XML source to my XSL file,
Dreamweaver CS3
tells me "Unable to locate or parse the XML source".
The XML file in question is located at
http://weather.yahooapis.com/forecastrss?p=UKXX0085
- which is a fully
functioning URL to an XML page - I can load it okay, and I
can view the XML
source.
Why does Dreamweaver report that it cannot access it? If I
open the source
of that URL and save it as a .xml file and attach it to my
XSL locally, it
works just fine - so it works locally but not remotely. The
source is likely
to change frequently, so attaching a local XML file is not an
option.
If I ignore the Dreamweaver error message and use that source
anyway, the
browser just responds with "An error occured while loading
XML document
http://weather.yahooapis.com/forecastrss?p=UKXX0055".
Error message was: A
connection with the server could not be established ".
The only thing I can think of is, the URL to the XML source
doesn't end in
".xml" - but then again, hardly any XML sources on the web do
so I can't be
the first person who wants to try and incorporate one in
their site like
this!
Any help appreciated!
Cheers,
D.> I'm told that, in the ASP that uses the XSL fragment, I
can define the
> proxy server manually so that the request can still be
made. Try as I
> might I cannot find any code for ASP.net or ASP VBScript
that allows me to
> manually specify the proxy to be used (or, indeed, to
force the code to
> use the browsers default proxy). Any ideas?
Okay, now using this in a new file called web.config
<configuration>
<system.net>
<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="
http://myproxy.blah.blah:80"
bypassonlocal="false"
/>
</defaultProxy>
</system.net>
</configuration>
All is well - except, that restricts the app to people who
are using this
proxy - any idea how to fix that code to make it default to
the users
browser settings? (Which I thought was the default in .Net
but maybe not??).
D.
Maybe you are looking for
-
Hi forum, Does anyone know how to put a scale/ruler in an image? I do macro and would like to show the size of my objects with a ruler. Koen
-
Circular linked list while loop
i have a circular linked list and i'd like a while loop to iterate though all of them. my problem is that it always excludes the last node. i know why, it's due to the fact that "current.next != alive" skips it from ever accessing the last node. i ca
-
Transfer of selection screen parameters
Hi, I have a program in classic ABAP which is actually 2 programs: Program 1: This program is the program that contains the selection-screen and it calls the related program by SUBMIT, see below: SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE t
-
Can we query a stored procedure results as an SQL Table ?
Hi, Can we query a results from the results of a stored procedure returning a result set either as cursors or as PL/SQL Table like what we do like this select * from <tablename> select * from (select * from tablename) alias. instead of this, can we d
-
How to split a page in to two in smart form
how to split a page into two in smart form, so that the data that is printed in one column when reaches the end of the column, continues with the second column?