Skip to Content
Author's profile photo Zhang Chao

SAP PI ABAP Proxy to JDBC Synchronous Interface Part IV

At the last part I will show that how to test this interface.

6. Test

We can test the abap proxy consumer in “SPROXY”





Or write some abap code to test the ABAP proxy consumer:

  data: lo_proxy type ref to zco_si_a2j.

 data: ls_outut type zmt_a2j_req,
 ls_input type zmt_a2j_res.

 data: wa_results type zdt_a2j_res_results.

 constants l_times type i value 10.

 create object lo_proxy.

 parameters p_empc type string DEFAULT '0010009151'.

      ls_outut-mt_a2j_req-emp_code = p_empc.

      call method lo_proxy->si_a2j
           output = ls_outut
           input  = ls_input.

      commit work.

      write: / 'Success!'.
      loop at ls_input-mt_a2j_res-results into wa_results.
           write: / 'structurecode:', wa_results-scode.
           write: / 'empcode:', wa_results-empcode.
           write: / 'c_name:', wa_results-name.
           write: / 'parentid:', wa_results-pid.
           write: / 'superempcode:', wa_results-superempc.
           write: / 'defaultposition:', wa_results-defposit.
           write: / 'approve:', wa_results-approve.
      catch cx_ai_system_fault .
      data fault type ref to cx_ai_system_fault.
      create object fault.
      write :/ fault->errortext.

7. Reference

JDBC Receiver scenarios best practices – Stored procedure design-Part4–stored-procedure-design-part4

JDBC Stored Procedures

Defining XML Documents for Message Protocol XML SQL Format

Defining an EXECUTE Statement

JDBC Receiver Adapter — Synchronous Select – Step by Step–synchronous-select-step-by-step

JDBC receiver adapter – stored procedure response

Please contact me if there are some mistake in the documents or doubt.

Sorry for my poor Englist. 😉

The links of other parts:

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.