Enable F4, and an associated indicator such as *in04, with the DDS keywords CF04(04) or CA04(04). If *in04 is on after the exfmt or read to the record format then they pressed F4. For determining what field the cursor was in you can use the DDS keyword RTNCSRLOC. This keyword has an option which will return, in a field of you choosing, the name of the field on the display where the cursor was located. F4 will be enabled anywhere on the display, but you can verify with RTNCSRLOC that the cursor was in the customer name field and, if not, your program can return an error message.