cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Web Dynpro ALV: Event for Scrolling the ALV

Former Member
0 Kudos

Hi All,

I have an ALV which has around 10000 data. When I am scrolling the ALV vertically, everytime the method WDDOMODIFYVIEW gets executed.

I want to stop the WDDOMODIFYVIEW to be executed on scrolling . Is there any way to do it.

Is there any way from which I can get the action name in WDDOMODIFYVIEW so that i can stop the WDDOMODIFYVIEW to be executed on that action name.

Thanks

Kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

naresh_bammidi
Contributor
0 Kudos

Please ignore my previous post,that solution will work fine if you are using UI element table.But in case of alv there is no such event for scrolling.Scroll bars will come automatically when the table data is exceeding initial size of the table.To see list of events in ALV,open the WD component SALV_WD_TABLE and check out events tab in Component controller.

Thanks

Naresh Bammidi

naresh_bammidi
Contributor
0 Kudos

Hi,

Do you want to stop executing the code which is in MODIFY_VIEW?If yes use the parameter FIRST_TIME .But you can not top executing the method modify_view.

method WDDOmodifyview.

if first_time = 'X'.

* write your code here

endif.

endmehtod.

So Above code will be executed only once.

Thanks

Naresh Bammidi

Former Member
0 Kudos

Hi Naresh,

I know about the parameter First_time that is available in  WDDOMODIFYVIEW.

My requirement is that there is already the some code written in  WDDOMODIFYVIEW,and on scrolling the  WDDOMODIFYVIEW always gets exectued and so is the code.

I want that I can get the Action name so that I can put my code in the condition i.e.

Method WDDOMODIFYVIEW

if Action NE Scroll

......

.....

*code

.....

endif.

End Method

In this way my  WDDOMODIFYVIEW would be executed on condition .

Thanks

Kumar

naresh_bammidi
Contributor
0 Kudos

In table UI properties there is a event Onscroll.Create one event handler method for that.

Create one global attribute(G_ENAME) in component controller for storing the event name

* inside event handler capture the event name when we scroll

lv_evname = wdevent->get_name( ).

* Assign the event name to the above global attribute

g_compcontroller->G_ENAME = lv_evname.

* In modify view check the event name

if G_ENAME = '<captured_event_name>'.

endif.

I hope it may help full

Thanks

Naresh Bammidi

sahai
Contributor
0 Kudos

Hi,

You can take help of the parameter First_time.... you can put your code in an if else endif code as below.

If FIRST_TIME = 'X'.

* code

endif.

This will ensure that the code written in the modify view will be executed based on the value of first_time.

Thanks and Regards,

Shitanshu Sahai