cancel
Showing results for 
Search instead for 
Did you mean: 

Access dynamicConfiguration in PI7.1 userdefined Mapping

Former Member
0 Kudos

Hi All,

how can i access the DynamicConfiguration for reading the adapter specific message attributes in a user defined mapping in PI7.1.

when trying to do it like in PI7.0 i get an exception that the parameter with the key StreamTransformationConstants.DYNAMIC_CONFIGURATION doesn't exist.

br,

martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I use the following Coding:

InputParameters params = container.getInputParameters();

DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

prateek
Active Contributor
0 Kudos

Have you tried this

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

Regards,

Prateek

former_member190389
Active Contributor
0 Kudos

Try this code


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

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

String valueOld = conf.get(key);
if (valueOld != null) {
    String valueNew = valueOld.replaceAll(u201Cinputu201D,u201Doutputu201D);
    conf.put(key, valueNew);
}

in Sap docs they havespecified this method only for PI7.1

http://help.sap.com/saphelp_nwpi71/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm

Edited by: Progirl Progirl on Dec 5, 2008 5:35 PM

stefan_grube
Active Contributor
0 Kudos

This code is intended for the Java mapping and does not work in a UDF.

Use the code provided by the other posters.

DYNAMIC_CONFIGURATION is not deprecated.

Regards

Stefan

Answers (5)

Answers (5)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

sorry but this code is just copied from the documentation.

As i mentioned, the method is deprecated in 7.1 even if it is in the documentation with the old (PI7.0 and XI3.0) version.

br,

martin

Former Member
0 Kudos

This method is deprecated in PI7.1

prateek
Active Contributor
0 Kudos
former_member190389
Active Contributor
0 Kudos

Hi,

It should exist

see the javadoc

http://help.sap.com/javadocs/pi/SP3/xpi/index.html

Please post the code

Edited by: Progirl Progirl on Dec 5, 2008 4:35 PM

former_member181985
Active Contributor
0 Kudos

Hi,

You need to check the adapter specific message attributes in Communication Channel.

- Gujjeti.