Dynamic File Name - Suppress the Substitue varible
Hi All,
I am doing the scenarios like File name at the recevier end would be dynamic for that i take an extra field NAME mapped with UDF which return the file name dynamically. It is working fine and doing good. But the problem here is , this field is the first field in my target structure so i am getting an empty line in the target file.
So My structure as follows:
<b>MT_BNK01 1..1
NAME 1..1
RECORD 0..Unbound
--Record_data 0..Unbound</b>
So in the recever side i written as follows
Recordset Structure:: RECORD
<b>RECORD.fieldSeparator = 'nl'
RECORD.endSeparator = 'nl'</b>
But according to this weblog i can suppress the empty line but it is not working
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
means, NAME is also in the same level of RECORD in the Structure. So How can i pass the structure as ??
I tried to pass the RecordSet Structure: NAME,RECORD
and following parameters, it is not working
<b>NAME.fieldFixedLength =0
NAME.fieldLengthTooShortHandling = Cut</b>
Can you please suggest me what could be the reason. Tell me what information i need to pass the RecordSet Structure and attrubute information also.
One more thing like, My sender side it is not picking the empty lines. What could be the reason. I given fieldSeparator and endSeparator as 'nl'. So to catch the empty line what i need to do???
Thanks in Advance,
Best Regards,
Vijay
Hi Vijaya,
This can be solved. Actually i had the same scenario where i was getting blank line for the header. Suppose Header was carrying the file name after i cut the value i would get a blank line in file.
So i added in content conversion parameter the following line
Header.endSeparator - '0'
then the first line was not blank.
Try this, i think your issue will be solved
Regards,
Ramesh P
Message was edited by:
Ramesh Parashivamurthy
Similar Messages
-
Dynamic file name inside the ZIP file
Hi Experts,
I have done proxy to file scenario, reciever side is the file ZIP file, i have done successfully done Zip file using adapter modules in Communication Channel.
The file name is hard coded like this.
contentType-----Transform.ContentType--
text/plain;charset="UTF-8";name="Billing.txt"
Is there any possible to do dynamic file name instead of hardcoded like add time stamp.
Kind Regards,
Praveen.hi,
you can always do it using an adapter module like shown in my blog:
/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
Regards,
Michal Krawczyk -
Dynamic file name of the attachment in sender mail adapter
Hi
I have configured a sender mail adapter which receives some attachments.
Right now the file name of the attachment is hardcoded to "MailAttachment-1" "MailAttachment-2" using the content-description from "AF_Modules/PayloadSwapBean" module.
I want to set it to dynamic ie. instead of "MailAttachment-1"... i want it with real name of the attach.
please suggest a solution w/o the need to develop a custom adapter module.
Thanks!
Regards,
Mariano.Thanks Prateek,
Now, i can see that the name of the original file is into the content type named as text/xml; name"name of the file.xml" when i send the email from outlook.
If i send it from hotmail, this is not happend.
Do you know why happend this?
If i always would have the original name inside the content type, my problem will be solved.
Edited by: Mariano Vidal on Feb 13, 2009 2:26 PM -
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 -
How to retreive the dynamic file name in the AAE configuration?
Hi Guys,
I have configured File to File with the integrated configuration and in the mapping i need to retreive the file name dynamically and i am unable to retreive it from the run time in AAE configuration. I am able to retreive with the normal configuration where integration engine is the run time.
I am using the code as below. Is it possible to retreive the file name dynamically in the AAE configuration? any help or suggestions would be appreciated.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Thanks,
SriniHello Srinivas,
Brief Solution:
1. Using dynamic configuration, set the attribute value of payload dynamically to ASMA
2. Using AF module, write the value of ASMA in a variable
3. Using the variable substitution, set the receiver file name schema
Plz go through the below link:
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
Thanks,
Satya Kumar -
Need dynamic File name in the Schedule link for FTP Destination
Hello,
We are using Oracle BI Publisher Enterprise formerly XML Publisher
I am trying to drop a .csv file into an FTP location using the Schedule link for a report I have created. I need to run this program everyday. Is there a way I can have it drop a file with the date stamp? Currently when you hit Schedule and select FTP destination I need to specify the path of the file and I am not sure if it can accept dynamic parameters?
Can it?
I want to be able to specify "SomethingDate{sysdate}".csv
Cheers
VijayHi Vijay
Im pretty sure it can not do that at the moment, not thru the scheduler UI.
What you could do thou, is set the report up as a bursting report - you're not going to split the report but the bursting engine can be fooled. With that method you can specify the file name to be used via sql
Regards
tim -
Assigning dynamic file name in the FTP adapater in OSB 11g
Hi,
I have got a requirement where I need to FTP a file(put operation) with a name which goes like this
XYZ_<abc>_ddmmyyhhmiss. Here <abc> will be coming from a previous DB adpater query and is a column value so, will be dynamic.
I have created a FTP adapter in Jdev and migrated all the files to Eclipse, created a Business service out of it.
I can see the .jca properties in the JCA Transport tab of the business service.
Now my question is how to set the value of FileNamingConvention field in the business service dynamically which i believe would let me set the file names.
Regards,
Satrajituse the action "set transport headers", setting the value of the jca.file.FileName and jca.file.Directory (if needed) to whatever you want.
This action is available in a Route node only - I believe, not 100% sure -
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 while sending to target FTP
Hi Experts,
we have a scenario wherein we are trying to implement dynamic file names.
The scenario is IDOC to file, and we need to append the data corresponding to all the IDOC triggered n a daily basis.
Its like the file abc_01will contain data for day 1(data of oll the IDOC in that day).For day to we need to dynamically name the file as abc_02 and so on.
But before naming the file as abc_02 we need to check if abc01 is present or not .If abc_01 is not present then for day 2 file we need to give the name as abc_01 and so on_.This condition is need to be checked becasue there may be the case that a file may not be picked by the script running at the target system.
can anyone let me know how to check whether file are correctly picked at target.
Regards,
srinivas.Hi Srinivas,
I think you can achieve this with the next scenario:
- For getting all the Idocs info, you need a ccBPM to collect them, and then, download them to a file.
- To dynamically put the filename, you need to use Dynamic Configuration at the File Receiver Adapter (in the Message Mapping, you can write a UDF.)
- And to check if the daily file exists, you can also write an UDF and then decide the name of the output file.
Hope this helps,
Regards,
Juan -
Dynamic File Name depending on the Source File name
Hi Experts,
I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
Source File name Targer Folder/Filename
NK01.VR59.L2007030 VR59/Rec.l200
NK01.VR71.L2017030 VR71/Rec.l201
NK01.VR77.L2027030 VR77/Rec.l202
See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
Points will be rewarded for Valuable anwer.
Thanks in Advance,
Best Regads,
VijayHi VIjay,
Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " " statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
I am getting the following error in End to End error Scenarios:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</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:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error> -
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 file name from input payload (RFC 2 flat file)
Hi,
I have an RFC to flat file scenario. The output flat file has not an XML structure, it's just a plain text file generated with abap mapping.
In my source interface (RFC), I have a field called <FILENAME>, I want to use the value of that field to create the target file using dynamic file name. But if in variable substitution I use payload:ZRFC_NAME,1,FILENAME,1 It doesn't work because the dynamic variable substitution try to access to output payload, not the source one...
What can I do?Hi Marshal,
You can add a extra node to your target strucutre like
FileName- Node
--FileName - Element.
do the mapping from the field filename of RFC to FileName field in u r target strucure. And use this field path at Refrence in variable subtituion.
In the Content converison add the Name & Values as below
FileName.fileldNames -- FileName
FileName.fieldFixedLengths -- 0
FileName.fixedLengthTooShortHandling -- Cut
So the extra field in u r target structure would not populate in u r target text file.
Cheers
Veera -
Hi,
I am following this blog to name the target file/directory dynamically at the runtime :
/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
But I am getting this error in the CC monitoring :
Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'interface_name ' for variable 'var1'.Hi,
Try following this weblog for dynamic file name.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Dynamic filename come under the Dynamic configuration in moni, for your messages.
This is the code used inside.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
That is why Dynamic configuration is coming in output.. It is a class to generate dynamic configuration file at runtime provided by SAP XI.
Hope this will help you.
regards
Aashish Sinha
PS : reward points if helpful -
Problem in dynamic file name in File reciever adapater
I have given my file name as
%abc%.txt
and in the advanced mode
i have given
Additional parameters as
abc=
payload:file_reciever_mt,1,FileNameNode,1,FileName,1
while my file reciver structure is
<?xml version="1.0" encoding="UTF-8"?>
<ns:file_receiver_mt xmlns:ns="urn:filetofiledemo"><recordset><data><name></name><age></age></data></recordset><FileNameNode><FileName>Amit123</FileName></FileNameNode></ns:file_receiver_mt>
My file is getting store as %abc%.txt
not as Amit123.txt
I am using SP 14 .
Any pointers wld be very helpful
Thanks
AmitHi Amit,
In your filename field. just give a variable with % symbols. (eg: %file% ).
Now, under the option Variable Name Substitution, you can give how the value has to be created.
It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
For the former, your give
message:interface_name ,etc
and for the payload part you give,
Payload: "your element root which u wanna acecss"
Just check this link out,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
And read the contents under variable substitution and it will help you understand the concepts better.
Apart from my previous post, you can also use Adapter Specific Identifiers in your Sender and Receiver File Adapters to copy the same file name from the source to the target.
take a look at this blog for the same,
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
-- Bhavesh
cheers,
Prashanth -
DATAEXPORT - set Dynamic File name in Calc Script
Hi,
I have a calc script which exports data from BSO cube to a flat file. Currently I have hard coded file name within the calc script which is
DATAEXPORT "File" "," "D:/in/CAPXPT_FERC_*FY12*.txt";
and, for example, I want use the substition varaible to dynamically assign the file name let' say
DATAEXPORT "File" "," "/u11/oracle/OHDDEVD/in/CAPXPT_FERC *" + &fYear + "*.txt";
Is there any way to set the export file name dynamically?
Thanks for your help
Regards,A kind of intriguing thought would be to use the sub var as a way to drive the file name, then grab Robb Salzmann's CDF to dynamically set sub vars on the fly, and then use a RTP to grab that string. I have no idea if this would all tie together, but it would be interesting to try.
Here's Robb's post: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html This is my second in a row post that refers to his CDF -- it is almost like that's my pseudonym except of course I'm too thick to write a CDF.
Regards,
Cameron Lackpour
Edited by: CL on Sep 20, 2011 10:36 AM
Spelling. Arrgh.
Maybe you are looking for
-
[SOLVED] Can't send output to external monitor
I've got a Dell Inspiron 1501 laptop which I sometimes use to give presentations at my school. Last time, in mid october, it worked perfectly, but now my laptop and the digital projector seem to ignore each other. The only difference between last tim
-
Sammlung in Adobe Bridge geht nicht.
Hallo, ich kann keine Sammlung in Adobe Bridge erstellen. Wenn ich auf den Button klicke um eine neue Sammlung hinzuzufügen passiert nichts. Was kann ich tun? Neuinstallation hat auch nicht funktioniert.
-
I have my music from my iPad 2 synced to the cloud. Now I can't access the music from my iTouch or the new Mini iPad unless I have cloud access. This is a problem when I am on a plane or somewhere without Internet access. How do I fix this? Do I
-
IPhoto Preferences, This is WEIRD!
In iPhoto preferences>advanced>edit photos, you can choose to edit photos in iPhoto (dropdown menu), or (in my case) Photoshop Elements. I cant remember the exact order of events, but I'm pretty sure that, as always I was editing in PSE, but I wanted
-
Creation of Non-Base tableblock in forms 9i
Hi How do I create a non-base table block for my form. For my application I dont need any tables to access ,but im just calling a webservice on clickign a button. let me know thanks sirisha