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

Obligatory fields on Dynpro and 'LEAVE PROGRAM'

Former Member
0 Likes
962

Hi all,

I have some obligatory fields on my dynpro. Want to leave the program with 'LEAVE PROGRAM' at PAI ie. sy-ucom = 'EXIT' without filling the fields. Is that possible ?

Regards Joerg

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
833

in the flow logic

this is how you will write

PROCESS BEFORE OUTPUT.
  MODULE INIT_SCREEN_100.

PROCESS AFTER INPUT.
  MODULE CANCEL AT EXIT-COMMAND.
  MODULE PAI.

in the program

MODULE init_screen_100 OUTPUT.
  SET PF-STATUS 'STATUS_100'.
ENDMODULE.

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE pai INPUT.
  MESSAGE .....
ENDMODULE.

Hi all,

I have some obligatory fields on my dynpro. Want to leave the program with 'LEAVE PROGRAM' at PAI ie. sy-ucom = 'EXIT' without filling the fields. Is that possible ?

Regards Joerg

5 REPLIES 5
Read only

Former Member
0 Likes
833

you need to give the cancel and exit as type 'E'

and you need to handle them in module at exit-command.

Read only

Former Member
0 Likes
833

While setting the PF status for CANCEL and EXIT buttons

you can see the below fields, fill the type as E

Function Code ENDE

Functional Type <b>E</b> Exit Command

Modification Original

after PAI

write module at exit-command and handle them ...

Read only

Former Member
0 Likes
834

in the flow logic

this is how you will write

PROCESS BEFORE OUTPUT.
  MODULE INIT_SCREEN_100.

PROCESS AFTER INPUT.
  MODULE CANCEL AT EXIT-COMMAND.
  MODULE PAI.

in the program

MODULE init_screen_100 OUTPUT.
  SET PF-STATUS 'STATUS_100'.
ENDMODULE.

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE pai INPUT.
  MESSAGE .....
ENDMODULE.

Read only

0 Likes
833

Hi Vijay

thank you for the detailed answer, solved problem.

Regards Joerg

Read only

0 Likes
833

Great ...

Regards

vijay