‎2009 Aug 18 4:47 PM
Hello experts,
I am using CALL TRANSFORMATION functionality for the first time to convert an ABAP internal table to an XML string. I need to get this XML string out of the ABAP program to send to PI for outward transmission to a legacy system.....does anybody know how I to get the XML file to PI.
regards
‎2009 Aug 20 5:33 PM
Hello sandra/Tamas,
Your answers have both been very helpful so I will give you both points but I am not quite there yet in my understanding. I do understand that I do NOT need to use CALL TRANSFORMATION at all. I have created a data type proxy and the PI people tell me that in PI message interface is now called service interface. In service interface under PO created there are a number of methods of which EXECUTE_ASYNCHRONOUS is one of them. What I am not sure about is whether I have to create my own class and method for use in my abap program or whether I can just call the SAP defined method EXECUTE_ASYNCHRONOUS in my program which will send the data to the created proxy.
Thank you
‎2009 Aug 18 5:10 PM
I suppose you'd have to create an interface definition in PI that takes care of the transfer and then create a corresponding proxy in your ECC system. You'd call the proxy in your program to send the XML data to PI which will then take care of sending the information to the recipient.
Try to get some help from a PI person - they will know what to do.
‎2009 Aug 18 5:42 PM
Hello Tamas,
Thank you for replying. We have created an ABAP PROXY in our SRM system with the data structure required and we know how to get the filled ABAP PROXY to PI but the question is how do we get the XML string in the ABAP program to the ABAP PROXY created.
‎2009 Aug 18 10:37 PM
You want to know how to call the proxy from ABAP ? Please see this example : http://help.sap.com/saphelp_nw70/helpdata/EN/3e/a35c3cff8ca92be10000000a114084/frameset.htm
‎2009 Aug 18 10:56 PM
Hello Sandra,
Thank you for your input but please answer me the following:
In the link you sent me is this the code that I would insert into a stand-a-lone ABAP program to send to an ABAP PROXY
What does 'client proxy' mean..is this the same as the ABAP PROXY found using SPROXY.
regards
‎2009 Aug 19 8:00 AM
Hello David,
Try this way:
Use SAP identical transformation as that does not require transformation template.
for example you can check following code:
data itab type table of <table_name> with header line.
data xml_string type string.
select <fields>
into table itab
from <table_name>
up to 10 rows.
call transformation id
source itab = itab[]
result xml xml_string.
write xml_string.
Hope this helps!
Thanks,
Augustin.
‎2009 Aug 19 9:33 AM
SPROXY, yes, probably when you have a PI (I used to consume web services without PI so I always used SE80).
I was not sure what whas your question (is it just about call transformation, or just about how to pass a string to a web service in another system?)
Here I assumed you wanted to call a PI web service, but as I don't know PI, I answered as if you wanted to call any web service.
When you want to call a web service from your SAP system, you have to create a proxy to map this web service. An ABAP object class is then automatically created. You have to use this class in your custom ABAP program to call the web service (as indicated in the sap library URL I gave you).
What I don't know is if PI works differently (maybe there are some existing generic proxies in SAP systems?)
I hope to answer your question...
You may also post questions to the forum
‎2009 Aug 19 2:39 PM
The way I saw such a scenario happening was that in PI, someone defines the service interface using a WSDL for the web service you want to consume. In the system that consumes the web service (in your case SRM), you'll see this service interface (in the appropriate namespace) when going to SPROXY. So, you then will generate a proxy for this service interface. This will result in a class being generated, which will have an EXECUTE_SYNCHRONOUS method. It is this method that you have to call in your ABAP program, and make sure you populate the necessary interface fields, structures etc. according to the signature of this method. Again, how this interface looks depends on the service definition in PI (so ultimately on the WSDL that was used).
‎2009 Aug 20 5:33 PM
Hello sandra/Tamas,
Your answers have both been very helpful so I will give you both points but I am not quite there yet in my understanding. I do understand that I do NOT need to use CALL TRANSFORMATION at all. I have created a data type proxy and the PI people tell me that in PI message interface is now called service interface. In service interface under PO created there are a number of methods of which EXECUTE_ASYNCHRONOUS is one of them. What I am not sure about is whether I have to create my own class and method for use in my abap program or whether I can just call the SAP defined method EXECUTE_ASYNCHRONOUS in my program which will send the data to the created proxy.
Thank you
‎2009 Aug 20 5:50 PM
All you have to do is call the EXECUTE_ASYNCHRONOUS method from your ABAP program. No need to create anything additional like classes etc.
Since PI uses XML per definition, you shouldn't have to use CALL TRANSFORMATION. The conversion to XML will be done by PI. In your ABAP program, you just have to fill the interface parameters of the EXECUTE_ASYNCHRONOUS method with the proper values - the rest will be then taken care of.