ADELIA |
|
|
|
|
(I) |
|
|
|
|
Section for use
SFTKYS_PROCESS
Syntax
SFTKY VarId FunctionKey
FunctionKey |
→ |
01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 |
|
|
| 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
|
|
| 19 | 20 | 21 | 22 | 23 | 24 | None |
Description
This instruction allows you to execute a sequence of ADELIA instructions when the cursor is located on the field VarId specified in the softkey, and the user has pressed the function key FunctionKey associated with the softkey.
The action to be executed is defined by a group of ADELIA instructions in the SFTKY/END_SFTKY block.
Each SFTKY instruction must have a corresponding END_SFTKY instruction.
VarId is the guide word of a screen field which is in the transaction corresponding to the SFTKYS_PROCESS section where the instruction is.
The function key number is optional. If not specified, the one indicated in the screen standards ("Prompt key" field) will be used.
The function keys used must not be declared at the layout level. They will be defined automatically in the DSPF as CFxx.
To define a key at a softkey level, the key number must be specified.
Example:
SFTKY Z_CUST_CODE 01 <------- 01 stands for function key F1
CALL CUST_SELECTION WCUSCO
Z_CUST_CODE = WCUSCO
END_SFTKY
In the case of a subfile field, the system reads (at the SFTKY level) and updates (at the END_SFTKY level) the record on which the cursor is. The record is also activated. Finally, if the *DISPLAY_SFTKY reserved word is set to 0, the END_SFTKY instruction will not make the transaction be redisplayed automatically, and the processing statements in the Level 1 TRANSACTION paragraph will run sequentially. In this way, if a VERIFY instruction is run, the subfile record activated by the SFTKY will be reread in the VERIFICATION block.
Example
SFTKYS_PROCESS 02
*
* Prompt functions for transaction 2
*
SFTKY ZZ_CUST_CODE
* F4 to select customers
CALL CUSTOMER_WDW ZZ_CUST_CODE
END_SFTKY
*
SFTKY ZZ_CUST_CODE 01
* F1 to display help on customer code
W_MEMBER_NAME = 'CUSTCODE'
CALL FLD_LVL_HELP W_MEMBER_NAME
END_SFTKY
*
SFTKY ZZ_ITEM_CODE
* F4 to select items
*DISPLAY_SFTKY = '0'
* this will continue in the process and directly go to transaction 3
CALL ITEM_WDW ZZ_ITEM_CODE
END_SFTKY
*
* Error message SFT0002 if cursor is not in correct location
SEND_MSG SFT0002
END_SFTKYS_PROC
*
* ---------------
*
SFTKYS_PROCESS 03
*
* Prompt functions for transaction 3
*
SFTKY ZZ_PAYM_CODE
* F4 to select payments
CALL PAYMENT_WDW ZZ_PAYM_CODE
END_SFTKY
*
* Error message SFT0002 if cursor is not in correct location
SEND_MSG SFT0002
END_SFTKYS_PROC
See also the list of 4GL instructions by topic
↑ Top of page Copyrights Ι ©Hardis Group 2025 - Any partial or total reproduction of the content, not expressly authorized by Hardis Group, is strictly prohibited.