SAP XI 3.0 EX2 - PurchaseOrder - Preparations

Embed Size (px)

Citation preview

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    1/8

    Exercise 2: Preparations

    In this exercise the itemlist is transformed to a list, which is send synchronously to thebusiness systemAirline_Group_One. The response message contains the materials which mustbe created in the next exercise. This exercise also demonstrates exception handling forapplication and system errors. In case of an application exception, an alert is thrown, which canthen be reviewed in the alert inbox.

    1. To collapse the ReceiveOrderItemBlockblock you created in the first exercise, chooseCollapse from the context menu:

    2. Define a new block Preparation with two exceptions SystemErrorandApplicationError:

    3. Create a new container element list:

    4. Insert a transformation step PrepTransformation using the interface mapping itemlist2list.The source message is itemlist, the target message is list:

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    2/8

    5. Create a new container elementpreplist, which contains the result of the preparation call:

    6. Insert a send step SendPreparation:

    Set the mode of the send step to Synchronous. The send step uses the synchronousInterfaceprep_sync_abstract. The request message is listand the response message is

    preplist. For the Exception System ErrorenterSystemError, for the exceptionApplicationFaultenterApplicationError.

    7. Add two exception branches for the exception handlers SystemErrorandApplicationErrorby calling the context menu.

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    3/8

    8. Add a control step PrepControlAppException into the exception handler for the exceptionApplicationError:

    Select the Throw Alertaction and the PROCESS ALERTalert category. Enter anappropriate alert message (e.g. Preparation Checks group XY failed).

    9. In the exception handler branch for the SystemErrorexception, insert a control stepPrepControlSysErrorto cancel the process.

    10. Save and activate your process.

    11. Send three line items to your process using the Web Dynpro user interface and checkyour process instance by calling transaction SXMB_MONI_BPE. The workflow log shouldlook as follows:

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    4/8

    12. Send three line items to your process. Make sure that you send spare part number9999, which causes an application error, at least once:

    The process catches the application error and triggers the alert defined in the process:

    You can check whether the application error has been thrown by the receiver ABAP

    proxy by calling transaction SXMB_MONI:

    If your user is registered for the Alert Category PROCESS ALERTand your user in client800 has an email address assigned to it, you can review the alert in the alert inbox:

    http://:/sap/bc/bsp/sap/ALERTINBOX/index.htm

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    5/8

    13. The instructor will cut the connection between the Integration Server and the businesssystemAirline_Group_One by manipulating the corresponding SM59 RFC destination:

    If you now run your process, the system error exception is triggered and the control stepin the corresponding exception branch cancels the process. Check this in the Workflowlog:

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    6/8

    You can check whether a system error was thrown by calling transaction SXMBI_MONI:

    Make sure, that the RFC-Destination is working again before you proceed.

    14. Run the process with the spare part numbers 2000, 3000, and 4000. Since the materials1000, 2000, 3000 are always marked as missing in the system, the preparation check willreturn a message with the spare part numbers 2000 and 3000.

    To check this, call transaction SXMB_MONI and select any messages where the senderservice is your process:

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    7/8

    In this request message you should see all spare part items transferred to the preparationcheck:

    If you select the message in transaction SXMB_MONI the receiver service is yourprocess and the receiver interface isprep_sync_abstract- you can check the preparationresponse.

  • 7/30/2019 SAP XI 3.0 EX2 - PurchaseOrder - Preparations

    8/8

    In the response you can see which materials will be created in the next exercise: