Skip to end of metadata
Go to start of metadata

Steps in the Integration Repository:
 
 1.  Create the source data type having the following structure :        

 Structure                Category                  Type          Occurence

        DT_EMP_SRC       Complex Type             

               DEPT_ID         Element                   xsd:string         1

2.  Create the target data type         Structure                Category                  Type          Occurence
        DT_EMP_TAR                      Complex Type             

                EMPLOYEE                   Element                                                                                1...unbounded             

                    DEPT_ID                  Element                                                          xsd:string        1

                    EMP_ID                    Element                                                          xsd:string        1

                    EMP_NAME              Element                                                          xsd:string        1

                    EMP_ADDRESS        Element                                                          xsd:string       1


 

3. Create the source message type MT_EMP_SRC

4. Create the target message type MT_EMP_TAR

5. Create the outbound message interface MI_EMP_OUT_SYC . Category : Outbound and Mode : Synchronous

    Output Message is MT_EMP_SRC and Input Message is MT_EMP_TAR.

6. Create the inbound message interface.MI_EMP_IN_SYC.  Category : Inbound and Mode : Synchronous    Input Message is MT_EMP_SRC and Output Message is MT_EMP_TAR.

7. Create the mapping object for request MM_PROXY2PROXY_REQUEST . Both the Message types selected should be MT_EMP_SRC.

    One to one mapping should be done for DEPT_ID.

8. Create the mapping object for request MM_PROXY2PROXY_RESPONSE . Both the Message types selected should be MT_EMP_TAR.

    One to one mapping should be done between EMPLOYEE, DEPT_ID, EMP_ID , EMP_NAME , EMP_ADDRESS.

9. Create the Interface Mapping (Includes both the request and response message mapping).

    IM_PROXY2PROXY_REQUEST_RESPONSE.

Steps to be performed in the Integration Directory
1. Create a receiver communication channel CC_Proxy_Receiver.    Adapter Type is XI, Transport Protocol is HTTP 1.0, Message Protocol is XI 3.0, Adapter Engine is Integration server.

   Addressing Type is HTTP Destination and HTTP Destination is a Type 'H' connection created in PI server .

2. Create a receiver agreement . Here both the business systems should be R/3 . Receiver interface should be MI_EMP_IN_SYC

3. Create and Interface Determination. Sender Interface should be MI_EMP_OUT_SYC.

4. Create a receiver determination.

Steps in the R/3 system (for eg. E6S) by entering the TCODE SPROXY 

1. Create a server proxy (for eg. the name would be like ZII_MI_EMP_IN_SYNC.

2. Implement the interface in the class(By double clicking on the ABAP Name field under Implementing Class section) by writing the code.

  method zii_mi_emp_in_sync_yh1305~execute_synchronous.
** ** INSERT IMPLEMENTATION HERE ** **
data: dept_id type string.
  dept_id = 'Any Value from parameter field'.

    select emp_id dept_id emp_name emp_address
    from zemp_dtls_mstr
    into corresponding fields of
    table output-mt_emp_tar-employee
    where dept_id = dept_id.

3. Create a client proxy (for eg. the name would be like ZCO_MI_EMP_OUT_SYNC).

4. Create a report program for the client proxy.

report  yh_proxyclient.
*  tables: ZEMP_DTLS_COPY.

   datainput type zmt_emp_tar1 .
   dataoutput type zmt_emp_src1 .
   dataclient type ref to zco_mi_emp_out_sync .

  output-mt_emp_src-dept_id = 'SAP EP'.
  data wa_emp type zdt_emp_tar_employee.

  data wa_empinsert type zemp_dtls_copy. "ZDT_EMP_TAR_EMPLOYEE.

try.
    create object client
*  EXPORTING
*    logical_port_name  =
        .
  catch cx_ai_system_fault .
endtry.

try.
call method client->execute_synchronous
  exporting
    output = output
  importing
    input  = input
    .
 catch cx_ai_system_fault .
 catch cx_ai_application_fault .
endtry.
loop at input-mt_emp_tar-employee into wa_emp.
  write: / wa_emp-emp_id, wa_emp-dept_id, wa_emp-emp_name, wa_emp-emp_address.

endloop.
  commit work.

 endmethod.  When you execute the above report program, a report list would be created with the entries displayed from the table created in the SE11.

Thanks and Regards




  • No labels