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

Inbound ABAP Proxy class-Custom methods

Former Member
0 Likes
1,354

Hi Experts,

Is it a good practice to add custom methods to an auto generated inbound proxy class ?  Will the re-generation of proxy will cause any issues in these custom methods ?

Thanks

Sanu Sugathan

1 ACCEPTED SOLUTION
Read only

Katan
Active Participant
0 Likes
860

Hi Sanu,

In any kind of programming the use of methods to separate out your code logically and promote re-use is always a good thing.  It's a good thing and defintely something I have done before.

If it makes more sense that these methods belong to a global object and could be re-used then make a global class and refer to the logic from your proxy.

Re-generating the code has no impact to the code of any of the methods.  By this I mean that the code itself is never changed or deleted.  It only affects the interface (importing params for an inbound proxy).  So removing a field from an interface will affect any code that directly makes reference to it in the proxy class. 

You should probably try it and see.  It's a simple to test and will give you more confidence in making changes.

Cheers,

Katan

1 REPLY 1
Read only

Katan
Active Participant
0 Likes
861

Hi Sanu,

In any kind of programming the use of methods to separate out your code logically and promote re-use is always a good thing.  It's a good thing and defintely something I have done before.

If it makes more sense that these methods belong to a global object and could be re-used then make a global class and refer to the logic from your proxy.

Re-generating the code has no impact to the code of any of the methods.  By this I mean that the code itself is never changed or deleted.  It only affects the interface (importing params for an inbound proxy).  So removing a field from an interface will affect any code that directly makes reference to it in the proxy class. 

You should probably try it and see.  It's a simple to test and will give you more confidence in making changes.

Cheers,

Katan