how to assign values to Communication channel dynamically


SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

how to assign values to Communication channel dynamically

Q:I have a requirement where the value coming in this field in the ‘Logon Language’ of the RFC_IN channel. i.e we need to dynamically identify the login language based on this value.
Ans:You can change Communication Channel Parameters using dynamic configuration. In repository write code for ‘Dynamic Configuration’ in UDF to call the communication channel and change the parameters accordingly. Here is the UDF sample code for your reference to change file name.

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

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

String filename= “tb_”a“.txt”;

conf.put(key1,filename);
———–
You can change Communication Channel Parameters using dynamic configuration. In repository write code for ‘Dynamic Configuration’ in UDF to call the communication channel and change the parameters accordingly. Here is the UDF sample code for your reference to change file name.

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

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

String filename= “tb_”a“.txt”;

conf.put(key1,filename);
—————-
This link may help u
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3507%3Fpage%3Dlast%26x-showcontent%3Doff
—————-
We cannot dynamically assign value to ‘Logon Language’ parameter in RFC channel as Logon Language is not part of ASMA(Adapter Specific Message Attributes).

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Can you explain your requirement and reason behind assigning values to logon field dynamically?
————–
I wanted to know is there any other way we can assign the language value coming in xml to ‘Logon Language’ parameter in reciever RFC channel. In our scenario(SOAP to RFC) the language value may vary in the input xml
.———————
An alternative will be to use different communication channel for this and then in receiver determination check the source field and route to appropriate service

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
en.pdf24.org    Send article as PDF   
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *