cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger the abap proxy in custom FM

Former Member
0 Kudos

Hi Experts,

I have a requirement to trigger abap proxy through my custom function module. I need to send the populated structure to SAP PI using ABAP Proxy.

Note - ABAP Proxy details are provided from SAP PI. Function Module logic is to be written inside the ABAP Proxy.

Can you please tel me how I can meet this requirement?

Thanks and regards,

Jasvinder Kumar

Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi Jasvinder,

You can create a structure in PI which suits your requirement and generate the proxy in ECC. This will create a class in ECC. You can populate the structure in your custom function module, and trigger the proxy to PI by calling the object of type class created above and passing the payload.

Hope it helps.

Ambrish

Former Member
0 Kudos

Hi Ambrish,

I have created a structure in PI And also have a class in ECC.

How to populate this structure and trigger the proxy to PI?

Thanks and Regards,

Jasvinder Kumar

Former Member
0 Kudos

Hi Jashvinder,

>> How to populate this structure and trigger the proxy to PI?

After creating structures in PI, you have to generate ABAP proxy using T-code: SPROXY. After generating proxy a class will be generated which will be having the method with same name as the operation in PI. The structure you have created in PI will be there in the parameter of that method. Generally, it'll be  nested with many structures and table types. You need to populate the same in your custom FM.

Hope this helps!

Regards,

Samir

Former Member
0 Kudos

Hi Jasvinder,

When you create the structure and assign it to the service interface, you would be able to see the service in SPROXY tx in ECC system.

Right click on the service interface you would be to generate the proxy, there you need to provide Class and continue to generate the proxy.

You can use that operation/service in your ABAP proxy code to push data to PI.

Thanks,

ambrish_mishra
Active Contributor
0 Kudos

Hi Jasvinder,

Are you creating this FM to trigger ABAP proxy ? is this FM serving any other purpose? Otherwise, You can create a simple ABAP report and call this proxy object from that report and pass the data (in an internal table) to the method of the class.

Hope it helps.

Ambrish

Answers (2)

Answers (2)

0 Kudos

YES, You can meet this requirement. Proxy can be called anywhere in the ABAP program or Function module.

william_eastman
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please ensure that you post your discussion in the right place.  Every question from a utility company does not belong in the utilities space - only those that are directly related to the utilities solution or functionality.  I will move this thread to the appropriate place.

regards,

bill.