File adapter dynamic configuration - Multiple filenames
Hi
Can anyone explaing the following.
We are using the sender file adaper to pick up files from an ftp location. The dynamic config is used to store the filename.
We are getting 1 PI message per file, but the dynamic config in SXMB_MONI is sometimes showing multiple filenames for one message.
This makes it impossible to get the correct filename and do something usefull with it:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">xxxxxxxx1.PDF</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">xxxxxxxx2.PDF</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">xxxxxxxx3.PDF</SAP:Record>
</SAP:DynamicConfiguration>
Kind regards
Thierry Boeve
Hi.
Pls. Check the following SAP Note.
https://websmp230.sap-ag.de/sap%28bD1lcyZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1078455
It will be help you.
Regards
Similar Messages
-
File Adapter dynamic configuration
Hi,
I would like to know how to configure location,polling frequency, file name dynamically at runtime.?
Is there any possibility to read configuration/property file at time?
Regards,
GovindWhich SOA Suite Version you are using ? You can change the directory and file details. Pls refer Re: Get File name using File Adapter Hope that will help you.
-
Configure Sender File adapter dynamically
Hi,
I need to configure the sender file adapter dynamically. Ex: I will be providing the src dir , file name etc dynamically. I think this is not possible using module because module gets executed after file is picked (in my case file dir and file names need to be determined dynamically). I even don't won't to use directory API for craeting my file sender comm channel. Is there any other way to achive this.
Regards,
RakeshHi Rakesh,
what is the Operating system of the PI server? Could you please kindly explain what conditions determine filename and source directory? I do not think there is anyway you can determine src file and dir names dynamically in PI.
Here is what you can try.
PI server is on windows system u need batch file. If its on unix or Linux you need scripts. Now what you have to do is place all files in a directory. Here the script/batch file will run continuously in background. Once it gets files it will rename files based on file content or file name then move them in different directories as per your conditions. your interface must have multiple communication channels and sender agreement (with diffrent parties) which will pick up those files from these directories.
The name of directories will be fixed in each channel.
regards
Anupam -
I want my file adapter to poll multiple locations in soa 10g
Hi All
I had a requirement that "I want my file adapter to poll multiple locations in soa 10g".I came to know that in soa 11g it is possible.
I want this to be done in soa 10g.
plz help me.
thanks,
krishnaYou can have pick activity and have separate ftp adapter for each folder, but you will be using the same jndi in all pick activity.
In that way you can have multiple ftp adapter but uses the same jndi by increasing the performance.
User will be configured to a home location, example as below.
say a ftp user "adminuser" is configured to a default folder c:/ftp_files
You can create multiple folders under the same folder like below.
c:/ftp_files/location_a
location_b
location_c
location_d
For each location have a separate ftp adatper, but all of them uses the same jndi while defining the path you have to change according to the above folder.
Let me know how this goes.
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Vijay -
Dynamic configuration multiple folders
Hi all,
I have a scenario in which the file adapter should pick multiple files from multiple directories and at the receiver side it should put these files in different folders with different file names. There is no content conversion involved and no message mapping
Please throw some light on how to achieve this
-KeerthiI believe you can achieve your requirement by using one file communication channel (No need for Java mapping or custom code). Did you had a look the File channel option which allows to get Multiple files from Multiple directories?
Open File channel -> File access parameters -> Provide dummy file name and directory name
-> ENABLE Advanced Selection for Source File -> Provide each directory and File name scheme in each row.
Hope this helps.
Thanks and Regards,
Ananth -
Sender File Adapter - Dynamic Filename?
Dear All,
I have a simple requirement to retrieve a file named "XXX_ddmmyy" from an FTP site. The FTP site administrator will place a new file everyday. The date is part of the filename.
I can find a lot of information on how to set the Filename for a "Receiver File Adapter", but none about dynamically setting of the filename for a "Sender File Adapter".
Can you help please?
Kind Regards
FarshadHi,
You have mentioned over here that the requirement is to get the file "XXX_ddmmyy" from an FTP site.
Is that site strictly for keeping files related to your requirement only or lot of other files are also being placed???
If its strictly related to your requirement then you can use the filename "*.extension" and set the processing mode as "delete" so that once the File Adapter picks the file it will be automatically deleted.
But here disadvantage is that the file wont be no longer present in FTP site once it is picked by File adapter.
Thanks,
Lekshmi. -
File adapter: how to change filename
Hi all,
In my scenario I need to add specific time stamp (current date actually) to filename when it's copied to target system. In the properties of file adapter there is an option to add time stamp, but I need it to be in format YYMMDD.hhmm, while XI default suggests another one. How can I solve the problem? Use variable substitution or m.b. dynamic configuration? In addition want to say that there is no any mapping in the scenario.
Thank you.Hi Dmitriy,
pls do chk this links
An interesting usage of Variable Substitution in XI
Solution to the problem encountered using Variable Substitution with XI-SP12
The specified item was not found.
do g with dynamic configuration
Regrads
Sampath -
File Adapter: Dynamic file name
Hello,
I would like to use a filename like this:
Name.<DOCNUM>.Direction.<Timestamp>
For DOCNUM I use variable substitution. Works fine.
For <Timestamp> I need a different format as the timestamp function
in file adapter create. So I try to set up my timestamp in mapping like
dynamic file name:
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Timestamp");
conf.put(key1, a);
Input a is date function which creates my desired timestamp format. In file adapter I try this:
Name.%DOCNUM%.Direction.%Timestamp%
or
Name.%DOCNUM%.Direction.Timestamp
or
Timestamp
all doesn't work for Timestamp.
So is there a possibility to configure a dynamic filename like this???
Is there a possibility to access dynamic configuration variables in dynamic filename except
the known for filename and directory??
thanks
chris
Edited by: Christian Riekenberg on Mar 10, 2009 4:02 PM
Edited by: Christian Riekenberg on Mar 10, 2009 4:05 PMyour file name needs to be
Name.<DOCNUM>.Direction.<Timestamp>
dont use variable substitution. use only dynamic configuration and set the file name
introduce a logic that will create the string
Name.<DOCNUM>.Direction.<Timestamp>
eg. String filename = "Name" + var_docnum + "Direction" + var_timestamp;
then use the dynamic conf code to set the file name and use adapter specific properties in you adapter to retrieve it.
Ref:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm -
Proxy to file using dynamic configuration
Hi Frnds,
I have a scenario ABAP_Proxy-XI-File, here in the proxy I am getting a pdf file with xml as attachment now I need to save the pdf file to the target folder with the name availble in one of the fields of attached xml file.
I have used Adapter specific attributes option for filename substitution but getting the follwoing error:
Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
Please anyone can help me in overcoming this issue.
Regards
shivaU have a limitation here. At XI u can read only 1 file (pdf or xml). Bcoz receiver file adapter will not support attachment. pdf is required bcoz u need to transfer it to receiver. Xml is also required bcoz the directory name is inside that xml
The workaround could be creating an adpater module that passes the directory name as well. U should send pdf file with xml as attachment.
If u have the dir name, then the dynamic configuration code should be like this
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key,MappedDirectoryName);
This MappedDirectoryName should be the name passed through payload. The receiver file communiation channel must have dummy dir name
Regards,
Prateek -
File Adapter - special character in Filename
Hi,
i have a question concerning file adapter.
Scenario: we are polling files via file sender adapter (FTP).
Problem: if the filename contains a special character, an error is thrown with 'The System cannot find the file specified'
Scope: Special character in filename (not in payload)
Installed: XI 3.0 SP 19 on Linux
Questions:
- what FTP implementation does XI use?
- What do i have to check/upgrade to unicode?
- is it an OS problem or an Java problem or a XI problem?
- or is it not possible copiing files with special characters in filename?
Thank you very much in advance.
MichaelHi Michael,
The file/FTP adapter supports both passive and active FTP data connection. You can select the data connection while configuring the adapter.
The file/FTP adapter follows specification RFC 959. The specification can be found on the Internet under www.ietf.org/rfc/rfc0959.txt.
For FAQs about the file/FTP adapter, see SAP Note 821267. Please note that you'll need an account to log in on service.sap.com.
Question: How are you specifiying the file name? i.e. Are you using placeholders, like ?, *, *.txt, etc ?
If there's a problem with the filenames, then it should be a problem in the JAVA implementation of the adapter I assume. So you could for instance build your own adapter extension to by-pass that problem.
Just for your information; I haven't encounter a problem with filenames in other projects.
Good luck! -
File Adapter: need to include filename in content being written
I want to use the file adapter to write a file, using the filename convention to generate part of the name dynamically.
However, I need to include the filename used for the output file in the actual content too.
Any ideas if this can be done?
Thanks
TobyAt a customer we implemented the file adapter to create a file based on a specic name for appending:
<assign name="AssignStaticFilename">
<copy>
<from expression="'Output.csv'"/>
<to variable="gFileAdapterOutboundHeader" part="outboundHeader" query="/ns2:OutboundFileHeaderType/ns2:fileName"/>
</copy>
</assign>
In de FileAdapter WSDL we set:
<jca:operation
LogicalDirectory="OutputDirectory"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="%SEQ%"
NumberMessages="1"
OpaqueSchema="false"
Append="true" >
</jca:operation>
Does this help you, based on a given input to set the filename and this variable to put it into the file? -
File Adapter-Module configuration
Hi All,
I have the following requiremnt.
"Duplicate files should not process"
Following are the File Access Parameters.
Source Directory: ABC (ex: contains aa1,aa2,aa3,aa4 files)
Filename: *
File name mask: aa*
My doubt is if they place aa1 file again in ftp , i should not process.
For this I'm thinking to write module configuration.
Can any one suggests , whether this is the correct approach? If it is could u explain how to write this module and where to write this module and how to import in xI, do i need to pass any parameter name in module configuration.
Regards,
venu.Hi Venu,
You can go with Module in the Sender File Adapter.
First you need to check the file name and you need to store this file name in the Database.( you can use Java Database).
If there is an entry in the database for that file, then reject the whole file as per the business requirement. So that you can avoid , overhead of Mapping. Because if there is an error set the flag in the message and check this flag in your Receiver Determination, if it is an error send into error directory.
Another way is outside the XI, i.e using shell scripts.
Regards,
Moorthy -
Reciever File Adapter to create multiple target files
Hi All,
I have done the mapping to create multiple output messages . I would like each of the messages to be stored as a separate file in the target .
Below is the output message with 2 separate MT_CANCELOUT messages . However, both end up in one single xml file .
How do I configure the receiver file adapter to ouput 2 separate xml files ?
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1>
</ns0:Messages>Hi,
Sorry to say you that but your post show the opposite, it shows you have only one target message !
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>______<<<<<<<
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1>______<<<<<<<
</ns0:Messages>
If you want two files, you should generate two Messages, and so to do that:
In MM, in your target (tab before "function"), you should have 1 source MT and in target MT, you should have two lines (even if you use the same target MT), after having changed the ouccurence 1->N.
do the same in your operation mapping: 1->N with two receiver service interface (even if it's the same)
because you should have something like:
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>456</id>
<name>HEY</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message1> _____<<<<<<<
<ns0:Message2> _____<<<<<<<
<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
<LineItem>
<id>567</id>
<name>RAT</name>
</LineItem>
</ns1:MT_CANCELOUT>
</ns0:Message2>
</ns0:Messages>
regards
mickael
Edited by: Mickael Huchet on Dec 2, 2011 8:58 PM -
Outbound File Adaper : Dynamic configuration of FileSize and number of msg
I want to configure dynamically following parameters of Outbound file adapter
1) Number of Message equals
2)Elapsed time exceeds
3)File size exceeds
If we set all those parameter at designtime then automatically it stored at adapter.wsdl file but how can I change those parameter at runtime.
Let me know regarding this.
Thanks in AdvanceNoway.
Only statically. Stop adapter, change in manually and restart adapter.
Or write your own adapter in java.
Or create several adapters with different configuration and pick appropriate adapter dynamically. -
MDM Adapter dynamic configuration
Hi All,
The scenario is, PI picks up a file from ECC using sender File adapter and sends it to different MDM ports using the Receiver MDM adapter.
The only difference in the different receiver MDM communication channels sending the data to different ports is the
MDM Access Parameters-->Port Code.
So we have decided to use Dynamic Configuration of the MDM communication Channel to avoid using many communication channels.
Please help with the steps/ blogs that I can follow to do the above
Thanks,
NehaSinghHi,
but there is no dynamic config in MDM adapter - at least in 7.1
Regards,
Michal Krawczyk
Maybe you are looking for
-
I did find the migration assistant on the MAC but no counterpart on my PC. Therefore I don´t know how to start. I found the www.apple.com/migrate-to-mac page. I think this will help with the migration assistant for Windows
-
Flash Player problems from certain websites
Hi all, I cannot view certain videos and cannot browse normally at many websites with Flash player as it shows that my flash player is out-dated or disabled. Please advise if this is normal or I'm missing out on something. Thanks in advance... felix
-
Fetching Data from Multiple Services or End Applications in BPEL
Hi, We do have a requirement of fetching the data from multiple services exposed by the end applications. And there are no inter dependencies among these. Mostly 6 to 10 partner links have to be used to fetch this data. So planning to use the flow N
-
What is the program name which extend the partitions in BW 3.5 ?
Hi All.. What is the program name which extend/split the partitions in BW 3.5 ? Thanks.. Saj
-
Changing horizontal drop zone to vertical
I'm using Motion 5.1 to work with still photos. I have a FCP X template that uses horizontal drop zones that I want to format for vertical pictures. How can I do this without having to create a new drop zone? Is there a way to change the parameters o