cancel
Showing results for 
Search instead for 
Did you mean: 

Problem facing in Dynamic configuration in SAP PI 7.3

Former Member
0 Kudos
759

Hello,

I am doing dynamic configuration in sap pi 7.3. I am using the following UDF.

String devFileName="'a.vc'";

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

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

conf.put(FileName, devFilename);

I am using this UDF in message mapping and mapped this UDF in the message header.

I have selected the adapter specific message attribute in receiver communication channel also.

Still I am getting the folowing error.

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: 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

Exception caught by adapter framework: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header

'Transmitting the message to endpoint using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: 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.

Please help me what to do.

Thanks & Regards,

Moumita

Accepted Solutions (1)

Accepted Solutions (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi, try this code:


String devFileName="a.vc";

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

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

conf.put(FileName, devFilename);

ASMA checkbox and respective parameter should be enabled in the required Adapter.



Best Regards

Former Member
0 Kudos

Hi Hareesh/ Rodrigo,

I have tried both of your code. still I am getting the same error.

I have one more question. I have implemented the same code in Sandbox and it successfully runs. But now I am trying to implement it in Development same way and I am getting the error.

So my question is, is there any configuration changes needed in Development.

Thanks & Regards,

Moumita

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

did you active ASMA properly in DEV environment. i recommend you one thing if its possible. could you delete all the configuration in the ID and do this all over again?

former_member184720
Active Contributor
0 Kudos

Did you select the valid operation mapping in your interface determination???

please validate all the configuration again.. like if you have selected the correct graphical mapping in your operation mapping and the same is selected under interface determination...

Message was edited by: Hareesh Gampa

Former Member
0 Kudos

Thanks to all.

The issue has been resolved. To achieve this, I have done the all over configuration again.

Thanks & Regards,

Moumita

Answers (2)

Answers (2)

engswee
Active Contributor
0 Kudos

Hi Moumita

Did you check in the SOAP header of the message at the Adapter engine, if the value is populated in the Dynamic Configuration section? Maybe there is a typo/mismatch.

Can you also try without the concatenation when executing the create method:-


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

Rgds

Eng Swee

Former Member
0 Kudos

I have tried the following/;

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

Still I am getting the same error.

If I am selecting the ASMA property in sender communication channel then in the Dynamic configuration section I am getting the source file name correctly and this source file name is getting coppied in the targer file name.

conf.put(FileName, devFilename);-----> I think this line is not working properly.

I don't know why? Please suggest what to do.

Muniyappan
Active Contributor
0 Kudos

there is mismatch in the code

String devFileName="'a.vc'";

conf.put(FileName, devFilename);

can you change it to "N" and try.

if you are in dual stack check the name in sxmb_moni.

SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI / PI



Former Member
0 Kudos

conf.put(FileName, devFilename);

In the place of devFileName whatever string I am trying to put it is not working.

Is there any need of changing any configuration for this?

Thanks & regards,

Moumita

former_member184720
Active Contributor
0 Kudos

If the declared string name and is different from the one which is in conf.put then you should get syntax errors.

However can you try with below... the only difference is DynamicConfigurationKey.. I'm not sure if the "FileName" is causing issue.

String filename = new String("");

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

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

filename = "a.vc";

conf1.put(key1,filename);

return " ";

Muniyappan
Active Contributor
0 Kudos

Hi,

Did you select ASMA property in the sender channel?

Former Member
0 Kudos

If I am selecting the ASMA property in the sender channel then the target file name is getting same as sourcs file name. But the requirement is the target file name as "'a.vc'".

For the above reason I have not selected the ASMA property in sender channel.

If I select the ASMA property in sender channel, then what to do to fulfill the requirement.

Former Member
0 Kudos

Hi Saha,

It seems like the values are not passing to udf from source payload i.e. why your getting the above exception.

Check the values of the source field that your passing to udf in the mapping.

Thanks,

Satish.