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

SAP enterprise services - Proxy classes

Former Member
0 Likes
604

Here is my scenario :

1. We have an RDS (Rapid Deployment Solution) deployed and there are enterprise services that came with that.

2. There are proxy classes generated, which can be found in SPROXY

My question is -

If I can use these proxy classes elsewhere in the ABAP programs? Though I know the answer is Yes, I would like to understand the procedure from the ABAP code perspective.

Also, I understand that the values of the fields have to be passed into the proxy input structure, which is a little pain.

In the other words, when the request comes from PI the inbound proxy classes and the methods are invoked, I am trying to do the same thing in an ABAP program.

Thanks,

-Naveen.

2 REPLIES 2
Read only

Former Member
0 Likes
559

Hi Naveen,

You should write your own logic In method of that generated proxy class, do not need another ABAP program.

regards,

Archer

Read only

SharathYaralkattimath
Contributor
0 Likes
559

Hi Naveen,

I too have the same requirement, the inbound proxy method is called from PI which is triggered by outbound method from another system.

You could instantiate the inbound proxy class the same way as we do for normal classes.

Then you could call the proxy method by passing the input structure & you will get the desired results in the output structure.

DATA:

       l_INPUT   Type  input_structure_type,

       l_OUTPUT  Type  output_structure_type,

       LO_proxy TYPE REF TO proxy_class.          "Auto generated inbound proxy class


CREATE OBJECT lo_lers.

* Fill the input structure

TRY.

     lo_proxy->proxy_class~method_sync_inbound(

       EXPORTING

         input  = l_input

       IMPORTING

         output = l_output).

ENDTRY.

Thanks,

Sharath