Application Development 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: 

Dialog Programming - Pressing a button

Former Member
0 Kudos
77

Hi,

How do you make something happen when pushing a button in dialog programming.

I have a button on my screen, and the following code.

However, when debugging, fcode isn't being filled with the Button name.

CASE FCODE.

WHEN 'BENT'.

PERFORM GET_LAST_UPDATE.

Endcase

Please help,

Thanks,

John

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
48

You need to define the field in the screen which is to handle the function code being passed to the program. This field in the screen is the OK_CODE field. Go to your screen and look at the element list, not the layout, you should have a field with the OK_CODE type, which is probably doesn't have a name assigned. Since you are using FCODE, put FCODE into this field as the name. Save and activate. Should work now.

Regards,

Rich Heilman

Edited by: Rich Heilman on Dec 8, 2008 3:27 PM

1 REPLY 1

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
49

You need to define the field in the screen which is to handle the function code being passed to the program. This field in the screen is the OK_CODE field. Go to your screen and look at the element list, not the layout, you should have a field with the OK_CODE type, which is probably doesn't have a name assigned. Since you are using FCODE, put FCODE into this field as the name. Save and activate. Should work now.

Regards,

Rich Heilman

Edited by: Rich Heilman on Dec 8, 2008 3:27 PM