Dynamic Receiver file name in AS2 adapter
Hi Experts,
How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
We tried selecting dynamic attributes file name but we are getting followin error in CC.
Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
Thanks,
Hari
hi hari,
You can't do it manually. As both adapter are in different context.
You can go with UDF to slove ur problem.
Just extract the input file name using Dynamic configuration
Store that in some variable.
Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
conf.put(key,strfilename);
Thanks
Jai
Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM
Similar Messages
-
Dynamic receiver file name C1.yyMMdd.C2
PI Experts,
Is it so difficult to acheive in SAP PI? I hope I made the requirement clear.
Scenario: Sender AS2 adapter --> PI --> Receiver File (NFS) Adapter. Just a file pass through, no mapping
Requirement: Irrespective of sender adapter in a file pass through scenatio where we wont read the file (payload just contains the flat file), I want to delivery the same file with the naming convention C1.yyMMdd.C2 where C1, C2 are constants and yyMMdd is cuurent date. So sum up, need to have current date in a file name on receiver side with out reading the payload.
1) Variable substituation works on if we are are receiving the variable value from the payload.
2) Looks like ASMP works only same filename from a sender to a receiver file adapter, because if you are not using sender adapter or using sender adapter without selecting ASMP - File Name, there no way you can receive DynamicConfiguration under SOAP Header. Please correct me if I am worng.
3) Running the OS command after file processing to re-name the file, may be its the last resort, but I would expect and would like to do in PI.
What is the best possible solution?
- Riya PatilHi Shabarish
Please find below the my UDF code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = "C1." + a + ".C2";
String TargetFileName = SourceFileName;
conf.put(key, TargetFileName);
return TargetFileName;
And mapping trace:
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:174) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1102.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy182.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor12384.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:157) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) Root Cause: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3)(:main:, row=1, col=3) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) -
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) ... 4 more</Trace>
<Trace level="1" type="T">Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_Lockbox_Filename_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3)</Trace>
<Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_MM_Lockbox_Filename_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:73) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1102.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy182.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor12384.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:174) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1102.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy182.processFunction(Unknown Source) at sun.reflect.GeneratedMethodAccessor12384.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:277) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:157) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) Root Cause: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3)(:main:, row=1, col=3) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) -
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:534) Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 45, 53(:main:, row:1, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) ... 4 more</Trace>
<Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
</Trace>
Thanks for helping me on this.
- Riya Patil -
Change in time stamp format in receiver file name
Hi,
We have a scenario as AS2 - PI - FTP Server (AS/400). We want target file name as BMMDDHHSS where B is constant and
MM (month e.g., 01), DD (day e.g., 12), HH (hour e.g.,11), SS (seconds e.g., 12). Is there standard way of doing this, just by changing some configuration in receiver file adpter?
Please let me know, how could we do this using PI. If script is optional, keeping as back-up only.
How come, naming dynamic receiver file names are so difficult in PI. I have been trying to get the answers for our another requirement like to name receiver file as C1.YYMMDD.C2 in a file pass through scenario for more than a month.
It is just file through scenarios, so we can't use variable substitution as we are not going to read content/payload of file
Thanks in advance,
- Riya PatilHi Shabarish
Thanks for your reply. I have trying to make this UDF work since almost a month with no luck. Can you please check where am I doing wrong?
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = "C1." + a + ".C2";
conf.put(key, SourceFileName);
return " ";
In the above code, I am passing date as "a". And mapping CurrentDate (formatted) --> UDF --> Target root node.
I am getting the following error in SXMB_MONI:
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_Lockbox_Filename_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
<SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_Lockbox_Filename_: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
Your help would be much appreciated.
Thanks,
Riya Patil -
Receiver File Name assign dynamically
Hi friends,
In our scenario, receiver file name is assigned to dynamically. Example Inventory_Current date. Inventory is static, but CurrentDate is changed on runtime.
I was tried to Variable substitution method and UDF method. In this type dynamic value is mapped to target structure, so Receiver payload shows the dynamic value in output file. But we don't need that dynamic value. So, in variable substitution method and UDF method is not achived to my requirement.
Please any one help me how to change file name at runtime (receiver communication channel). If using any module program pls forward to me.
Thanks & Regards
VijayHi,
if we want to get the Output file name as One of the Field value from Payload and Current dase with it means,
1) Write one UDF & map Like this
Name(giri)-----UDFCurrent Date----MT_Target
2) Check the ASMA Option in Receiver Adapter Aloneu2026..
3)No need to check the ASMA Option in the Sender side
UDF Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
String Outputfile = conf.put(key,a);
return Outputfile;
Regards
Seshagiri -
Setting up the File Name of email Attachment from Received File Name
Hello All,
I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pipeline component.
Here I am using the Orchestration and SMTP Adapter.Any help is greatly appreciated.
ThanksIt might work if you use a custom pipeline component on your send port and in the Execute method populate the MIME.FileName property of the body part.
Something like:
public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
string filename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
inmsg.BodyPart.PartProperties.Write( "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "filename);
return inmsg;
You can take reference from similar post here
SMTP - Setting attachment filename
Anther good article with MIME is here
Setting attachment filename with the SMTP Adapter
For MIME case your SMTP message construct statement would be like below
multipartMessage.MessagePart_1= InMSG;
multipartMessage.MessagePart_2="This is message part2 as a string";
multipartMessage(SMTP.Subject) ="Email From Dynamic Port";
multipartMessage(SMTP.From) ="[email protected]";
multipartMessage(SMTP.SMTPHost) ="yoursmypserver.com";
multipartMessage.MessagePart_2(MIME.FileName) = "Attachment_Name";
multipartMessage(SMTP.SMTPAuthenticate) =0;
Thanks
Abhishek -
Configure receiver file name as Sender file name
Hi All,
In PI7.1. We have scenario(file to file). Here the sender system send multiple files and In the receiver system we need to populate the same filenames as Sender file Names.
Could you please let me know is there a configuration to have Receiver file schem name As like sender file names.
Thanks in Advance,
Naga.Hi Naga,
This can be achieved using either variable substitution or Dynamic Configuration by enabling Adapter Specific Message Attributes in sender and receiver file channels.
If the sender file name and receiver file name needs to be exactly same then just check Adapter Specific Message Attributes in advanced tab of both sender and receiver channels. Check on File Name under that.
Lot of help over this is already available in sdn, kindly serach and you will get lot of helpful blogs and wikis
Regards,
Gautam Purohit
Edited by: Gautam Purohit on Apr 16, 2010 11:26 AM -
Hi All,
I am trying to use dynamic attribute file name using UDF in message mapping:
<i>String filename = null;
filename = "Yahoo";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://seeburger.com/xi/common" , "dtSubject");
conf.put(key1,filename);
return "";</i>
But its just giving me the name on the receiver side as in the sender side.
I have checked FileName in Dynamic attributes in the reciever adapter.
Regards,
XIeryour return statement looks like <i>return "";</i>
Return the filename that you have assigned inside the UDF and can be achieved by
conf.put(key1,filename);
<b>return filename;</b>
Do refer this blog as well
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 -
How to give field name to Receiver File Name.
Hi ,
In my source target structure there is a field name
"job id" .
I need that value coming in that field name to be given to
Receiver File Name.
Thanks in AdvanceHi,
You could use the field name to the File Name. For that you could go ahead with variable substituiton in receiver communication channel.
In receiver Communication channel use variable substitution as
In file name -- %Var1%
In Variable substitution parameter give Var1 ---> payload:<field Name>
Refer
SAP Network Blog: An interesting usage of Variable Substitution in XI
/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
variable substitution
http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
Also see the below links to use the dynamic variable substitution
/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Also
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
Thanks
swarup -
Hi All,
I want to write the receiver file name like test20091216.txt
I tried with Add Timestamp, but it is adding with time also which i dont require.
Here i want to say is iam not using any mapping to use Dynamic file name concept.
Please suggest me on this.
REgards>
Vamsi Krishna wrote:
> Sarvesh,
>
> iam not sure about the target FTP Server OS.
>
> i have one thought here, the process is as follows....
>
> ECC will generate a text file to XI Shared path, XI will pick up and deliver it to target FTP server path.
>
> Now this is doing with out any mapping, we can't do Dynamic Config. t=in this case.
>
> So my thought is i can ask ECC while writing the file with file name followed by date. EX: test20091216.txt
>
> so that in XI, can i just use the sender file name to receiver file name???
>
> REgards
Yes, if ECC can do this then problem solved. Just use ASMA setting in both sender and receiver adapter to write the same file name at receiver side.
There is ablog written by Michal, just search it.. -
Retrieving the file name in the adapter module in the sender file adapter
hi,
i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
Also is it possible to retrieve the archive directory path in module?
Regards,
MeenkashiHi Meenakshi,
I guess you are looking for this
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Regards
Suraj -
Same file name using JMS adapter on sender side.
Hi Friends,
I got a requirement to capture file name using JMS adapter on the sender side.
Can some one help me in resolving this issue.
Regards,
Jeevan.Hi ,
You can use Dynamic Configuration in mapping.
Create a UDF with input as file name and copy/paste this code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//conf.removeAll();
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//String filename= conf.get(key);
conf.put(key, fileName);
key= null;
return fileName;
Thanks. -
When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name. How I can prevent the file name being changed during this downloading process?
Hi Glenyse,
Here are my steps.
1. I upload multiple image (jpg) files onto my photo album.
2. I select the "sharing" by email option for this album.
3. I enter the recipient's email address.
4. The recipient receives my message and clicks on the link.
5. The recipient accesses my photo album and clicks on one of the images.
6. The image opens up to its own screen.
7. The recipient selects the "download" and then save file option.
Here is the part I do not understand. For some reason, during this "download" process, the original name which I have given to the file is replaced by different name. So I was hoping that someone knows how to prevent the file name from being changed during the "download and save" process.
Much appreciated if you can help me find a solution to this problem.
Mary -
Dynamic Logo file names in PO XSL-FO stylesheet
We have different company logo files for different operating units. Hence , we require to use a dynamic logo file name in XSL-FO template.
When I use the below for a single file it works.
<fo:inline>
<fo:external-graphic content-width="50pt" content-height="50pt" src="url({'${OA_MEDIA}/Logo_medium_COMCEL.jpg'})" />
</fo:inline>
However, I would need to make the filename dynamic.
When a tried usng an xsl variable tos tore fielname, it didnt work.
Any pointers as to how we can achieve that would be helpfulThanks for your quick reply Dave, I appreciate your time.
But I couldn't test the new template as I was neither able to create a new PO nor was able to run the PO Output for communication Report. When I tried to create a PO the Purchase Order form did not open saying I am not setup as an employee, even the PO Output for communication did not give any LOV for the PO's.
I tried to define employee name in the employee's login
information (System administrator/Security/User/Define) for my user, but some how my name doesn't appear in LOV. Any help is appreciated.
Thanks,
Sharmila -
Include the file dynamicly by file name
in my jsp,I want include another jsp dynamicly
<%@ include file="thefile.jsp" %>
thefile.jsp should be dynamic like:
<%=String filename=="thefile.jsp" %>
<%@ include file=filename%>
I know above is not working since file only take static name.
is there any way to include the file dynamicly by file name?String path = "..."; // to the ressource to include
javax.servlet.RequestDispatcher dispatcher
= getServletContext().getRequestDispatcher(path);
dispatcher.include(request,response); -
Getting Receive File Name and status of application from Biztalk database.
Hello all,
I want to retrieve Receive file name and status of application (started, partially started) in a stored procedure
querying Biztalk databases.
Please share if anybody have an Idea.
ThanksHi Nilesh,
Status of BizTalk application can be obtained using ExplorerOM API provided by product. It's Application class has a Status property that returns one of Not Applicable, Started, Stopped, Partially Started.
using Microsoft.BizTalk.ExplorerOM;
private string GetApplicationStatus(string applicationName)
BtsCatalogExplorer catalog = new BtsCatalogExplorer();
string status = "";
try
//connection string to BizTalk management database
catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI";
Microsoft.BizTalk.ExplorerOM.Application app = catalog.Applications[applicationName];
if (app == null)
throw new Exception(String.Format("Application '{0}' cannot be found.", applicationName));
status = app.Status.ToString();
catch (Exception ex)
//Handle exception
System.Diagnostics.EventLog.WriteEntry("MyMonitoryingApp", "Exception call stack: " + ex.ToString());
finally
if (catalog != null) { catalog.Dispose(); }
return status;
UPDATE: Found the thread from where I got this code. Thanks to Ashwin for providing it.
Refer:
Reg Stored Procedures for BizTalk Application Status in BizTalk Admin Console
Rachit
Please mark as answer or vote as helpful if my reply does
Maybe you are looking for
-
TS4009 The document "Name" could not be opened. (Numbers file @ iCloud)
I have a file saved at iCloud that can not be opened anymore. Numbers says: The document "Name" could not be opened.
-
(ABAP) Code in Transformation--TO ADD LEADING ZERO FOR VALUES 10
Hi, I am calculacting years and months between 2 given dates by using a Function Module. The result of FM will be E_YEARS & E_MONTHS as per my requirment i need to present the output in YY.MM format for that reason i am doing the below calculaction l
-
ERROR WHEN OPENING BB WORLD OR LOADING ANY NEW APP
I get this message all the time >>> Sorry, your session has expired. Please close all of your browser windows and then return to the welcome page to start again. Copyright ©2011 Research In Motion Limited, unless otherwise noted. Marius Entco - The E
-
UNIQUE constraint vs checking before INSERT
I have a SQL server table RealEstate with columns - Id, Property, Property_Value. This table has about 5-10 million rows and can increase even more in the future. I want to insert a row only if a combination of Id, Property, Property_Value does not e
-
I managed to move my itunes library from my old Windows computer to my new Mac computer, but all my playlists did not move ? cant figure out why. Will i have to sit and re-do all my playlists again ?? does anyone know please ??