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: 

Screen, Menu painter

Former Member
0 Kudos

Hi all,

Where do we actually pass the sy-ucomm value to the ok_code.

I get the following error when i click a menu button.

"No field defined for the function code"

Example progarm.

PROGRAM demo_dynpro_gui_status.

DATA: ok_code TYPE sy-ucomm,

save_ok LIKE ok_code,

output LIKE ok_code.

CALL SCREEN 100.

MODULE init_screen_0100 OUTPUT.

SET PF-STATUS 'STATUS_100'.

SET TITLEBAR '100'.

ENDMODULE.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.

LEAVE PROGRAM.

WHEN OTHERS.

output = save_ok.

ENDCASE.

ENDMODULE.

Please send your suggestions,

Rajesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Goto the attributes tab of your screen. There you will see an entry for OK_CODE, assign your field there.

3 REPLIES 3

Former Member
0 Kudos

Goto the attributes tab of your screen. There you will see an entry for OK_CODE, assign your field there.

santhosh_patil
Contributor
0 Kudos

HI,

Check with this ...

In the element list of the screen Define

OK_CODE of type "OK" .

Regards,

Santhosh

Former Member
0 Kudos

Thanks a lot.

Rajesh.