cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy to file using dynamic configuration

former_member203631
Participant
0 Kudos

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

shiva

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

1) Write one UDF & map Like this

Name-----UDF--


MT_Target

2) Check the ASMA Option in Receiver Adapter Aloneu2026..

UDF Code:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");

String Outputfile = conf.put(key,a);

return Outputfile

Regards

Seshagiri

Former Member
0 Kudos

Hi,

Check this

/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies

/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy

Regads

prateek
Active Contributor
0 Kudos

U 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

Former Member
0 Kudos

Hi Siva,

Read SAP Note 801926 for details for config and issues

Thanx & Regards

Vinod