cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem creating a modal dialog

Former Member
0 Likes
1,529

Hello,

I want to present a 'wizard'-like dialogbox to the user of my system. But I'm having trouble making my popup window modal i.e. to lock the main window of my application as long as the user is interacting with the 'wizard'.

I am in a strictly (ABAP-)object oriented context. Therefore my first attempt was the CL_GUI_DIALOGBOX_CONTAINER which I like quite a lot but it's flaw is that it is amodal which makes it useless.

Then I tried a new dynpro (to which I would attach a docking container) but it seems that dynpros can't be displayed from ABAP-Objects...

Maybe someone has an idea on how to make the CL_GUI_DIALOGBOX_CONTAINER modal <i><b>or</b></i> some other solution to the problem ?

Best regards,

Patrick Baer

View Entire Topic
christian_wohlfahrt
Active Contributor
0 Likes

Hi Patrick,

IMHO, that's the point: you can't call dynpros inside ABAP-OO.

I'm curious, if there are more elegant ways, but here is my proposal:

Encapsulate your new (modal) screen in a FM or report. This FM (like POPUP*) )can be called inside ABAP-OO.

Inside this FM you can again use OO, but here concept of separate transaction logic (how to book data) and maintenance logic (in which way maintain data in screens) comes into the game.

Regards,

Christian

Former Member
0 Likes

Christian,

I totally agree with you. That's exactly how I see the situation now.

In my opinion the most elegant way would be to add a modal/amodal parameter to the constructor of the CL_GUI_DIALOGBOX_CONTAINER. It probably isn't that easy to implement but it would be quite logical in my eyes. Furthermore it is OO-based and very easy to use.

Best regards,

Patrick Baer