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.
“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.
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.
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.
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.
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