cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Dynamic Configuration

Former Member
0 Kudos

Dear, All

does anybody know how to access Dynamic Configuration (FileName) inside Java Mapping program.

regards,

Mikhail

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

Here is an example for HTTP adapter. It's the same for file adapter.

Only technical name will be different.

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

You can find technical name from:

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Regards

Vijaya

Former Member
bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

I had missed the line to read the FILENAME in the code pasted above. Have corrected it. Think the code above should now work.

Regards,

Bhavesh

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

// access dynamic configuration
      DynamicConfiguration conf = (DynamicConfiguration) param.get( 
          StreamTransformationConstants.DYNAMIC_CONFIGURATION);
 DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

      // read value
      String Filename = conf.get(KEY_FILENAME);

This code should do the trick.

For further info look at this link,

https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html

Regards,

Bhavesh

STALANKI
Active Contributor
0 Kudos

access it in the adapter module and pass it t in the payload and then you can access it in java mapping!