Synchronous Scenario by triggering ABAP Client proxies from ABAP Server proxies in PI/XI

...Previous

Message Mapping for Request:

MM_CReq

Message Mapping for Response:

MM_CRes

Interface mapping for Request message Interface (For Server Proxies)  

Interface mapping for Response message Interface (For Client Proxies)  

Activate all the Objects in IR.  

Now login to the ECC6.0 and Generate the Proxies for both Server and Client proxies. Generated Server Proxy with Proxy-Interface:ZII_MI_IB_CREQ

Generated Client Proxy with Proxy-Class: ZCO_MI_OB_CRES  

Now lets create a class zcl_proxy which consists two method’s REQ and RES  

Go to SE24 to create Classes and Method’s  

Create Parameter’s in method REQ  

Create Parameter’s in method RES

1) Code at Server Proxy:

method ZII_MI_IB_CREQ~EXECUTE_ASYNCHRONOUS.
*** **** INSERT IMPLEMENTATION HERE **** ***
Data:t_req type standard table of ZDT_CUST_REQ_CUST_DET,
     w_req type zdt_cust_req_cust_det,
    T_IN TYPE STANDARD TABLE OF BAPISCDTIN,
    WS_IN TYPE BAPISCDTIN,
    T_OUT TYPE STANDARD TABLE OF BAPISCDETA,
    WS_OUT TYPE BAPISCDETA,
    w_res type zdt_cust_res_cust_det,
    t_res type standard table of zdt_cust_res_cust_det,
    out type ZMT_CUST_RES,
    lo_cacs type ref to zcl_proxy.
DATA:PRXY TYPE REF TO ZCO_MI_OB_CRES.
w_req-name = input-mt_cust_req-cust_det-name.
w_req-from = input-mt_cust_req-cust_det-from.
w_req-street = input-mt_cust_req-cust_det-street.
w_req-post_box = input-mt_cust_req-cust_det-post_box.
w_req-post_code = input-mt_cust_req-cust_det-post_code.
w_req-city = input-mt_cust_req-cust_det-city.
w_req-country = input-mt_cust_req-cust_det-country.
w_req-region = input-mt_cust_req-cust_det-region.
w_req-telephone = input-mt_cust_req-cust_det-telephone.
WS_IN-NAME = W_REQ-NAME.
WS_IN-FORM = W_REQ-FROM.
WS_IN-STREET = W_REQ-STREET.
WS_IN-POSTBOX = W_REQ-POST_BOX.
WS_IN-POSTCODE = W_REQ-POST_CODE.
WS_IN-CITY = W_REQ-CITY.
WS_IN-COUNTRY = W_REQ-COUNTRY.
WS_IN-REGION = W_REQ-REGION.
WS_IN-TELEPHONE = W_REQ-TELEPHONE.
********Calling Method REQ to pass the request message***********
TRY.
      CREATE OBJECT lo_cacs.
      CALL METHOD lo_cacs->REQ( EXPORTING
      LV_NAME = WS_IN-NAME
      LV_FORM = WS_IN-FORM
      LV_STREET = WS_IN-STREET
      LV_POSTBOX = WS_IN-POSTBOX
      LV_POSTCODE = WS_IN-POSTCODE
      LV_CITY = WS_IN-CITY
      LV_COUNTRY = WS_IN-COUNTRY
      LV_REGION = WS_IN-REGION
      LV_TELEPHONE = WS_IN-TELEPHONE ).
      ENDTRY.
endmethod.

Click here to continue...

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image