AP_CHOIX2

Description

This action is called right after the criteria window entry and the selection of a button.

Template

Window entry

Use

It is used to execute a processing after having "cicked" on a button.

The RESPONSE variable contains the status of the button and therefore indicates the button activated by the user.

For the preddefined buttons, you will find here below the variables that identify the button:

REPONSE Status Button
GSTAOK 1029 OK button
GSTAEND 1821 End
GSTAESC 7 Escape

For the other buttons, the RESPONSE variable contains a status that starts with:
1101    for the validating buttons
1801    for the non-validating buttons

So, in the presence of 2 validating buttons followed by one non-validating button, the following statuses are obtained in the RESPONSE variable:
1101
1102
1803

This status is not used directly because it is dependent on the position of the button in the window dictionary. First, the position of the button is searched in the window dictionary, then, based on this position, the code of the button is deduced. Tow tables are available: LBOUT(n) contains the status of the buttons, CBOUT(n) contains the codes of the buttons (n being the position of the button in the window dictionary).

For instance:
Necessity to execute the processing for the memo buttons on the ATB balance inquiry, BAG inquiry.

$AP_CHOIX2
Local Integer I
I=find(RESPONSE,LBOUT)
If I<1: Return : Endif
Case CBOUT(I-1)

    When "M"
    When "R"
    When "E"
Endcase
Return