F8= Exit in K3S-Replenish® System

Description:  F8=Exit in K3S-Replenish(R) System (Exit to Customer's data)

The function key of F8= has a special purpose throughout the K3S system.  Most of the K3S screens that the buyer will use during the
day have been designed to allow a customer to customize the F8= capability.

You can specify the program to be called when F8= is pressed and the library where that program resides. Your program will receive
parameters that specify the particular supplier or product the buyer was viewing on the K3S screen. This means the buyer is only one
push button (F8=) away from important information that may reside back in the host system. This functionality is made possible using
a special Table code type of UEX for User exits.

From the K3S Main Menu take option 9. Operations, then option 3. Table codes, and then position yourself to type UEX (User exits).
Next select UEX with 1=Select, and then use F6=Add to create a new User exit record. 

Below is an example of setting up the F8= function key for the K3S program K3S_1040, which will allow the buyer to jump directly to his
Bookings information that resides back in his host system.

The values that must be entered to setup the F8= capabilities are:

Table code value        K3S_1040
In this example the program K3S_1040 is the K3S program the buyer would like to establish an F8= exit point for.

Description 1        Bookings
The text in Description 1 will appear in the F24= (function keys) screen. In this example the text of ‘Bookings’ will appear.

Description 2        USERS_PGM
The customer’s program name is defined in the Description 2 field.    In this example the program name is K3S_BOOK.

Description 3        USERS_LIB
The library name that contains the customer’s program is defined in the Description 3 field. In this example the library name is K3S_5MOD.

The other fields on the screen are not required for this F8= function.

The parameters that will be passed to the customer’s program are:

Company ID          1
Location ID         5
Buy group ID        5
Supplier ID        10
Sub supplier ID    10
Product ID         25     (from program K3S_1015 the PO# is passed in first 10 bytes)

If the program being executed when the user presses F8 has a 24x80 DSPSIZ, you will need to utilize RPG program K3S_2480 out of
library K3S_5OBJ so the user does not blow up. You will need to have your exit point program call K3S_2480 before it calls the program
with the 24x80 screen size.

The following page shows example code where a call to K3S_2480 has been added right before the call to exit point program SALESINQ.
Even though program SALESINQ has a display file size of 24 x 80 this will not result in error because K3S_2480 is called just before it.

      0387.01  * user has pressed F18=Sales inquiry
    0387.02 c                   if        key_press = f18_key
    0387.03 c                   call      'K3S_2480'
    0387.04 c                   call      'SALESINQ'
    0387.05 c                   parm                    comp
    0387.06 c                   parm                    div
    0387.07 c                   parm                    dept
    0387.08 c                   parm                    cust
    0387.09 c                   parm                    prdt
    0387.10 c                   endif