cancel
Showing results for 
Search instead for 
Did you mean: 

DynamicConfigurationException using file adapter

Former Member
0 Kudos

Hi All,

I have a simple question:

Can I access the adapter specific Message Attributes with the DynamicConfigurationBean

even if I haven't a FILE SENDER Adapter?

I followed the blog:

[SAP Network Blog: SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean|]

I have an IDoc coming out from R/3 and I wrote the filename using a UDF, which it writes the dynamic configuration. I checked the DynamicConfiguration in the MONI and it was there:


...
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">0001</SAP:Record> 
...

When the message arrives at the Adapter the Audit log says:

....

write property message.interface from key (http://sap.com/xi/XI/System/File)FileName with value null;

....

MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header

....

It seems that the Bean cannot read the filename value fron the Attributes.

Has Anyone met such a similar problem?

Thank in advance

Emiliano

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can I access the adapter specific Message Attributes with the DynamicConfigurationBean

even if I haven't a FILE SENDER Adapter?

yes you can access.

coming to your second qeustion

....

write property message.interface from key (http://sap.com/xi/XI/System/File)FileName with value null;

....

MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header

....

this error is stating that file name is missing in the XI header.as per ur msg one could identify that UDF has read the file name.so there should not be any problem.can you try with saving and activating the adapter CC and full cache refresh.It should solve ur problem.

Please award marks if found useful.

Thanks

Hamja

roger_alluivall
Participant
0 Kudos

Hello,

i know it's an old thread but i happened me the same and i think the problem is the creation of the key. The parameters that the method expect are propertyName and propertyNamespace. Your call is like this:

//get Key of Directory File name
DynamicConfigurationKey keyF = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");

when it should be like this:

//get Key of Directory File name
DynamicConfigurationKey keyF = DynamicConfigurationKey.create(  "FileName", "http://sap.com/xi/XI/System/File");

I hop it helps to anybody that is finding the same problem!

Regards!

Roger Allué i Vall

Answers (4)

Answers (4)

0 Kudos

Hi All,

I have a Scenario where Sender is SFTP and receiver is NFS with a bypass scenario, We want to provide sender file name at target file.

Can someone help me with what ASMA parameters to be configured here.

My configured ASMA parameters:

SFTP Sender:

Filename check box is checked and Namespace is http://sap.com/xi/XI/System

Receiver NFS:

Checked boxes are...

1) USE ASMA

2) Fail if ASMA missing

3) File Name

Regards,

Mohit Dua

0 Kudos

Hi All,

I have a Scenario where Sender is SFTP and receiver is NFS with a bypass scenario, We want to provide sender file name at target file.

Can someone help me with what ASMA parameters to be configured here.

My configured ASMA parameters:

SFTP Sender:

Filename check box is checked and Namespace is http://sap.com/xi/XI/System

Receiver NFS:

Checked boxes are...

1) USE ASMA

2) Fail if ASMA missing

3) File Name

Regards,

Mohit Dua

prateek
Active Contributor
0 Kudos

Can I access the adapter specific Message Attributes with the DynamicConfigurationBean even if I haven't a FILE SENDER Adapter?

Yes. But not for idoc adapter. Only for adapters based on adapter engine.

Can u explain y r u using variable substitution. If really not requried, then uncheck the variable substitution option and try running the scenario.

Regards,

Prateek

Former Member
0 Kudos

Hi Emiliano,

It seems that you have created the key for filename but has not set the actual filename for that. Hence the adapter cannot find a value for the filename and returning null.

Can you share the Code Snippet you have written? That would be helpful to sugesst the necessary corrections in your code.

I guess your code ends here:

DynamicConfigurationKey key = DynamicConfigurationKey.create(
    u201Chttp://sap.com/xi/XI/System/Fileu201D,
    u201CFileNameu201D);

You also need to assign some value (the filename as input to the udf) to the key Filename:

conf.put(key, inputFileName);

Regards,

Suddha

Edited by: Suddhasatta Guha on Aug 7, 2008 1:12 PM

Former Member
0 Kudos

Hi Suddha,

as I wrote before I checked in the MONI the presence of the Attributes "FileName" in the

DynamicConfiguration, and it was there.

Anyway here the snippet, that is quite the standard:


DynamicConfiguration conf = (DynamicConfiguration) 	container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
String name = a != null?a.trim():"X";



//get Key of Directory File name
DynamicConfigurationKey keyF = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");

//Replace value of Filename
conf.put(keyF,name);

Thanks,

Regards

0 Kudos

Hi Sudha,

I have a query.

I have a Scenario where Sender is SFTP and receiver is NFS with a bypass scenario, We want to provide sender file name at target file.

Can someone help me with what ASMA parameters to be configured here.

My configured ASMA parameters:

SFTP Sender:

Filename check box is checked and Namespace is http://sap.com/xi/XI/System

Receiver NFS:

Checked boxes are...

1) USE ASMA

2) Fail if ASMA missing

3) File Name

Regards,

Mohit Dua