Step 2. Create a Begin WebRoutine

WAM030 - Employee Enquiry

In this step you will create the code for a new WebRoutine that will be used to enter the employee number. The WEB_MAP statement will specify the fields that are passed in and out of the WebRoutine.

1.  Immediately following the BEGIN_COM, insert the following RDML code to create WebRoutine named Begin.

Webroutine Name(Begin) Desc('Select Employee')Endroutine

 

2.  This WebRoutine will produce a web page with employee number as an input field. You will add a push button to invoke a second WebRoutine. The Begin WebRoutine will not require any incoming fields. It will have one outgoing field, EMPNO. Add the following WEB_MAP statement to the WebRoutine.

Web_Map For(*output) Fields(#empno)

 

     The EMPNO field will be used to enter the employee number to be retrieved and displayed.

     Remember that by default, fields defined on a WEB_MAP statement are input capable.

     For further information about the WEB_MAP statement, refer to the LANSA Technical Reference Guide.

     Note: you can press F1 on any statement in the LANSA editor to display help directly from the LANSA Technical Reference Guide.

     Your completed WebRoutine should appear as follows:

Webroutine Name(Begin) Desc('Select Employee')

Web_Map For(*output) Fields(#empno)

Endroutine 

3.  Compile your WAM.