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 Patil
Hi 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
Similar Messages
-
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,
Harihi 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 -
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.. -
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 -
Creating dynamical flat file name in mapping?
Hi.
I know about the variations on how to use an input parameter and/or sysdate to create a dynamic output file name in a mapping.
My challenge is nearly the same, but I cannot make OWB generate the correct code.
Problem:
- got a one column table that holds an identifier in a string field
- got a function that reads and returns said identifier
- imported function into OWB
- trying to use the function call in the Flat File Operator's Target Data File Name, e.g. fixedfilename||fn_get_id()||sysdate||'.ext
OWB creates the code:
UTL_FILE.FOPEN(
'my_location',
'fixedfilename'||fn_get_id()||'_'||SYSDATE||'.ext',
'w',
32767
However, when compiling the package code, it returns the warning:
ORA-06550: PACKAGE BODY, line 2214, column 29: PLS-00201: identifier 'FN_GET_ID' must be declared
which results in an error when trying to execute the mapping.
I've tried substituting the function call in the FOPEN call:
myId := fn_get_id();
UTL_FILE.FOPEN(
'my_location',
'fixedfilename'||myId||'_'||SYSDATE||'.ext',
'w',
32767
and this works fine, the mapping creates a file with the desired filename. But obviously not a good solution rewriting the generated code all the time....
Anyone solved something similar?
Could I use an input parameter and the autogenerated function GET_<PARAMETER>?
But can I set the value of an input parameter inside the very same mapping?
Regards,
-Haakon-(It always helps writing out one's problems...)
I managed to get it working :-)
Added an input parameter to the mapping, and gave the outgroup variable a default value by calling my imported function.
Then concatenated the implicitly generated function (GET_PARAMETER) in the Target Data flat file name.
I now have a target file name that changes according to a departement id stored in a parameter table.
Regards,
-Haakon- -
Receiver file name with counter
While working on proxy to file scenario. I have to maintain receiver file name as ddmmyyyyxxx_nnn.xml,where xxx is constant and nnn is a counter which is suppose to be reset everyday.Anybody can help me on how to achive this...?
Hello Amit,
Yes. You can achieve this but only using File - NFS Protocol.
A new file is created for each document. The file name is extended with a counter, which is inserted before the file name extension (for example, default002.file). This selection is only available for the File System (NFS) transport protocol.
Make specifications for Counter Definition:
Prefix
Specify one or more characters that you want to add before the counter in the file name.
Format
Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.
Step
Specify the counter increment.
Mode
Specify when the counter is to be added.
After First File
The counter is added when the file name is used unaltered for the first time.
Thanks
Pothana
Maybe you are looking for
-
Creation of new Infotype Important
Hi All, I am using the table control for my Infotype creation. i linked the internal table with the table control wizard. I added a check box in the table control ( which is not there in the internal table). i need to access this table control check
-
Can't edit .mov artwork
I have imported some movie (.mov) files into iTunes 7.1.1 and can't change the artwork field. The Add and Delete buttons are greyed out. Mp4 files work fine, and I know that at least in past, it's been possible to do this on .movs as well. It's uncle
-
Can NewGL handle the Variance category settlements to different accounts
We are on ECC 5.0 version. Currently when a process order is closed, settlement posts the variance to the standard to a single G/L account. The variance is the total of all variances to standard, fixed (O/H), variable (material), waste, etc. Is it po
-
Hi all. I have defined a form that will be the template of our application. All the developers will use it to create the new forms. I would like to know if there is a way to fix all the elements of the template (buttons, canvas, etc) to avoid develop
-
Connections to shares do not disconnect
My scenario: I log directly into serverA and my home folder, which resides on serverB, is mapped to my serverA session. Even if I properly log off serverA, serverB still shows my session from serverA – until I manually disconnect the session via Com