In this step you will enable session management in WAM iiiEmpEnquiry and make it share the session group IIISESSION. The WAM will need to map the saved and output menu lists in the same way as already implemented in the log in WAM iiiAppLogin.
Define Field(#mnuitmid) Type(*string) Length(3)Define Field(#prtitmid) Type(*string) Length(3)Define Field(#mnucapt) Type(*char) Length(30) Input_Atr(LC)Define Field(#mnuurl) Type(*string) Length(256)Define Field(#mnuwam) Type(*char) Length(9)Define Field(#mnuwrnme) Type(*char) Length(30)Def_List Name(#mnusave) Fields(#mnuitmid #prtitmid #mnucapt #mnuurl #mnuwam #mnuwrnme) Type(*Working)Def_List Name(#mnulist) Fields(#mnuitmid #prtitmid #mnucapt #mnuurl #mnuwam #mnuwrnme) Type(*Working)Web_Map For(*output) Fields((#mnulist *private))Web_Map For(*none) Fields(#mnusave) Options(*persist)
EVTROUTINE HANDLING(#COM_OWNER.SessionInvalid) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)TRANSFER TOROUTINE(#iiiAppLogin.login)ENDROUTINE
Webroutine Name(begin) Desc('Select Employee') Web_Map For(*output) Fields(#empno) Clr_List Named(#mnulist)
Selectlist Named(#mnusave)
Add_Entry To_List(#mnulist)
Endselect
Endroutine