on 10-07-2015 2:58 PM
Hi All,
I have a scenario : IDoc to HTTP in SAP PI 7.4 where I need to post messages at receiver HTTP_AAE
with GLN nos & filenames which are unique each time.
Also need to use additional query parameters for passing query string expected at 3rd party system.
Currently I have set 2 parameters in addnl query parameters in advanced tab:
from | Z:60030565400016 |
filename | INVOICE128424589.xml |
But these are constant , and client needs different filename and GLN no each time when IDoc is being sent.
Quick solution appreciated.
Regards,
Mayank
In short I need to pass additional query parameters dynamically.
Can anyone give a quick solution on this as we have different filenames & GLN no at receiver system.
Regards,
Mayank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mayank,
Here is a piece of sample code you can add to your mapping to insert two dynamic url parameter values (once for each value):
//Get the dynamic configuration from the container
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dcKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System", key);
conf.put(dcKey, value);
return value;
The name of the key would need to be passed into the UDF as a parameter along with the dynamic value. You can use URLParamOne and URLParamTwo as constant values which would represent from and filename. Refer below for the channel settings to pass the dynamic values into the HTTP receiver channel:
Hi Ryan,
Thanks for the info , I have used dynamic configuration in the same way for passing 2 parameters.
But I am getting above error in the channel.DO you have any clue why its coming.
Are we using the right combination of parameters in channel or query string parameters expected at receiver end could be different.
Regards,
Mayank
Hi Mayank,
The values come from the mapping code that I supplied above - in the channel you mention the name but in a mapping you need to pass the values you want to send for those parameters. So for those you need to use the keys URLParamOne & URLParamTwo and you also have to designate what the values should be for each. The value assigned for URLParamOne would be whatever should be passed for from and the value assigned for URLParamTwo would be whatever should get sent for filename.
You can ignore the additional query parameter values as I temporarily changed the names for the ASMA attributes to give a sample but those others are relative to my use case. The usage of the ASMA parameters did work for me also.
Regards,
Ryan Crosby
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.