Function SET008A: Determine Button Clicked

LANSA

Function SET008A: Determine Button Clicked
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_008);
********** COMMENT(Function .......: SET008A);
********** COMMENT(Created on .....: 18/02/00 at 14:43:32);
********** COMMENT(Description ....: Function Skeleton);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(show how to determine which button was clicked when);
********** COMMENT(more than one button in a page link to the same);
********** COMMENT(function.);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT *WEBEVENT);
********** COMMENT();
********** COMMENT(Group and field definitions);
********** COMMENT();
GROUP_BY NAME(#PANELDATA) FIELDS((#STDRENTRY *HIDDEN)(#S_BUTTON *HIDDEN)(#S_008TEXT *NOID)(#S_008ALLB *INPUT *NOID));
********** COMMENT();
********** COMMENT(First time the function was invoked go to request the);
********** COMMENT(information);
********** COMMENT();
IF COND('#stdrentry *ne Y');
CHANGE FIELD(#STDRENTRY) TO(Y);
GOTO LABEL(REQ);
ENDIF;
********** COMMENT();
********** COMMENT(#S_BUTTON carries the value of the button pressed);
********** COMMENT();
CASE OF_FIELD(#S_BUTTON);
WHEN VALUE_IS('= F');
USE BUILTIN(CLR_MESSAGES);
MESSAGE MSGTXT('You have clicked on the FIND button');
WHEN VALUE_IS('= S');
USE BUILTIN(CLR_MESSAGES);
MESSAGE MSGTXT('You have clicked on the SUBMIT button');
WHEN VALUE_IS('= V');
USE BUILTIN(CLR_MESSAGES);
MESSAGE MSGTXT('You have clicked on the VIEW button');
ENDCASE;
********** COMMENT();
REQ: REQUEST FIELDS(#PANELDATA) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);