cancel
Showing results for 
Search instead for 
Did you mean: 

Capture WebDynpro Events in WDOMODIFYVIEW

Shivesh
Advisor
Advisor
0 Kudos

Hi Guru's,

I want to capture Event In WDOMODIFYVIEW for setting Visibilty for a Table. But in WDOMODIFYVIEW, WD_EVENT does not work. Kindly Guide for this.

Accepted Solutions (0)

Answers (1)

Answers (1)

marcin_cholewczuk
Active Contributor
0 Kudos

Hi Shivesh,

I don't quite understand what you mean. You want to capture event in WDOMODIFYVIEW? What event?

If you mean changing visibility of Table you should use context (bind context attribute to 'Visibility' property of table and change this attribute), but in my opinion to do this you shouln't use wddomodifyview().

According to SAP

wddomodifyview() is used for dynamic changes of the UI element hierarchy

so this is not your case.

Best regards

Marcin Cholewczuk

Shivesh
Advisor
Advisor
0 Kudos

Hi,

Actually I need to get the Event like Row seletion or button(on_action) in Modify VIew, based on tht condition have to do some Table Visibility Operation. So I need to capture Event in ModifyView. I hope, I am Clear.

Former Member
0 Kudos

There are events for Row selection as OnLeadSelect and Button (OnAction) for that table you can code it here for visiblity of table by using a context attribute wdui_visibilty and bind it to the visibility of table. Now in those actions try to set the value as 01 or 02 for visibilty. No need of Modifyview as there are already events available.

Shivesh
Advisor
Advisor
0 Kudos

Hi, See I am enhancing a standard Webdynpro component, in that Thr is 1 table, based on the selection, I have to view a table in bottom which is enhanced by me. Thn if a user change the selection in Standard Table, then my table view should not be visible. And the Table Enhanced is only viewed when a enhanced button is clicked... Am i able to make you understand.

Former Member
0 Kudos

"Thn if a user change the selection in Standard Table," can you the relevant event is subsrcibed for this table or not.

If yes, go to that method and check for enhamcenets and modify the code. But inoder to hide the vcustom table you need to either have the table reference in Modify view or using the context attribute and bind the visibilty property of your table to this and code it in that method.

saravanan_narayanan
Active Contributor
0 Kudos

Hello Shivesh,

proceed like the following

1. create an action say table_lead_select in the action tab

2. create a post exit method for wdmodifyview and access the standard table ui element from the VIEW parameter and set the on_lead_select event handler by calling SET_ON_LEAD_SELECT

3. create a context attribute of type WDUI_VISIBILITY

4. bind this attribute to the newly created table UI element's visible property

5. in the event handler method (table_lead_select ) set this visiblity property

hope this helps.

BR, Saravanan

Shivesh
Advisor
Advisor
0 Kudos

Hi,

You are correct, but standard table have a option with Multi-Row Selector. And when I try select a Row using Ctrl then the lead selection Event is not triggered. And one more thing they are using cl_wd_table. So, now main problem is that whn user select a row using CTRL, I am unable to Capture the Event for That.

saravanan_narayanan
Active Contributor
0 Kudos

Hello shivesh,

In this case you can go for OnSelect event instead of Lead select.

BR, Saravanan

Shivesh
Advisor
Advisor
0 Kudos

Thanks Guru's. For your responses but as it standard Table Control. I cannot write a Event in ON_Select. And, I am trying for another alternative... Thanks...

Former Member
0 Kudos

Dear Ranjan,

I will just give a try, not so good workaround.

Hide the standard Table UI, Enhance the view layout with coping the standard Table UI.

Now you can change the visibility of this Table UI as you require.

Hope it helps!

Warm regards,

Upendra Agrawal.