on 10-04-2010 11:09 AM
Hi,
I have a IDOC -> SAP PI -> JMS scenario. JMS service is an External Party.
I have to populate the JMS message Header with Fields like JMSType, Sender and Receiver. These fields will come from the IDOC. How to populate these?
<JMSType>Notification</JMSType>
<Sender>SAPR3</Sender>
<Receiver>JMSService</Receiver>
If I am not wrong, I have to make use of Dynamic Configuration and populate, but if I look at the available JMS ASMA, I am not able to decide how (which fields to use) to populate. Earlier I had done Dynamic Configuration for FILE and SOAP adapters.
Thank you,
Pankaj.
Edited by: Pankaj Sharma XI on Oct 4, 2010 2:38 PM
Hi,
The UDF is only part of the solution.
You need to also configure your JMS Receiver channel as follows:
1. Under the Advanced tab you need to define the properties of the RFH2 header you are using.
- Check the box for 'Use Advanced Specific Message Attributes'
- Check the box for 'Fail if Adapter Specific Message Attributes missing'
- Check the box for 'Specify Additional JMS Message Properties'
- Define your two properties in the table and set the Java type
2. Under the Module tab, you need to configure the properties
- Add the module AF_Modules/DynamicConfigurationBean in position 1 with module key HEADER
- Add module configuration for both of your properties as follows:
Module key HEADER
Parameter name key.0
Parameter value write http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
Module key HEADER
Parameter name value.0
Parameter value JMS DCJMSMessageProperty0
Module key HEADER
Parameter name key.1
Parameter value write http://sap.com/xi/XI/System/JMS DCJMSMessageProperty1
Module key HEADER
Parameter name value.1
Parameter value JMS DCJMSMessageProperty1
Try this .....
Cheers
Colin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
The above scenario works for me.
But what if we need to pass mutiple values in the JMS header field.i.e Source IDOC contains multiple deliveries and PI will split them to one delivery per message to target. In this case each message that is sent to target should contain delivery number as JMS header field, we retrive this value dynamically from mapping using UDF.
Currently we are facing an issue that only last delivery number will be send to all target messages.
Please let us know if you have worked on similar scenario?
Cheers,
Karthick
it works in two steps
add a "Additional JMS message property" by name XXX with type as String on reciever JMS adapter.
Add AF_Modules/DynamicConfigurationBean and set the value of the above
mentioned property using appropriate property name i.e. like
DCJMSMessageProperty2 to SAPR3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj and Amol,
Thank you for responding.
anyway you can try to use dynamic configuration UDF, it will work.
Yes I will do it using UDF.
Add AF_Modules/DynamicConfigurationBean and set the value of the above
If I use DynamicConfigurationBean, then the value will be static, the one which I fill in the Communication Channel. So I have to make use of UDF.
What I think is:
1) Create a UDF in message mapping with below logic:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty0"); //also logic for Property1 and Property2.
conf.put(key1,MessageType); //MessageType comes from IDOC.
return ""; //no need to return a value.
2) Create a Receiver JMS channel with below settings:
Specify Additional JMS Message Properties
Name - MsgType Java Type - String
Name - Sender Java Type - String
Name - Receiver Java Type - String
Now with the above settings I should (hopefully) get the headers like:
<MsgType>AbcValidation</MsgType>
<Sender>SAPR3</Sender>
<Receiver>JMSReceiver</Receiver>
I will try with the above configuration and update the thread accordingly. *If you feel that the approach is wrong/ incomplete, then
please do respond.*
Thank you,
Pankaj.
Hi,
I have written the UDF and able to configure Dynamic Configuration for DCJMSMessageProperty0 and DCJMSMessageProperty1.
I am getting below data in Dynamic Configuration node in SXMB_MONI:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Response -->
<SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty1">9300009820</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">SAPPI</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">SAPPISYSTEM</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPECC</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/Message/30" name="CALLER_CODEPAGE">4102</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">SAPECCSYSTEM</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP"/>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">Z_VALIDATION_ACK01</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">Z1VALIDATIONACK</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">LS</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/JMS" name="DCJMSMessageProperty0">9300000016</SAP:Record>
</SAP:DynamicConfiguration>
1) Why are details of the IDOC are coming?
2) Why am I not getting Sender and Destination instead of DCJMSMessageProperty0 and DCJMSMessageProperty1?
Please help.
Thank you,
Pankaj.
Hi,
I got a thread which deals with same problem:
I will test my scenario accordingly and update the thread.
The above thread is not working for me. The IDOC details are still coming and now the DCJMSMessageProperty0/ 1 are not coming after I enter the DynamicConfigurationBean. I am working on SAP PI 7.1.1
Please help.
Thank you,
Pankaj.
Edited by: Pankaj Sharma XI on Oct 7, 2010 12:15 PM
Hi,
are you working on genarating extra RFH2 header in JMS messagess?
anyway you can try to use dynamic configuration UDF, it will work.
Regards,
raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
26 | |
10 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.