Skip to Content
Author's profile photo Zhang Chao

SAP PI ABAP Proxy to JDBC Synchronous Interface Part II

This part I will show that how to configure PI ESR and generate ABAP proxy consumer in ABAP system.

2. Configure ESR

2.1 Create Data Type

Request data type in ERP side:

/wp-content/uploads/2015/09/27_782035.png

Response data type in ERP side:

  /wp-content/uploads/2015/09/28_782051.png

Request data type in 3rd Party

  /wp-content/uploads/2015/09/29_782052.png

The JDBC XML format can be found in SAP help in the 5 part Reference

In this scenario I want to use JDBC Adapter to execute a store procedure, so should use the XLM format as below:

Format of EXECUTE Statement


<StatementName>
     <storedProcedureName action=" EXECUTE">
          <table>realStoredProcedureeName</table>
          <param1 [isInput="true"][isOutput=true]type=SQLDatatype>val1</param1>
     </storedProcedureName >
</StatementName>

PS: <table> element is optional, I leave out in the data type.

Element name ”SP_GET_SUPERIOR_APPROVER” is the store procedure name.

Reponse data type in the 3rd party side:

  /wp-content/uploads/2015/09/30_782053.png

PS: The element name “Procedure_response” is required according to element name “Procedure” in request data type;

I don’t find the explain for “reponse_1” and “row” in SAP help, but they could be found in PI message monitor.

2.2 Create Message Type

Request message type in ERP side:

  /wp-content/uploads/2015/09/31_782054.png

Reponse message type in ERP side:

  /wp-content/uploads/2015/09/32_782055.png

Request message type in 3rd party side:

  /wp-content/uploads/2015/09/33_782056.png

Response message type in 3rd party side:

  /wp-content/uploads/2015/09/34_782058.png

PS: The response message type name must be “<reqmt>_response”, <reqmt> is the request message type name.

2.3 Create Service Interface

Service interface in ERP side:

  /wp-content/uploads/2015/09/35_782059.png

Outbound and Synchronous.

Service interface in 3rd party side:

  /wp-content/uploads/2015/09/36_782060.png

2.4 Create Message Mapping

Request message mapping:

  /wp-content/uploads/2015/09/37_782061.png

From ERP request message type to 3rd request message type

  /wp-content/uploads/2015/09/38_782062.png

The value for action should be “EXECUTE” for store procedure.

  /wp-content/uploads/2015/09/39_782063.png

Response message mapping:

  /wp-content/uploads/2015/09/40_782064.png

2.5 Create Operation Mapping

  /wp-content/uploads/2015/09/41_782065.png

/wp-content/uploads/2015/09/42_782067.png

3. Generate ABAP Proxy Consumer

3.1 Configure RFC destination to ESR

Tcode: SM59

The RFC destination name must be: “SAP_PROXY_ESR”

  /wp-content/uploads/2015/09/43_782066.png

Input the PI server host and port in “Target Host” and “Service No.”, the “Path Prefix” must be “/rep”.

  /wp-content/uploads/2015/09/44_782068.png

3.2 Generate Consumer

Tcode: SPROXY

  /wp-content/uploads/2015/09/45_782069.png

Double click the Service Consumers(Service Interface in PI) “SI_A2J”

  /wp-content/uploads/2015/09/46_782070.png

/wp-content/uploads/2015/09/47_782071.png

  Activate!

The links of other parts:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2015/09/02/sap-pi-abap-proxy-to-jdbc-synchronous-interface-part-i

http://scn.sap.com/community/pi-and-soa-middleware/blog/2015/09/02/sap-pi-abap-proxy-to-jdbc-synchronous-interface-part-iii

http://scn.sap.com/community/pi-and-soa-middleware/blog/2015/09/02/sap-pi-abap-proxy-to-jdbc-synchronous-interface-part-iv

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      HI Zhang

      While creating response message type in third party side do we have to create another node "response1" in structure?

      Is it mandatory?

      Midhun

      Author's profile photo Zhang Chao
      Zhang Chao
      Blog Post Author

      Hi Midhun

      I just got the structure of response message in PI monitor after make a test, I didn't find the explain of this part in the SAP help.

      Author's profile photo Former Member
      Former Member

      Hi Zhang,

      Does the JDBC Structure change, if we want to retrieve the data from Views.?

      Thanks and Regards,

      Prasad.

      Author's profile photo Javier VIllarreal
      Javier VIllarreal

      Hello, did you get this to work?  i also got the structure from a PI monitor with <response_1> tag in it, but even though i am using the exact same structure as in PI monitor, i am not able to make it work.

      Did it work for you?  also,  in your structure, you have <response_1> as sub-element for <Procedure_response> and i have it at the same level.  Should i be a sub-element?

       

      thank you so much, i've been trying like a hundred combinations to no avail.

      Javier