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

Problem in modal dialog box

Former Member
0 Likes
469

Hello,

I've created a function which call a modal dialog box. In this one, the user has to choose a value in a listbox. It's like a popup for the user.

The screen is called like below:

CALL SCREEN 0500 STARTING AT 5 5

ENDING AT 100 10.

The screen is defined with a pf-status containing only one icon(pf-key) with value VALID. In the process after input, I'm controlling the value like below:

MODULE USER_COMMAND_0500 INPUT.

data : save_ok like sy-ucomm.

save_ok = lv_code.

case save_ok.

when 'VALID'.

if lv_prio(2) lt 4.

message s098(ze).

else.

set screen 0.

leave screen.

endif.

when others.

message s098(ze).

endcase.

ENDMODULE. " USER_COMMAND_0500 INPUT

I have a bug when the program is calling twice the function means the popup.

Instance of program Z.

loop at X.

call function YY.......

endloop.

The table X contain two values.

When the popup is called the first time in the loop, all is ok, but when the popup is called the next time, if the user doesn't choose a value in the listbox and just press on the keyboard Enter, then the system go completly out of the program Z and doesn't go in the user_command !!!!

I've defined the field (listbox) as required, but no effect.

Is it a bug of the system ? or do I defined the screen incorrectly or ???

Thanks a lot for your help.

1 REPLY 1
Read only

Former Member
0 Likes
341

Hi merle,

i have u debugged the program ? Is it coming to user-command event ?

What is the type of this field lv_prio ?

comment set screen 0 & use leave to screen 0

if lv_prio(2) lt 4.

message s098(ze).

else.

leave to screen 0.

endif.