submit xml to TN

Hello

I receive Idoc, blindly convert it to xml and publish. This is subscribed by a service in another IS and submits to TN.

Now how to submit xml to TN:
how will it recognize the sender , receiver and message type.

If it was EDIFACT message then the sender and receiver is picked from UNB segment.But how it will be handled in XML.

Thanks in advance.
Vinod

Vinod

In order to submit XML to TN and its recognition,basically you have to include sender/receiver place holders in the xml data if it doesnt exist.Create a TN doctype with specifying root tag of your XML and in the indentifying extract queries select SenderId DUNS(set XQL query for sender XPath),ReceiverID select DUNS or any other id according to your partner profile (set XQL query for receiver XPath) TN uses this for recognizing XML (triplet sender/receiver/doctype)

I assume that you have already created Sender/Receiver profiles in TN.

HTH,
RMG

Hello RMG Thanks for reply.

For example: consider sender = America , receiver=europe, doctype = orders.
and profiles are created in TN.
Now you say that the doc should contain

America europe America . . . . If it is like this then the tripple will be identified and defined processing rule will be selected.

If the data donot contain triple, then how should I define a TN doctype template, could you please give a exmple…

Thanks
Vinod

“If the data donot contain triple, then how should I define a TN doctype template, could you please give a exmple…”

You may have to follow the above said format(adding triplet in XML),otherwise TN doctype will not recognize your XML with out triplet…Even if you set root tag in th TN doctype section then the problem with be for sender/receiver identfiers and TNAnalysis will show “unknown” for sender/receiver and fails recognition.So think about it.

HTH,
RMG

Hello RMG

I receive a Idoc in xml format like below for example


<EDI_DC40>

.
.
.

could you please tell the next step (how to set the doctype with triple in TN and use it with above incoming document).

2nd method:
Since I subscribe the data from broker,can I use the trigger condition values for recognoizing triple and submit data to TN
Thanks
Vinod

Why are you publishing the XML to the Broker? It’s probably an unnecessary step.

The sender, receiver and doc ID should be derivable from within your XML document. IDocs generally identify these things. For example, E1EDK01/RECIPNT_NO might be the identifier to use for the receiver. E1EDK01/BELNR might be appropriate to use for the document ID. Work with your SAP team to identify which fields to use.

Vinod,

You have to extract the Sender/Receiver information from the IDOC/<EDI_DC40> control record fields SNDRRN,RCVPRN …(ask your functional team about fields) and map it to your XML (Sender/Receiver) placeholders and route it to TN and persist the XML document.

HTH,
RMG

An even more direct path for IDoc → TN would be to simply submit the IDoc XML directly to TN (http://server:port/invoke/wm.tn/receive) – IF you’re using SAP 4.7 or newer, and can set up the HTTP port.

Good advice, though one should have SAP call a wrapper service instead of receive directly.

dear vinod,
when u receive a idoc, some details like senderID, receiverID, doctype… also will come along with the idoc, u can find the details in the Idoc, then write a service to send the xml doc to TN then u can send the doc to TN,
sanjar