
Step 5: Implementing the Flow Logic
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 transfers the data from the BAPI to the HTML template and back. The flow logic also specifies how the templates are to be filled with data.
Prerequisites
Procedure
<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> |

You can use the type
Result
You have 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