Hello Folks

I have written part I of this blog series for synchronous server proxy which sends Purchase Order data from a SOAP webservice call to ABAP in HANA system using Process Orchestration version 7.5 as a middleware.

The following objects were created in order:

1 In Process Orchestration ESR

1.1 Data Type : DT_PO_In ( from the sender system)

1.2 Data Type : DT_PO_Out (into the target system )

1.3 Message Type : MT_PO_In ( from source system )

 

1.4 Message Type : MT_PO_Out (into target system)

1.5 Service Interface : SI_PO_Out ( from source system)

1.6 Service Interface SI_PO_In ( into the target system)

1.7 Message Mapping – Request MM_PO_In : (from source to target )

1.8 Message Mapping – response MM_PO_Out (from target to source)

1.9 Operation Mapping

 

 

2: Integration Directory Objects

2.1 : Business Component – Source Sender System

2.2 Business System : receiver Target S/4 HANA System

2.3 SOAP Sender Channel

2.4 : Proxy receiver channel

2.5 ICO

 

3: ABAP S/4 HANA System

3.1 SPROXY – Proxy Objects creation and activation

3.2 ABAP Source Code

METHOD ZII_SI_PO_IN~SI_PO_IN. "=================== DATA DECLARATIONS : INTERNAL TABLE ==============================       DATA: IT_ITEM TYPE ZDT_PO_IN_PO_ITEM_TAB.       DATA: IT_RETURN TYPE TABLE OF BAPIRET2.       DATA: IT_POITEM     TYPE TABLE OF BAPIMEPOITEM,             IT_POITEMX    TYPE TABLE OF BAPIMEPOITEMX. "=================== DATA DECLARATIONS : WORK AREA  ===================================       DATA: WA_HEADER TYPE ZDT_PO_IN_PO_HEADER.       DATA: WA_HEADERX TYPE ZDT_PO_IN_PO_HEADER.       DATA: WA_ITEM TYPE ZDT_PO_IN_PO_ITEM. "=================== DATA DECLARATIONS : LOCAL VAIRABLES  ==============================       DATA: LS_POHEADER   TYPE BAPIMEPOHEADER,             LS_POHEADERX  TYPE BAPIMEPOHEADERX,             LS_POITEM     TYPE BAPIMEPOITEM,             LS_POITEMX    TYPE BAPIMEPOITEMX.       DATA: LS_PO_NUMBER TYPE BAPIMEPOHEADER-PO_NUMBER. "================================ MOVE HEADER DATA : POHEADER =====================================       LS_POHEADER-COMP_CODE = INPUT-MT_PO_IN-PO_HEADER-COMP_CODE.       LS_POHEADER-DOC_TYPE = INPUT-MT_PO_IN-PO_HEADER-DOC_TYPE.       LS_POHEADER-VENDOR = INPUT-MT_PO_IN-PO_HEADER-VENDOR.       LS_POHEADER-LANGU = INPUT-MT_PO_IN-PO_HEADER-LANGU.       LS_POHEADER-PURCH_ORG = INPUT-MT_PO_IN-PO_HEADER-PURCHASE_ORG.       LS_POHEADER-PUR_GROUP = INPUT-MT_PO_IN-PO_HEADER-PURCHASE_GRP.       LS_POHEADER-CURRENCY = INPUT-MT_PO_IN-PO_HEADER-CURRENCY. "================================ MOVE HEADER DATA : POHEADERX =====================================       LS_POHEADERX-COMP_CODE = INPUT-MT_PO_IN-PO_HEADER-COMP_CODE.       LS_POHEADERX-DOC_TYPE = INPUT-MT_PO_IN-PO_HEADER-DOC_TYPE.       LS_POHEADERX-VENDOR = INPUT-MT_PO_IN-PO_HEADER-VENDOR.       LS_POHEADERX-LANGU = INPUT-MT_PO_IN-PO_HEADER-LANGU.       LS_POHEADERX-PURCH_ORG = INPUT-MT_PO_IN-PO_HEADER-PURCHASE_ORG.       LS_POHEADERX-PUR_GROUP = INPUT-MT_PO_IN-PO_HEADER-PURCHASE_GRP.       LS_POHEADERX-CURRENCY = INPUT-MT_PO_IN-PO_HEADER-CURRENCY. "================================ MOVE ITEM DATA : POITEM =====================================       LOOP AT INPUT-MT_PO_IN-PO_ITEM INTO WA_ITEM.         LS_POITEM-PO_ITEM = WA_ITEM-ITEM_NUMBER.         LS_POITEM-MATERIAL = WA_ITEM-MATERIAL.         LS_POITEM-PLANT = WA_ITEM-PLANT.         LS_POITEM-QUANTITY = WA_ITEM-QUANTITY.         APPEND LS_POITEM TO IT_POITEM.         ENDLOOP. "================================ MOVE ITEM DATA : POITEMX =====================================       LOOP AT INPUT-MT_PO_IN-PO_ITEM INTO WA_ITEM.         LS_POITEMX-PO_ITEM = WA_ITEM-ITEM_NUMBER.         LS_POITEMX-MATERIAL = WA_ITEM-MATERIAL.         LS_POITEMX-PLANT = WA_ITEM-PLANT.         LS_POITEMX-QUANTITY = WA_ITEM-QUANTITY.         APPEND LS_POITEMX TO IT_POITEMX.         ENDLOOP. "================================ CALL BAPI  =====================================  CALL FUNCTION 'BAPI_PO_CREATE1'   EXPORTING     POHEADER                     = LS_POHEADER     POHEADERX                    = LS_POHEADERX *   POADDRVENDOR                 = *   TESTRUN                      = *   MEMORY_UNCOMPLETE            = *   MEMORY_COMPLETE              = *   POEXPIMPHEADER               = *   POEXPIMPHEADERX              = *   VERSIONS                     = *   NO_MESSAGING                 = *   NO_MESSAGE_REQ               = *   NO_AUTHORITY                 = *   NO_PRICE_FROM_PO             = *   PARK_COMPLETE                = *   PARK_UNCOMPLETE              =  IMPORTING     EXPPURCHASEORDER             = LS_PO_NUMBER *   EXPHEADER                    = *   EXPPOEXPIMPHEADER            =  TABLES    RETURN                       = IT_RETURN    POITEM                       = IT_POITEM    POITEMX                      = IT_POITEMX *   POADDRDELIVERY               = *   POSCHEDULE                   = *   POSCHEDULEX                  = *   POACCOUNT                    = *   POACCOUNTPROFITSEGMENT       = *   POACCOUNTX                   = *   POCONDHEADER                 = *   POCONDHEADERX                = *   POCOND                       = *   POCONDX                      = *   POLIMITS                     = *   POCONTRACTLIMITS             = *   POSERVICES                   = *   POSRVACCESSVALUES            = *   POSERVICESTEXT               = *   EXTENSIONIN                  = *   EXTENSIONOUT                 = *   POEXPIMPITEM                 = *   POEXPIMPITEMX                = *   POTEXTHEADER                 = *   POTEXTITEM                   = *   ALLVERSIONS                  = *   POPARTNER                    = *   POCOMPONENTS                 = *   POCOMPONENTSX                = *   POSHIPPING                   = *   POSHIPPINGX                  = *   POSHIPPINGEXP                = *   SERIALNUMBER                 = *   SERIALNUMBERX                = *   INVPLANHEADER                = *   INVPLANHEADERX               = *   INVPLANITEM                  = *   INVPLANITEMX                 = *   NFMETALLITMS                 =           . * COMMIT CHANGES TO DB CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  EXPORTING    WAIT          = 'X' * IMPORTING *   RETURN        =           . OUTPUT-MT_PO_OUT-PO_OUT_HEADER-PO_NUMBER = LS_PO_NUMBER. COMMIT WORK.   ENDMETHOD.

 

 

 

 

 

3.3 Sample Test Data and SPROXY testing

 

Initiate Testing

 

 

Response Result : Purchase Order created in Target system

 

 

4 : Test using External Application : SOAPUI

4.1 Create a new SOAP request

 

4.2 Use the Input test data to execute end to end and receive the PO Number from the S/4 HANA System

 

 

**** End of Part I Of Blog for Proxies ****

 

Thanks

Pratibha.

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !