on 07-15-2009 10:05 AM
Hi
I need help / links suggestions in the following scenario
In an incoming file in one of the interfaces the source file to be polled by PI will contain the company code in the file name
I need to pick that from the file and use it in the mapping to pass it to the IDOC.
for eg .. ABCCompcode123.txt is the file name i need to derive the comp code from this and map it to the compcode field iin one of the IDOCS
kindly let me know how this can be achieved
Thanks
As already suggested use DynamicConfiguration by writing a UDF,
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);
// write here logic to take out compcode from filename
return compCode;
Also, set adapter specific message attributes in sender file adapter, refer
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can pick the name using DynamicConfiguration FileName property. Then just use one of text transformations.
Regards,
Radek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply
Actually i need to pass the infor from the Source file and then put in the IDOC in one of the fields
is there a link or a blog i can refer to cos most of the stuff ihave checked talks about writing a UDF and creating a target element ,but im not sure how is that to be done if the target is an IDOC
please help me if you can with a link or a blog
As I understand you need to create Flat File to IDOC scenario. First step would be get the source message using File Adapter with Content Conversion and next mapping to IDOC.
Simple scenario is described here:
http://www.riyaz.net/blog/xipi-file-content-conversion-for-simple-structure/
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.