Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using CALL TRANSFORMATION

former_member852447
Active Participant
0 Likes
2,482

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

1 ACCEPTED SOLUTION
Read only

former_member852447
Active Participant
0 Likes
2,014

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

9 REPLIES 9
Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
2,014

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.

Read only

former_member852447
Active Participant
0 Likes
2,014

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.

Read only

0 Likes
2,014

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

Read only

former_member852447
Active Participant
0 Likes
2,014

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

Read only

0 Likes
2,014

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.

Read only

0 Likes
2,014

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

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
2,014

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

Read only

former_member852447
Active Participant
0 Likes
2,015

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

Read only

0 Likes
2,014

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.