‎2005 Mar 04 7:12 AM
Hi,
I have an application where i have to convert an IDOC to XML format so that it can be handled by webmethods.
I want to know how to convert IDOC to XML. I have seen that in SAP there are two port types, XML and XML HTTP. Are they used for posting an IDOC in XML format at defined port.
When i tried to generated a test IDOC with port type as XML, it has created an xxx.XML file in application server but i an unable to display it.
1). Can any one pls. tell me how to convert IDOC to
XML??? What are the different methods ( if available)
2). DO i need to have any extra component for this??
3). what are XML and XML http ports are for.
Pls. help me as this is very urgent.
Thanks in advance.
Pratik
‎2005 Mar 04 7:40 AM
Hi,
Does xxx.XML contain no data? Or you are just not able to display it (try opening it in notepad).
1 - You are doing it right. Using XML port should be enough.
2 - You don't need anything additional.
3 - XML port gives you an option like a file port (you get the idoc in an XML file) for batch type interface. XML http will let you post the XML data realtime to an web server that accepts XML messages.
If your partner system can take http messages, you can use http port to send the IDOC directly to that system, else you can create the XML file and send it in batch mode.
hope this helps,
cheers,
Ajay
‎2005 Mar 04 5:23 PM
Hi Ajay,
In my case, xxx.XML is containing, but i am unable to open is ( display it). This file is in Application server and i am trying to display it with T.Code AL11.
Can you pls. tell me how do i display it or is there any way to download it to my PC, in same format it is in application server.
You said in your mail that XML port is for create XML file and send it in batch mode. what does this mean, sending in batch mode. can you pls. clarify.
Thank,
Praitk
‎2005 Mar 04 5:52 PM
Hi Pratik,
Best option would be to copy the file to your PC if you have access to the directory on the app server (doubleclicking on a .XML file shall open it in Internet Explorer).
If you do not have any access to the app server, you can write a small ABAP to upload from this dataset and GUI_DOWNLOAD this file to your PC and then view it.
By batch mode I meant if the partner is not directly accessible over http, and will take XML files (over email/ftp/whatever to then post into their system using their application) then these XML idoc files can be sent to it (using ftp for example). If the partner system is accessible by your SAP server over HTTP, you can use the XML http port.
hope this helps,
cheers,
Ajay