<%@page language="abap" %>
<html>
  <head>
    <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
    <title> Einstiegsbild </title>
  </head>
  <body class="bspBody1">
   <form>
    <table border=1>
    <tr>
<%--
  Es sind zwei Alternativen zur bergabe der beschafften DDIC-Infos programmiert:
  (a) Zugriff ber Index --> label,  Tabelle field_label_itab
  (b) Zugriff ber Key   --> label2, Tabelle field_label_itab2
  Es ist beim ersten Label die Key-Methode, bei den anderen die Index-Methode aktiviert.
  Dies ist willkrlich und nur zu Demo-Zwecken so gewhlt.
--%>
<% read table field_label_itab index 1 into label. %>
<% read table field_label_itab2 with key name = 'vondatum' into label2. %>
<th> <%= label2-name%> </th>
<td> <input type =text name="wa1-vondatum" value=
  <%= page->to_string( value = wa1-vondatum format = if_bsp_page~co_format_long )%>>
</td>
<% read table field_label_itab index 2 into label. %>
<% read table field_label_itab2 with key name = 'bisdatum' into label2. %>
  <th> <%= label%> </th>
  <td> <input type =text name="wa1-bisdatum" value=
    <%= page->to_string( value = wa1-bisdatum format = if_bsp_page~co_format_long )%>>
  </td>
</tr>
<tr>
<% read table field_label_itab index 3 into label. %>
<% read table field_label_itab2 with key name = 'CITYFROM' into label2. %>
<th color> <%= label%> </th>
<td>
  <select name="wa1-cityfrom" size=1 onChange="this.form.submit();" >
    <option><font color="green">Abflugort</font></option>
<% loop at cityfrom_tab into cityfrom. %>
<option
  value ="<%= cityfrom%>"
<% if cityfrom = wa1-cityfrom. %>
<%= ' selected'%>
<% endif. %>
>
  <%= cityfrom%>
</option>
<% endloop. %>
  </select>
</td>
<% read table field_label_itab index 4 into label. %>
<% read table field_label_itab2 with key name = 'CITYTO' into label2. %>
<th> <%= label%>
</th>
<td>
  <select name="wa1-cityto" >
    <option width="200" >Zielort</option>
<% loop at cityto_tab into cityto. %>
<option value ="<%= cityto%>"><%= cityto%></option>
<% endloop. %>
   </select>
 </td>
</tr>
</table>
<% if not mess is initial. %>
<table>
<% loop at mess_tab into mess. %>
<tr>
 <td> <font color="red"> Fehler ist aufgetreten: </font> </td>
 <td bgcolor="red"> <%= mess%> </td>
</tr>
<% endloop. %>
</table>
<% endif. %>
     <input type=submit name="onInputProcessing(find)" value="Suchen">
     <input type=submit name="onInputProcessing(exit)" value="Beenden">
   </form>
  </body>
</html>