Aug 5, 2015

ABAP Proxy (Complete Developments on SAP-PI & SAP-ABAP Systems)

ABAP PROXY :  Developments  on  Application System & Integration System
USE of This Blog :  
Sometimes, we are facing problem when developing ABAP proxies.
As SAP-PI consultant who does not know ABAP, can’t work on ABAP Coding and Proxy Generation part. An ABAP Consultant who does not know SAP-PI, can’t work on SAP-PI design part.
At that time understanding of both side developments is required, this Blog explaining Development work on SAP-PI System (Integration System) & SAP-ECC System (Application System).
This blog will be helpful for Consultant who knows only SAP-PI OR SAP-ABAP. Consultant can identify the scope of work on SAP-PI OR SAP-ABAP part with the help of this blog.

INTRODUCTION :  ABAP proxies are used when ABAP applications needs to send and receive data.
image

Communication :  Transport Protocol : HTTP
RFC Destinations    :  Type H (HTTP Connections to ABAP System)
image

Development on SAP-PI
Enterprises Service Repository :
 Create Data Type
image
 Create Message Type
image
Create Service Interface
image

Development on SAP-ECC
In proxies, it will generate 3 objects at Application System :
ABAP Class.
Structure for Message Type.
Structure of Data Type.
 Inbound Proxy:
image

T-code : SPROXY
Open the node for your Service (Inbound / Outbound) & Right click
Click on CREATE PROXY.
This Development is for Inbound Proxy.
image

image

Give Package Name & Prifix : Click on Continue .
image

After Completing this creation process, this screen will be there.
image

SAVE & Activate. Double click on Provider Class, this screen will be there :
image

Double click on Method.
This screen will be there, you have to write your code here in this method.
image

Header Structure and Item Structures will be in INPUT Parameter :
image

image

Write code as below :
image

(Inbound Proxy)
Post the data in Table
Post the data using Function Module
Inbound Proxy is Complete.

Outbound Proxy:
image

T-code : SPROXY
Open the node for your Service (Inbound / Outbound) & Right click
Click on CREATE PROXY.
This Development is for Outbound Proxy.
In this Case, choose Outbound Service Interface for Creation of Proxy.

After Completing this creation process, this screen will be there.
image


For Outbound Proxy, an executable code in ABAP will be written to call that proxy.
In this Example, we are writing that code in Executable program in SE38.
First Pick data from Table.
Fill Proxy Structure & send to Integration System.

For this example, Data Declaration part will be as below :
image

For this example, code for filling & Sending Proxy data Subroutine will be as below :
image
Now, Inbound & Outbound Proxy Development is complete. 

Ref: http://scn.sap.com/people/sandeep.kaushik/blog/2010/07/15/abap-proxy-complete-developments-on-sap-pi-sap-abap-systems

Aug 4, 2015

Methods to find Customer/User Exit's & BADi's for a Transaction Code

By: Narayana N

Dear Friends,

This blog is going to explain you many ways to find the User Exit's & BADi's for desired transaction code. Since the objective of the document is to explain the search method I'm not going to take much time in explaining the functionality of the said features.

In order to explain you in the simple manor I've taken 'MM01 - Creation of Material Master' transaction code as an example. Please follow the below steps to know the different ways of finding user exits and BADi's.

Method 1:
    • Enter the transaction code in the command bar, for which you would like to search for an user exit and then click on enter, so that it would take you to the initial screen of the transaction.
    • Go to Menu bar - Click on 'System' and then click on 'Status' as shown in the below screen shot.
        

    • Once you click on the 'Status' below screen would get popped up. Here, double click on the program name.
        


    • Once the program window is open, go to Menu Bar --> click on 'Goto' and then click on 'Object Directory Entry'.
    • The above step would take you to a pop up window and here copy the Package Name as shown in the below screen shot.
          


    • Once you get the package number execute the transaction code SE80 (We can also try with SE84) and then click on 'Repository Information System'.
    • As soon as you done with the above step the system would display the respectiveObjects list, here drill down Enhancements and then Customer Exists.
    • Now, double click on Enhancements, which is under Customer Exists, so that the selections screen would get displayed in right side.
    • Here go to package field and paste the copied package number from the previous step (program) and then execute the transaction as shown in the below screen shot.
        

    • As soon as you execute the above step, it would display the list of user exits for the relevant transaction / package number.
         


In order to find out the relevant BADi for a transaction code, follow the above steps but instead of expanding Customer exits, expand Business Add-ins as shown below.
    • Drill down Business Add-ins and then double click on Definitions, so that the selection window would get open in the right side of the screen. Here enter the copied package number in the Package field and then execute the transaction as show below.


    • As soon as you execute the above step, it would display the list of BADi's for the relevant transaction / package number.




Method 2:

    • Execute the transaction code SE93 --> enter the desired transaction code in Transaction Code field and then click on Display button as shown in the below screen shot.


    • Once you click on Display button it would show the below screen, double click on the program name.


    • Once the above step is done, go to Menu Bar--> click on 'Goto' and then click on 'Object Directory Entry'.
    • As soon as you done with the above step, the system would pop up with a window as shown below, copy the Package name for the further process.


    • Once you get the package number execute the transaction code SMOD --> place cursor on Enhancement field and then press F4.
    • It would take you to the below screen (Repository Info Systems). Enter the package number, which has copied from the previous step. And then click on enter button.


    • As soon as you execute the above step, it would display the list of user exits for the relevant transaction / package number.



Method 3:
Along with above methods I would like to show the ways to find the Exist / BADi's at configuration / SPRO as well.
Example: If you would like to know the relevant user exits at the functionality level like, ‘Logistics Invoice Verification’, follow the below steps.

    • Execute the transaction code SPRO and click on SAP Reference IMG --> drill down Materials Management --> Logistics Invoice Verification --> Maintain Customer Exits and Business Add-Ins --> click on IMG Activity Document on Maintain Customer Exits for Invoice Verification, so that it would show the list of Customer / User Exits for the functionality.





In order to find out the relevant BADi at the functionality level, follow the above steps but instead of clicking on click on IMG Activity Document for Maintain Customer Exits for Invoice Verification, click on IMG Activity Document for Maintain Business Add-Ins for Invoice Verification, so that it would display the , so that it would show the list of BADi's for the functionality.





Method 4:
If you find difficulty in finding the exact node, follow the below steps

    • Execute the transaction code SPRO and click on SAP Reference IMG--> click on Find button or press Ctrl+F.
    • Once you click on find button the below pop up window gets displayed --> enterCustomer Exits in the Search Term field and then press enter button.


    • Once you hit enter, the system would provide you the list of results for the search term, which you have entered. You should be very patience in finding the right node as the list would be very big. You can take the 'In Area' reference as that would provide the information about the functionality of the node. Refer the below screen shot for your info.


    • As soon as you find the right node, double click on it and it would take you to the configuration node, for which it belongs to.


  • Now you can click on IMG Activity Document for Maintain Customer Exits for Invoice Verification to display the relevant Exits.

Note: 1. Since I've already displayed the screen shot for the above step, not displaying the same for the 2nd time.
   2. Follow the same steps to get relevant BADi's.

Hope the document might find you useful. Thanks for reading the document and I would welcome your comments for improving the document quality.


Thanks & Regards,

Narayana N

Reff: http://scn.sap.com/docs/DOC-54384