on 09-07-2011 7:29 AM
Hi Experts,
I have a requirement that.. I have to capture the message id of message in PI system which is sent by SAP and that message ID I have to send back to SAP system again and the main target (third party system) also.
SAP >PI>SOAP
SAP>PI>SAP.
How to solve this requirement. Please guide me how to do this.
Thanks & Regards,
Satish Kumar P.
Hi
,
Please use this Wiki to read the message ID and map it to IDOC unused field under EDI_DC40 segment.
http://wiki.sdn.sap.com/wiki/display/Snippets/UDFtoReadMessageIDofaPIMessage
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
If you want to send message ID to SOAP Client, please refer SAP Note "SAP Note 856597 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 SOAP".
Also in case of SAP systems, SAP PI message id is already getting passed.
For example: In case of Proxy communication, same message ID will be used to create mesage in SAP ECC.
In case of IDOC communication, IDOC control record will capture SAP PI message ID.
Or do you wish to pass the message ID in some field in structure? If yes, do you have separate mapping program for each receiver?
Regards,
Gouri
Hi,
Yes I have to map the message id to target structures. I have created the different mappings for both receivers and i have tested. It's sending two different message id's to two receivers. But the parent message id is common for both.
But my requirement is i have to send same message id to both systems.
Source structure is common and we have two different target structure.
In 1 first mapping (SAP->SOAP) I have mapped all the fields and udf to message id field
In 2 mapping (SAP->SAP) i have mapped some field and udf to message id field.
please guide me if i did any wrong.
thanks & regards,
Satish Kumar P.
Hi,
Exactly, I have to send parent message id to both systems.
And this is the udf code I am using.
public String getMessageID(Container container) throws StreamTransformationException{
String MessageID;
java.util.Map param = container.getTransformationParameters();
MessageID = (String) param.get (StreamTransformationConstants.MESSAGE_ID);
MessageID = MessageID.toLowerCase();
String String1 = MessageID.substring(0,8);
String1 = String1+"-";
String String2 = MessageID.substring(8,12);
String2 = String2+"-";
String String3 = MessageID.substring(12,16);
String3 = String3+"-";
String String4 = MessageID.substring(16,20);
String4 = String4+"-";
String String5 = MessageID.substring(20,32);
MessageID = String1String2String3String4String5;
return MessageID;
}
Thanks & Regards,
Satish Kumar P.
In the current message mapping, go to signature tab where you can add different target structures. You will find some blogs on SDN for multimapping. Let me check if I can get something for you.
Once you create your multimapping, you can right click on target structure. You will get add variable option. Whatever value you will pass to this variable, it will hold during runtime. You can map this variable to required target field.
I think the UDF that you have written will give you parent message ID at runtime. But I need to check this. I will try to develop a sample scenario and get back. Mean while plz work on multimapping.
Thanks,
Gouri
Use Enhanced Interface Determination.
There is a blog by Jin Shin on "Multi-Mapping without BPM - Yes, itu2019s possible!". You can refer that.
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3115] [original link is broken] [original link is broken] [original link is broken];
Regards,
Gouri
Hi Gouri,
I have done the scenario and tested. Still PI is sending different sub message id's. For your reference find the below messge id's taken from sxmb_moni
XML Original Message Msg ID = 9AD6574E0F60BD5BE10000000A428A70
. Subnode Msg ID = 00505695440A1EE0B6A678AB1535DF97
. Subnode Msg ID = 00505695440A1EE0B6A678AB1535FF97
Thanks & Regards,
Satish Kumar P.
Only possible solution
You cant use this in case of a message split.
If you need the parent message for a split message you can do a RFC Lookup to PI server and get it. In the RFC select the parent message id (PARENTMSG) from SXMSPMAST table by passing the current message id (child message id) as MSGGUID.
In your case
If you select PARENTMSG from SXMSPMAST table by passing MSGGUID as 00505695440A1EE0B6A678AB1535DF97
then it will return 9AD6574E0F60BD5BE10000000A428A70
XML Original Message Msg ID = 9AD6574E0F60BD5BE10000000A428A70
. Subnode Msg ID = 00505695440A1EE0B6A678AB1535DF97
. Subnode Msg ID = 00505695440A1EE0B6A678AB1535FF97
Sub Node will have different message ID. When you are creating two different messages in PI (One for SOAP and one for SAP), they will definately have two different message IDs as message ID is unique per message.
Do you mean you want to create message with same message ID for SOAP and SAP??? If yes, then it is not possible as you are having two different messages.
I thought messages will get created with different message ID, but you want same parent message ID to be passed to some field in structure.
Plz clarify.
Regards,
Gouri
Plz chk below things.
1. Cache is refreshed.
2. Your mapping program is active and correct mapping program is selected in Operational Mapping.
3. After updating Oprational Mapping with occourance 0 to Unbounded, Same is selected in Interface Determination to make Multicity 1 to Unbounded. Activated the interface determination after doing this change.
4. Cache status in ID at environment-cache status overview.
Regards,
Gouri
Hi Gouri,
I tried that, I am getting the below error in sxmb_moni.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Technical Routing
-->
- <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="OUTBINDING">CO_TXT_OUTBINDING_ERROR</SAP:Code>
<SAP:P1>-XJL_300</SAP:P1>
<SAP:P2>-BS_TPT_CSL,http://sap.com/xi/castp/TransactionalData.UpdatePIMessageID_In</SAP:P2>
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>No standard agreement found for , XJL_300, , BS_TPT_CSL, http://sap.com/xi/castp/TransactionalData, UpdatePIMessageID_In</SAP:AdditionalText>
<SAP:Stack>Problem occurred in receiver agreement for sender -XJL_300 to receiver -BS_TPT_CSL,http://sap.com/xi/castp/TransactionalData.UpdatePIMessageID_In: No standard agreement found for , XJL_300, , BS_TPT_CSL, http://sap.com/xi/castp/TransactionalData, UpdatePIMessageID_In</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Thanks & Regards,
Satish Kumar P.
Hi Satish,
In case you are using proxy communication to SAP, use SOAP adapter and then you would be able to use multimapping.
Also, in case you want to send the same message id to both the recievers use Enhanced Reciever determination and pass the parent message id in dynamic configuration and then that can be used in the subsequent multimapping to pass to the target system.
Hope this is useful.
Regards,
Sanjeev.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.