Skip to Content
0
Former Member
Nov 11, 2010 at 09:40 AM

table control find button

960 Views

I had used find button in my screen painter. the below code is working fine when i give material number input.

my given material nuber matches with more number of records in my internal table but in my top of line of table control

its showing only one record. i want to display all records matches in order from top of line of table control

please provide me some solution.

code:

WHEN 'FIND'.

REFRESH tab.

clear ok_code.

TAB-TABNAME = 'MARA'.

TAB-FIELDNAME = 'MATNR'.

TAB-VALUE = ''.

APPEND TAB.

CALL FUNCTION 'POPUP_GET_VALUES'

EXPORTING

POPUP_TITLE = 'FIND'

START_COLUMN = '5'

START_ROW = '5'

TABLES

FIELDS = TAB.

LOOP AT TAB WHERE VALUE IS NOT INITIAL.

READ TABLE ITAB WITH KEY MATNR = TAB-VALUE.

IF SY-SUBRC = 0.

TBL_CTRL_0112-TOP_LINE = sy-tabix.

ENDIF.