Skip to Content
0
Former Member
Sep 22, 2008 at 05:18 AM

Module pool-Position button

27 Views

Hi Champs,

I have tried to create position button in module pool like we have in NACE, wherein user doesnt have to scroll all the way into the Table COntrol to search for an entry. On the basis of the primary key which is Plant & Date he is able to go to that record.

But i have a small problem here.

The code i have written is:

MODULE position OUTPUT.

IF flag = 1.

DATA: f(25) TYPE c.

f = 'ITAB_PRODC-PLANT'.

tabctrl-v_scroll = 'X'.

tabctrl-current_line = tab.

SET CURSOR FIELD f LINE tab OFFSET 0.

CLEAR flag.

CLEAR tab.

ENDIF.

SET PF-STATUS 'ZCHNGENTRY'.

This works, but it takes me only to the entry which is visible in the table control. In case if I search for an entry for which we have to scroll down, 'SET CURSOR' doesnt auto-scroll into the table control and take me to that entry.

Plz help.

Thanx in advance,

Amit