Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I)

 

 

 

 

 

Section for use

All

 

Syntax

SFTKYS_PROCESS TransactionNum

 

Description

This instruction marks the beginning of the section for processing a softkey associated with a transaction identified by its number TransactionNum.

 

All the SFTKY instructions on the screen fields of a transaction are gathered in the SFTKYS_PROCESS section associated with the transaction.

 

This section is automatically called at the beginning of the TRANSACTION section when the user presses one of the function keys associated with the SFTKY instructions contained in the section.

 

When the user presses one of the softkey key on a valid field, the program will execute the instructions located between SFTKY and END_SFTKY, and re-display the transaction without changing the cursor position. This is done before executing the instructions mentioned in the TRANSACTION section.

 

The programmer can place instructions elsewhere within the SFTKYS_PROCESS section, outside the SFTKY/END_SFTKY blocks. These are executed as long as the SFTKY block is not valid.

 

Useful locations are:

    • Right after SFTKYS_PROCESS; these instructions are executed each time the section is called.

    • Just before END_SFTKYS_PROC; these instructions are not executed unless the user has pressed a softkey function key outside the screen fields specified by the programmer.

Every time the section is called, the transaction is re-displayed, by default. If the programmer wishes to continue sequentially within the TRANSACTION section, he can use the *DISPLAY_SFTKY reserved word.

This reserved word is automatically set to 1 at the beginning of SFTKYS_PROCESS section.

If the value of this reserved word is set to 0, the transaction will not be re-displayed and the instructions in the TRANSACTION section will be executed.

 

Important note: There can be only one SFTKYS_PROCESS instruction per transaction number.

 

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 the cursor is not in the 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 the cursor is not in the correct location 

SEND_MSG SFT0002 

END_SFTKYS_PROC

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette