Entering content frame

Procedure documentation Step 5: Implementing the Flow Logic Locate the document in its SAP Library structure

Use

To implement the dialog logic for each template, use the language elements of the flow logic. When this flow logic is implemented, the system calls the BAPI and automatically passes the data from the BAPI to the HTML template and back. The flow logic also defines how the template is filled with data.

Prerequisites

§         You have already created the two HTML templates.

§         You are familiar with the basic principles of the flow logic.

Procedure

1.       In the object list tree structure, double-click the initial template (INITIAL).

2.       Choose Edit ® Create flow logic.

3.       For the first template (INITIAL), enter the following flow logic:

<flow>

    <event name = "Flights"   next_template="results">

    </event>

</flow>

 

 

Repeat steps 1-3 for the second template (RESULTS), entering the following flow logic:

<flow>

  <state name="GetList">

    <module name="BAPI_SFLIGHT_GETLIST"  type="RFC">

       <inputmapping source="FromCountry" target="FROMCOUNTRYKEY" />

       <inputmapping source="FromCity" target="FROMCITY" />

       <inputmapping source="ToCountry" target="TOCOUNTRYKEY" />

       <inputmapping source="ToCity" target="TOCITY" />

    </module>

  </state>

  <event name = "onLoad"  next_state = "GetList">

  </event>

</flow>

 

Note

You can also use the type BAPI instead of the type RFC when calling the module. In this case, you must enter FlightConnection.GetList as the module name.

Result

You have fully implemented the dialog logic for both HTML templates and can publish the whole service on the ITS.

In the next lesson:

Step 6: Publishing a Service

 

 

 

Leaving content frame