Application Development 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: 

CL_SALV_TABLE full screen 2 instances toggle between them?

Former Member
0 Kudos


Hello,

I've created a class which holds 2 instances of CL_SALV_TABLE (GR_ALV_000 & GR_ALV_001). Both get a GUI-Status with extra functionality to jump to the other.

The class has a LCL_EVENT_HANDLER to handle the ON_USER_COMMAND event. So far everything works fine.

But then:

I would expect handling the event comming for example from GR_ALV_001 should do not much more then GR_ALV_000->DISPLAY( ).

But that does not seem to work when GR_ALV_000 was already displaid before.  Both exist because when using the back arrow shows the 1st displayed again and jump to other is again possible.

Tried to put CL_GUI_CFW=>FLUSH( ) after the display, ALV->REFRESH( ), ...

It seems so that it is maybe just an issue of setting the Focus but since I created them full-screen from a class I don't have a container and see no getter to get the container used for the full-screen ALV version.

Anybody any suggestions?

Dirk

6 REPLIES 6

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Instead of flipping between screen you can use cl_gui_splitter_container .

You can archive something like this with no problems....

Regards.

0 Kudos

Hoi Eitan,

Thanks for quick reply but I know that.

My business case is 1 full screen and very occasional they might want to see some details.

It seems to me that there should be a simple way once the 2 ALV instances exist to trigger display of the one or the other, but I might be wrong.  I've build the stuff in a class which means in there there are no screens etc.

Dirk

0 Kudos

Hi,

So you need 2 full screens of ALV with option to travel between the two .

I asume that this is a Executable Program so:

START-OF-SELECTION .
  PERFORM at_start_of_selection .
   
*----------------------------------------------------------------------*
FORM at_start_of_selection .
  CALL SCREEN 100 .
ENDFORM .                    "at_start_of_selection
*----------------------------------------------------------------------* 
 
Setup:

Create two screen say 100 and 200 .

at each screen PBO will set up the realvent CL_SALV_TABLE and display it .

at ON_USER_COMMAND you can use LEAVE TO SCREEN xxx .

For screen 100 it will be 200
For screen 200 it will be 100

You need to have option to get to the selection screen (If you have one) .

you can use LEAVE TO SCREEN 0 .

Regards.

0 Kudos

Thanks again Eitan you are of course again right that this would work,

But this is just what I try to avoid.  If I have a class (not a prgrm) with 2 ALV instances I would expect to have the facility to make either visible reacting on events triggered in them.

If this is not possible then there is in my opinion something missing in the framework.  An I think that might indeed be the problem but of course I'm not the super specialist.

I think (so I am) that in case the ALV's are created full-screen we would need a getter to get the container or something like that to set focus on one of them.

Dirk (trying to get more and more into the OO world)

0 Kudos

Hi,

Expect the unexpected...

There are a LOT of things missing...,But if flow with the constraints you are OK .

If you want to explore object oriented try to learn another language,

Java,C# and C++ are good choices. (Resource are free and easy to install)

I my self started to use Java as a hobby years ago and it sure paid off .

Regards.

0 Kudos

Hi Again,

My Java was decades ago and indeed should something up again.

Have some material lying around on Android so one day I will start with it but after a days ABAPping ...

Well maybe such discussions will trigger one and another at SAP.  Anyway CL_SALV_TABLE is already quite an improvement compared to the first OO version.

Dirk