The main bottleneck of ABAP Proxies is the amount of custom coding that is required. Though we cannot get away with it I will try to organize the coding in a better fashion over here.
Though out of context here, I would like to put few of thoughts on most of the questions raised in forum posts while choosing ABAP proxies:
Lot of debating happens when the XI developers need to choose between RFC adapters or Idoc adapters or Proxies. I will try to propose a solution out of my little experience and I leave the decision to the readers what has to be chosen in their projects.
It is very clear that proxies comes into context only when WAS >= 6.2.But we can still use Idoc adapter or RFC adapter for communicating with SAP systems having WAS >=6.2!! That calls for a problem, as there are too many options. What is the best option out of it?
1.Use Idoc adapter if standard idoc is available to meet the business requirements.
2.Use RFC adapter if the data volume is less and there are standard BAPIs available to achieve the functionality otherwise we face critical performance bottlenecks.
3.Best option is to use a proxy while handling large volumes and developing a custom business processes.
Coding Proxies in a better way:
ABAP Proxies in XI(Client Proxy) has to be read before understanding this as the idea presented here is an enhancement to the blog and same proxy object is used for demonstrating in a more understandable fashion.
The disadvantage of proxy is that it involves lot of custom coding and we need to educate the ABAPers to code the proxies. We can see that SAP NW is going towards Object Orientation but still we code traditional reports for executing every proxy.
Do I need to write 80 reports for executing 80 proxies and do I need to schedule 80 reports incase of client proxies? Can we design proxies in a smarter way? Yes. Check this sample code, which will take the proxy name and generates the proxy code automatically that triggers the client proxy.
Generic Template for triggering a client Proxy:
This report can be used to trigger any client proxy .All we need to do is to just feed the proxy name.In SE24, We have to write proxy/interface specific code for the object. Here we abstracted the triggering of proxies from application logic.
Create the report YPROXIES in se38 editor with the source code provided above. Fill the text elements as shown in the below figure.
Fill in the proxy class name details as shown below and press F8, which will trigger the proxy:
Application proxy logic is written in the proxy itself as depicted below: