on 04-21-2008 3:43 AM
Hi All,
I have to pick file name from the mapping , where i will give file name as customer id and invoice and current date, so what should i do in this case , what should i do in communication channel , please help me in that it is very urgent
thanking you
srdhar
hi
refer these
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
write the UDF in mapping for the same and also use the adapter specific message attribute in the file communication channel.
rgds
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much ,
but i must get cust_id and invoice in the file name where it will take from the records , in the proxy ,
so it will be like ((CUST_ID + CURRECTDATE)+INVOICE)
SO how to connect this with UDF
i have already created a udf same as given in the blog
thaning you
it is very urgent
sridhar
RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MT_eIN_RECV/FILENAME. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_eIN_SAP2FILE_ method GETFILENAME$[98410_2008/04/21_616515, com.sap.aii.mappingtool.tf3.rt.Context@1e595e85]
but i must get cust_id and invoice in the file name where it will take from the records
If you are getting these fields in source structure then you can pass it to UDF as parameters, access them in UDF and then concatenate CUST_ID + CURRECTDATE)+INVOICE as per your requirement
Also from DATE function you can take currentDate and pass it to UDF
You will be able to test this feature at runtime only
Edited by: Mugdha Kulkarni on Apr 21, 2008 8:38 AM
Hi Sridhar,
You have to go through the below blog for the settings in the receiver adapter.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
The code in the UDF should be like this
DyanmicConfiguration conf = (DynamicConfiguration)container.getTransforamtionParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey Key = DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/File", "FileName");
*Create the string file name required by you
for ex:*
String sfileName = CustID + Invoice+..;
Put the file name in
conf.put(Key, Sfilename);
Regards,
Krishnaraju
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.