cancel
Showing results for 
Search instead for 
Did you mean: 

Filename should Pick dynamically from Mapping

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi.

In your Receiver File Adapter, have you give VARIABLE NAME SUBSTITUTION ENABLE??

Also, Try by Selecting the option , DISABLE SECURITY CHECKS under Varibale Name substitutiion

Thanks & Regards,

Sateesh

Former Member
0 Kudos

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]

Former Member
0 Kudos

Hi,

Problem the in the Filename.check the filename what u have to configured in Repoistery & what u have to configured in the Variable substitution(the file name must be same what u have to configured in repoistery).

Regards,

Sateesh N

Former Member
0 Kudos

while testing in the mappig itself i am getting the this error

i have checked what you have said, i have given the same name

thanking you

sridhar

Former Member
0 Kudos

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

0 Kudos

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