on 07-03-2006 11:47 AM
Hi,
I'd like to access the StreamTransformation parameter SENDER_PARTY in the Java initialisation section of my message mapping. Does anyone know how I can do this?
Regards,
Pete
Hi Peter,
In the initialisation section you can use:
party = (String) getParameters().get(StreamTransformationConstants.SENDER_PARTY);
In a user defined function it works as well with:
party = (String) container.getTransformationParameters().get(StreamTransformationConstants.SENDER_PARTY);
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe I should explain this:
The mapping program is a class derived from the interface GlobalContainer. So you can use the methods of GlobalContainer all the time during the mapping program.
http://help.sap.com/saphelp_nw04/helpdata/en/e0/7d8e40496f6f1de10000000a1550b0/frameset.htm
You can test this by a user defined function:
return container.getGlobalContainer().getClass().toString();
You will see the name of generated message program as the output of the function.
Compare it with this function:
return getClass().toString();
Regards
Stefan
Hi Peter,
AFAIK, We cannot access StreamTransformation values in Java Initialisation section of Graphical mapping.
Instead you can try this work around:
1. Declare a global variable in Java Section.
2. Write a UDF at Parent node to set the Dynamica value from Container to global variable.
3. At node level write a UDF to read value from global variable.
This technique will store the Dynamic value once in global variable and can be read many times in another UDF at node level.
Design:
Header -
| SetDynamicValueUDF |----> Target header
Item Item [0- Unbounded]
Regards,
Ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
String senderParty;
map = container.getTransformationParameters();
senderParty = (String) map.get("SenderParty");
Regards,
Smitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
String headerField;
java.util.Map map;
// get runtime constant map
map = container.getTransformationParameters();
// get value of header field by using variable key
headerField = (String) map.get(SenderParty);
From,,
http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.