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

Screen, Menu painter

Former Member
0 Likes
591

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
Read only

Former Member
0 Likes
556

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

3 REPLIES 3
Read only

Former Member
0 Likes
557

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

Read only

santhosh_patil
Contributor
0 Likes
556

HI,

Check with this ...

In the element list of the screen Define

OK_CODE of type "OK" .

Regards,

Santhosh

Read only

Former Member
0 Likes
556

Thanks a lot.

Rajesh.