Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Filter Option in Table Control

Former Member
0 Likes
1,093

Hi,

I have a new requirement to implement the filter option in table control .

Can any body having sample code or having any idea. Please give suggestions how to implement this.

Regards

Venkatesh P

Hi,

I have a new requirement to implement the filter option in table control .

Can any body having sample code or having any idea. Please give suggestions how to implement this.

Regards

Venkatesh P

3 REPLIES 3
Read only

Former Member
0 Likes
753

Hi,

Check the below thread

Also Check this for more info

in the above thread you can find a value in Table Control.

1)now you need to take a Temp ITAB and hold all the Values temporarily

2)Based on the Filter Value you need to delete other records from the Table Control and need to display only these Filterd recoreds. Make sure your original data should not get deleted at any cost.

But this is Very simple if you use ALV Grid, i think so

Cheerz

Ram

Read only

0 Likes
753

hi,

we have done coding like below : But POP up is not coming from 2nd FM. Please help on this.

DATA : cp_vbak LIKE it_vbak OCCURS 0.

DATA : it_fieldcat1 TYPE lvc_t_fcat,

wa_fieldcat LIKE line of it_fieldcat1,

it_group1 like lvc_s_sgrp occurs 0,

ls_group LIKE lvc_s_sgrp,

filter_ranges TYPE lvc_t_filt.

DATA: counter TYPE i.

counter = counter + 1.

wa_fieldcat-col_pos = counter.

wa_fieldcat-fieldname = 'VBELN'.

wa_fieldcat-tabname = 'IT_VBAK'.

APPEND wa_fieldcat TO it_fieldcat1.

CLEAR wa_fieldcat.

counter = counter + 1.

wa_fieldcat-col_pos = counter.

wa_fieldcat-fieldname = 'VKORG'.

wa_fieldcat-tabname = 'IT_VBAK'.

APPEND wa_fieldcat TO it_fieldcat1.

CLEAR wa_fieldcat.

counter = counter + 1.

wa_fieldcat-col_pos = counter.

wa_fieldcat-fieldname = 'VTWEG'.

wa_fieldcat-tabname = 'IT_VBAK'.

APPEND wa_fieldcat TO it_fieldcat1.

CLEAR wa_fieldcat.

counter = counter + 1.

wa_fieldcat-col_pos = counter.

wa_fieldcat-fieldname = 'SPART'.

wa_fieldcat-tabname = 'IT_VBAK'.

APPEND wa_fieldcat TO it_fieldcat1.

CLEAR wa_fieldcat.

ls_group-SP_GROUP = '0001'.

ls_group-TEXT = 'VBELN'.

append ls_group to it_group1.

clear ls_group.

ls_group-SP_GROUP = '0002'.

ls_group-TEXT = 'VKORG'.

append ls_group to it_group1.

cp_vbak[] = it_vbak[].

CALL FUNCTION 'LVC_FILTER_DIALOG'

EXPORTING

it_fieldcat = it_fieldcat1

it_groups = it_group1

  • IS_FILT_LAYOUT =

  • I_NO_DIALOG =

  • IT_EXCEPT_QINFO =

tables

it_data = it_vbak

CHANGING

ct_filter_lvc = filter_ranges

  • EXCEPTIONS

  • NO_CHANGE = 1

  • OTHERS = 2

.

IF sy-subrc 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*Need to code more for Filter the internal table

Regards

Venkatesh P

Read only

Former Member
0 Likes
753

This message was moderated.