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 design

Former Member
0 Likes
932

Hi experts,

I am new to abap. i created a screen . In that i placed two push bottons.

i gave name as enter and exit for that two buttons. while clicking enter button two no to be added and result should be displayed and while clicking exit button it want to leave the screen.

For this in flow logic how to write the code. Kindly give me the code.

Thanks in advance

Reg

R.Vijai

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
902

hi,

in PAI

ok_code = sy-ucomm

case ok_code .

when 'ENTER'.

a = c + b.

when 'EXIT'.

LEAVE SCREEN.

and in PBO

transfer the field a to screen

display the result.

PLZ reward points

7 REPLIES 7
Read only

Former Member
0 Likes
902

in pai module write ur code.

case sy-ucomm.

when 'ENTER'.

C = A + B.

//Assign c to the screen field to display it.

when 'EXIT'.

LEAVE SCREEN.

endcase.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
902

HI,

For the buttons you need to give FCODE. Goto screen layout and double click on each button and give some FCODE for these two buttons.

Then in your flow logic create a module in INPUT section.

MODULE ok_code_screen INPUT.

Also add ok_code in the screen elements list.

Then in the module write.

case ok_code.

here write code for your FCODE's.

endcase.

Regards,

Sesh

Read only

Former Member
0 Likes
903

hi,

in PAI

ok_code = sy-ucomm

case ok_code .

when 'ENTER'.

a = c + b.

when 'EXIT'.

LEAVE SCREEN.

and in PBO

transfer the field a to screen

display the result.

PLZ reward points

Read only

0 Likes
902

HI,

IT SHOWING UNDEFINED STATEMENT 'OK_CODE'.

KINDLY REPLY

Read only

0 Likes
902

hi

declare ok_code like sy-ucomm in your top include.

regards.

Read only

0 Likes
902

HI,

I am creating screen through se38 there i write a code

call screen 100.

below that i write

DATA ok_code like sy-ucomm. in flowlogic i write the code like this

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0100.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

case sy-ucomm.

when 'ENTER'.

C = A + B.

//Assign c to the screen field to display it.

when 'EXIT'.

LEAVE SCREEN.

endcase

now "case" is not defined ,check your spelling error is coming .kindly reply.

Read only

Former Member
0 Likes
902

Hi,

You should assign function codes for you pushbuttons, and assign the ok code in the element list of your screen.

Regards,

Leo