cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate Proxy from Function Module

Former Member
0 Kudos

Hi,

Could you please clear a little bit.

I created Service Provider. I developed a simple ABAP program, which calls the Proxy and sends the data to PI.

Now I would like to do the opposite. I have a function module, which should be called from PI.

Should I create Service Provider then? I created one in Function Module direct with right-mouse-click. I tested and WSDL file is generated fine with answer from f. module.

But when I go to SPROXY I do not see it under my namespace. Where could I put the namespace and move to SPROXY my generated proxy, which is now just under SE80 under Enterprise Services in SE80?

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Walczak,

Do u want to go with proxy or do u want to go with Function module?

If you want to use function module you need to import it into PI ESR.

Regards,

Suhale.

Former Member
0 Kudos

I was asked from PI team to create a Proxy from my function module, so that they can call it.

So I have to do just nothing, except setting my f. module RFC enabled, and they should read the f. module interface from PI?

former_member184681
Active Contributor
0 Kudos

Hi Wojciech,

There are multiple possibilities to call a function module in ECC from PI:

1. The simplest one is to set "RFC-Enabled" in the attributes as you said. Then PI team can call it via RFC. But since they said "proxy", I don't think this is what they meant.

2. Anothet option is what you described in your initial post, which is generating a web service (and wsdl file) out of your function module or function group. Based on that file, PI team can generate related structures in PI and call your FM over SOAP (HTTP/HTTPS) protocol. However, it is normal that you don't see such FM in SPROXY. Also monitoring possiblities are limited in such case.

3. The best option is to generate a proxy class in SPROXY transaction. Then you will of course see it when you enter SPROXY again. However, there are two things to know in this case:

- PI team has to create a Service Interface for you first, that you then use to generate the proxy class

- you need to implement the generated proxy class and use the structures defined in PI, and transform it to the structures required by your FM

I hope this clarifies

Regards,

Greg

Former Member
0 Kudos

Thank you for the very clear answer.

I have another question in opposite direction. There is already SPROXY created, but I wrote simple ABAP program, to call the Proxy. Then data is moved to PI. Is it possible to create in the same way, without involving PI team?

former_member184681
Active Contributor
0 Kudos

If for the opposite direction scenario the SPROXY was already generated, then it means PI team was involved earlier, too . With "normal" approach I would say: no, proxy scenario is not possible without PI team defining a Service Interface first. #2 from my previous post can only be done.

Regards,

Greg

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Grzegorz, for this helpful input

I'm using your 3rd and best approach. Now from the PI side, i do see the Service Interface in Sproxy.
We had intially created an Function Module in SE38 but now The abaper has created the Proxy,  what needs to be done next?

can you elaborate more when you say "you need to implement the generated proxy class and use the structures defined in PI, and transform it to the structures required by your FM"

Thanks in advance

former_member184681
Active Contributor
0 Kudos

Hi,

What I meant is that most probably your proxy implementing class (the one generated by SPROXY) has a different structure than your function module. So what you need to do is transform the input to the structures required by your FM, then execute it, and the scenario should be up and ready.

Regards,

Greg