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

help needed in screen flow

Former Member
0 Likes
658

hi every one

i have a screen with a mandatory field

when i click in 'BACK' it should not leave the screen because the field is mandatory.

when i click on 'CANCEL' it should come out of the screen.

and when i click on 'EXIT' it should come out of the screen.

how to code all these three conditions in my program.

vamsi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
634

Hi,

Use module at exit-command statement.

In the menu painter, the attributes shouild be at exit-command.

write a module xxxx at exit-command for the function codes(ok codes for back , exit and canc).

Regards,

hi every one

i have a screen with a mandatory field

when i click in 'BACK' it should not leave the screen because the field is mandatory.

when i click on 'CANCEL' it should come out of the screen.

and when i click on 'EXIT' it should come out of the screen.

how to code all these three conditions in my program.

vamsi

4 REPLIES 4
Read only

Former Member
0 Likes
635

Hi,

Use module at exit-command statement.

In the menu painter, the attributes shouild be at exit-command.

write a module xxxx at exit-command for the function codes(ok codes for back , exit and canc).

Regards,

Read only

Former Member
0 Likes
634

Hi

Write the code in PAI like

PROCESS AFTER INPUT.

  • Forced Exit from the transaction from screen

MODULE exit AT EXIT-COMMAND.

&----


*& Module exit INPUT

&----


  • Exit from the Transaction

----


MODULE exit INPUT.

CASE okcode.

WHEN 'EXIT' OR 'CANCEL'.

CLEAR okcode.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " exit INPUT

In the field attributes set the function type as 'E' for CANCEL and EXIT buttons.

Reward points if useful

regards

Anji

Read only

Former Member
0 Likes
634

hi,

i have a screen with a mandatory field

when i click in 'BACK' it should not leave the screen because the field is mandatory.

when i click on 'CANCEL' it should come out of the screen.

and when i click on 'EXIT' it should come out of the screen.

how to code all these three conditions in my program.

in pbo event

loop at screen.

if screen-name = 'text field name'.

screen-input = 1.

modify screen.

endif.

endloop.

in pai event.

data: ok_code like sy-ucomm.

ok_code = sy-ucomm.

case ok_code.

when 'back'.

leave to screen 200. [going one screen back]

when 'exit'

'cancel'.

leave screen 0 or leave program. [back from all screens]

endcase.

if helpful reward some points.

with regards,

suresh babu aluri.

Read only

Former Member
0 Likes
634

THANKS FOR YOUR ANSWERS