on 01-05-2015 9:47 AM
Dear community,
I struggle with following requirement:
We have very big files in a shared folder and therefore we like to get the filenames of this files to write a protocol in ERP.
I am using the sender file adapter (7.3) and do know the ASMA. This only works if the adapter read the data of the files - then we get the filename in dynamic config.
Now I struggle in getting a clue how to just read the filename via file-adapter - without touching the data.
At the end, only the filename (e.g. 'default0101.xml') should be transfered in the target system.
Can somebody please give me a hand on this?!
Best regards
Hi,
Regarding your first requirement that how to get the filename.
You can achieve this by using asma parameter (filename) of channel.
And regarding your second requirement that you want only filename and not want to pick file.
You can try and select the processing mode as test.hopefully it should work.
Regards
NAVEEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen, thanks for your help.
Both of your ideas I used but now getting the follwing error:
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Content is not allowed in prolog.
I have a mapping in the ICO where I only refer to the dynamic config parameters and put the filename via an UDF in a target field of the target interface. The UDF is correct and works for other scenarios too.
What kind of source interface do i need when for my requirement of not reading the data of the file?
Now I put some dummy-interface without any usage in mapping - because I just use the UDF.
Regards,
Jens
Hi Jens,
By using the UDF code below and Sender file channel ASMA option checked , you can extract the source filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String s = conf.get(key);
return s;
Regards,
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear all,
emberassing to say but the problem is in front of the display. After re-configuring and checking all single options I was able to solve the problem - even with ASMA and the simple UDF.
Thanks for your investments,
regards Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Jens,
In order to read the file name dynamically u can use below link.
http://scn.sap.com/docs/DOC-58827
hope this helps.
thanks and regards,
Praveen T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jens,
Does the problem appear with the small ones?. May be the files are not written completely, have you tried to use the option "Msecs to Wait Before Modification Check"?.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.