cancel
Showing results for 
Search instead for 
Did you mean: 

How to get visibility information on a view during runtime?

Former Member
0 Kudos

Dear experts,

I want to trigger an event, just when a view becomes invisible.

Is there a possibility to get the visibility information in theWDDOmodify method e.g?

kind regards,

Sahla

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When you click on refresh the control goes to WDDOEXIT method of the view. Here you can place your code to hide the UI elements you want to. When no row is selected and you select a row then WDDOINIT method is called where you can place the code to make the required UI elements visible.

Former Member
0 Kudos

Hello Pooja,

The WDDOEXIT of the view will only be used when the whole application is exit ( on browser refresh).

It is not called when just the POWL refresh is selected.

I tried to set breakpoints in all componentcontroller, window and view hook methods to find out which method is called only when the details view is not visible. But I couldn't figure it out.

The wddomodify of the view is called, but I cannot get any visibility information there.

the WDDOAFTERACTIOM of the view is called, but the refrence to the actions is always initial. I cannot decide whether refresh has been selected or another UI action.

The WDDOCLOSE of the window is not entered when the POWL_DETAIL window becomes invisible.

The details view and all related controller are initialized once and they live during the whole session.

Their hook methods are called even if the view is not visible.

The cleanest way to solve this problem is to trigger a portal event from the get_objects method.

But this is now not avaiable.

I tried up to now to use WD features as a workaround. But I coudlb't find the right feature to use..

kind regards,

Sahla.

Former Member
0 Kudos

When I click on POWL refresh the debugger stops at view method WDDOEXIT and after this POWL refresh when I select a fresh row, view method WDDOINIT is being called again. However they are not called when you switch when one row selected to another one. Can you try again and see?

Former Member
0 Kudos

Unfortunately this is not the case for me.

wddoinit of the view is entered when the firs row is performed.

Changing to another row calls wddomodify

refresh ofthe powl calls also wddomodify.

view wddexit is entered only when the whole application is exit.

I am using SAP_ABA 702 and SAP_BASIS 702.

What are the version you are using?

kind regards,

Sahla

Former Member
0 Kudos

I am using SAP_ABA 701 and SAP_BASIS 701.

Former Member
0 Kudos

Ok, then the behaviour has changed.

I think it makes more sense to make the view just invisible without initiating all the time all the controlers. But for my specific problem, it is not advantageous.

I will try to contact POWL developer collegues. may be thy can deliver me the visibility information within

wddomodify.

What do you think?

Many thanks and kind regards,

Sahla

Former Member
0 Kudos

Yes you can try to talk to them... but I think it will take some time before they can get back,etc.

Till then the only thing I can think of is in get_objects method you set some variable in SAP Memory and then read it from WDDOMODIFYVIEW in order to read the visibility info.

Former Member
0 Kudos

Indeed, a very good idea.

Since I am not very familiar with ABAP, couldy please tell me, what does it mean: put it in memory?

Is it related to shared objects? Hows to realize this?

Thank you very much.

Sahla

Former Member
0 Kudos

Hi Pooja,

I find it out. It is using the import and export commands.

I will try this and let you know :).

kind regards,

Sahla

Former Member
0 Kudos

It works! great. Thank you very very much

Sahla

Answers (2)

Answers (2)

Former Member
0 Kudos

As far as I understand you can try to do this in the feeder class as in the feeder class you have info about the row selection, etc and therefore would know when the details would be visible/invisible. Please provide more details about your senario.

Former Member
0 Kudos

Hi,

You are absolutly right.

Up to now I controled the visibility of the UI elements that appear with LOS via a portal event from the handle_action method in the feeder class.

It works so far, but On refresh of the component list, there is no possibility to send an event.. and there is also no access to the handle action method. therefore the LOS is lost after refresh, but the last

displayed UI element (related to the lastly selected row) remains visible -> leads to inconcistency.

The Elements I want to display on LOSs are error and result messages (self implemented in addition to the message area, to display results of asynchronous actions), therefore they should be displayed on the top of the window and not in the details view.

kind regards,

Sahla

arjun_thakur
Active Contributor
0 Kudos

Hi,

I guess you must be controlling visiblity of the view with the help of an attribute of WDUI_VISIBILITY type bound to the visible property of the view. To know the status of visibility, just read that attribute. If the vallue is '02', it is visible and if is '01' it is invisible.

Regards

Arjun

Former Member
0 Kudos

Hi,

Thanks for answering.

Unfortunately, I am not controlling the visibility.

The view ( I would like to get the visibility information)

is only UI modeled by me. It implements an intrface which define the behaviour on entering the view.

Visibility is controlled by the surrounding framework (POWL).

When a row in the table is selected the view appears, when no row is selected it disappears.

I have UI elements which cannot be implemented within this view, should have eventhough the same behaviour and disappear when no row is selected.

When the view disappears the function WDDOMODIFY is called. But it is also called when it appears.

I would liketo exactly know when it is disappearing to trigger the desired event.

kind regards,

Sahla

Former Member
0 Kudos

Hi,

I think In the table they might be using the Popins like row/cell/table popin. It is not a seperate view I guess.

If It is a seperate view then check if there are 2windows where same view is embedded in both.

Regards,

Lekha.