<%@page language="abap" %>
<html>
  <head>
    <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
    <title> Ergebnisse </title>
  </head>
  <body class="bspBody1"> <br>
   <form>
<%--
  !!! Achtung !!!
  Im folgenden wurde direkt mit get reference gearbeitet.
  Dies kann und soll vermieden werden. Auf Page start.htm ist beispielhaft
  realisiert, wie das Layout-Coding durch Methodenaufrufe besser gestaltet werden kann.
  Bauen Sie das folgende Layout als bungsaufgabe entsprechend um.
--%>
    <table border=1 >
     <tr>
       <% get reference of wa1-vondatum into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
      <td>
       <input type =text name="wa1-vondatum" readonly value=
        <%= page->to_string( value = wa1-vondatum format = if_bsp_page~co_format_long )%>>
      </td>
       <% get reference of wa1-bisdatum into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-connid into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <td>
       <input type =text name="wa1-bisdatum" readonly value=
        <%= page->to_string( value = wa1-bisdatum format = if_bsp_page~co_format_long )%>>
      </td>
     </tr>

     <tr>
       <% get reference of wa1-cityfrom into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
      <td>
       <input type =text name="wa1-cityfrom" readonly value="<%= wa1-cityfrom%>">
      </td>
       <% get reference of wa1-cityto into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-connid into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <td>
       <input type =text name="wa1-cityto"   readonly value="<%= wa1-cityto%>">
      </td>
     </tr>
    </table>

<% if not mess is initial. %>
  <table>
    <% loop at mess_tab into mess. %>
      <tr> <td> <font color="blue"> Status: </font> </td>
           <td bgcolor="yellow"> <%= mess%>         </td> </tr>
    <% endloop. %>
  </table>
<% endif. %>

     <input type=submit name="onInputProcessing(Zurueck)" value="Zurck">
     <input type=submit name="onInputProcessing(exit)"    value="Beenden">
   </form>
    <table border=1>
     <tr>
       <% get reference of wa2-fldate into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-carrid into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-connid into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-fltime into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-price into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-currency into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
       <% get reference of wa2-seatsfree into dref1.
          info = runtime->ddic_utils->get_field_label( data_object_ref = dref1 ). %>
      <th><%= page->to_string( value = info )%></th>
     </tr>
     <% loop at itab into wa2. %>
      <tr>
       <td> <%= page->to_string( value = wa2-fldate format = if_bsp_page~co_format_long )%></td>
       <td> <%= wa2-carrid%>    </td>
       <td> <%= wa2-connid%>    </td>
       <td> <%= wa2-fltime%>    </td>
       <td> <%= wa2-price%>     </td>
       <td> <%= wa2-currency%>  </td>
       <td> <%= wa2-seatsfree%> </td>
      </tr>
     <% endloop. %>
    </table>
  </body>
</html>