Start of Content Area

Procedure documentation 11: Processing a Condition (Switch)  Locate the document in its SAP Library structure

Use

If all the bookings were successful, the booking confirmations for all the individual flights are bundled into a confirmation for the whole flight trip, which is then sent to the travel agency.

If one or more flights in the flight trip could not be booked, a corresponding notification is to be sent to the travel agency. The flights that were successfully booked must also be cancelled.

To be able to define different processing steps depending on whether the booking was successful or not, define a switch with two branches.

      Branch 1 is executed if the booking is successful

In this case, the number of bookings sent for the individual flights is identical to the number of booking confirmations received.

To determine whether this is the case, compare the MsgCount and ConfCount counters in a condition.

      In all other cases the Otherwise branch is executed

In the next lesson you insert the relevant steps into these two branches.

Procedure

...

       1.      Insert a switch (This graphic is explained in the accompanying text) after the SendParallel block.

       2.      Enter AllConfirmationsReceived as the step name.

       3.      Enter SuccessAllFlightsBooked as the outcome name for Branch 1.

Define a Condition

       4.      Double-click the Condition field.

The condition editor is displayed.

       5.      Insert the MsgCount container element as the first operand in the condition.

       6.      Enter = (equals sign) as the operator.

       7.      Enter the ConfCount container element as the second operand.

       8.      Choose Apply.

(MsgCount = ConfCount) is displayed in the switch properties area.

You do not need to define a condition for the Otherwise branch because it will be executed automatically if the condition for Branch 1 is not satisfied.

More information:

Switch

Defining Conditions

 

 

End of Content Area