Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Tools : FCNKEY_MSG

FCNKEY_MSG
Creates a string containing the function keys defined for a screen. (F)
Invocation
screentable.field = FCNKEY_MSG(screen)
 
Prerequisites
Usage Notes
This tool is used together with PROCESS_FCNKEY to initialize the function key screen table with the function keys defined for a screen.
Example
The rule in this example prepares a screen called NEW_EMPLOYEE for display by using FCNKEY_MSG to initialize the function key screen table. First you must define the screen NEW_EMPLOYEE. This screen should contain a screen table called FCNKEY_SPECS, which, in turn, has a field called FCNKEYS. This is where the function key string appears.
When the screen appears in an application, the user sees the function keys available from the screen in the function key line.
FCNKEYS(NEW_EMPLOYEE) Table
The FCNKEYS (NEW_EMPLOYEE) table displays the function keys and associated routines defines for the NEW_EMPLOYEE screen:

 
BROWSING TABLE : FCNKEYS(NEW_EMPLOYEE)
COMMAND ==>
SCROLL: P
PF_KEY NAME COMMAND ROUTINE
_ ----- ---------------- ---------------- ----------------
_ ENTER INPUT DATA RU_DELSCRDATA_2
_ PF1 HELP
_ PF12 EXIT EXIT_DISPLAY
_ PF13 PRINT PRINT_SCREEN
_ PF2 OPTION SELECT_OPTION
_ PF3 SAVE SAVE_EMP

 
CREATE_EMPLOYEE Rule
Inside an application, the CREATE_EMPLOYEE rule displays the screen:

 
CREATE_EMPLOYEE(EMPNO);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ CALL DELETESCREENDATA('NEW_EMPLOYEE'); | 1
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('NEW EMPLOYEE'); | 2
_ INSERT FCNKEY.SPECS('NEW_EMPLOYEE'); | 3
_ EMPLOYEE_INFO.EMPNO = EMPNO; | 4
_ INSERT EMPLOYEE_INFO('NEW EMPLOYEE'); | 5
_ UNTIL EXIT_DISPLAY DISPLAY NEW_EMPLOYEE : | 6
_ CALL PROCESS_FCNKEY('NEW EMPLOYEE'); |
_ END; |
_ ---------------------------------------------------------------------------

 
Displayed Screen
When CREATE_EMPLOYEE is executed, with 04334 as the EMPNO argument, the screen looks as follows:

 
Region: Employee No.: 04334
 
Last Name:
 
Position:
 
MGR#:
 
Deptno:
 
Salary:
 
Date Hired:
 
Address:
 
City:
 
State or Prov:
 
Code:
 
FCNKEYS: 3=SAVE 13=PRINT 12=CANCEL

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved