Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OK_CODE for ENTER Button

Former Member
0 Likes
625

Hello Friends ,

i used the command : field XXXX module YYYY , to call the module when the data is given in the field. Now my boss told me that he wants to execute the filling of the table ( that is waht my program makes) even if i do not fill any field.

How do i get the ok_code when i press the enter button?

Best Regards!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
478

When you press the ENTER key the PAI will be called but the OK_CODE will be empty. If you specifically trap for OK_CODE = '' you can fill the table whenever the ENTER key is pressed.


PROCESS AFTER INPUT.
.
.
.
MODULE USER_COMMAND.

*Call to USER_COMMAND MODULE
MODULE USER_COMMAND INPUT.
  IF OK_CODE = ''.
*   Fill table when the ENTER key is pressed
  ENDIF.
ENDMODULE.

Whenever the user presses the ENTER key the same code will be called so it could affect the speed of your program--depending on the size of the table you want to populate.

If I'm not even close on my response to your question, I apologize.

1 REPLY 1
Read only

Former Member
0 Likes
479

When you press the ENTER key the PAI will be called but the OK_CODE will be empty. If you specifically trap for OK_CODE = '' you can fill the table whenever the ENTER key is pressed.


PROCESS AFTER INPUT.
.
.
.
MODULE USER_COMMAND.

*Call to USER_COMMAND MODULE
MODULE USER_COMMAND INPUT.
  IF OK_CODE = ''.
*   Fill table when the ENTER key is pressed
  ENDIF.
ENDMODULE.

Whenever the user presses the ENTER key the same code will be called so it could affect the speed of your program--depending on the size of the table you want to populate.

If I'm not even close on my response to your question, I apologize.