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

Table Maintenance generator - add filter

Former Member
0 Likes
4,239

Hi,

I have a requirement where i have to add filter on the table maintenance generator screen of a Z table.

Now i added a text box.

But how do i apply the filter?

AS in...when i go to the maintenance screen through the tcode i get the entire data of the table. now after i put the filter i just want that specific data.

what i dont get is...which internal table is getting populated to update the screen fields?

I have written the query mention below:

  CASE sy-ucomm.
    WHEN 'FILT'.
      if GD_MATNR is NOT INITIAL.
      SELECT * FROM ZFI_ECC_PROC
        INTO CORRESPONDING FIELDS OF TABLE internal_table
        WHERE matnr = gd_matnr.
      ENDSELECT.
      ENDIF.
  ENDCASE.

what should come in place of internal_table

Please help.

Regards,

Shraddha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,806

Hi

There's just the standard filter: why do you need to replicate it?

Max

Hi,

I have a requirement where i have to add filter on the table maintenance generator screen of a Z table.

Now i added a text box.

But how do i apply the filter?

AS in...when i go to the maintenance screen through the tcode i get the entire data of the table. now after i put the filter i just want that specific data.

what i dont get is...which internal table is getting populated to update the screen fields?

I have written the query mention below:

  CASE sy-ucomm.
    WHEN 'FILT'.
      if GD_MATNR is NOT INITIAL.
      SELECT * FROM ZFI_ECC_PROC
        INTO CORRESPONDING FIELDS OF TABLE internal_table
        WHERE matnr = gd_matnr.
      ENDSELECT.
      ENDIF.
  ENDCASE.

what should come in place of internal_table

Please help.

Regards,

Shraddha

9 REPLIES 9
Read only

Former Member
0 Likes
2,807

Hi

There's just the standard filter: why do you need to replicate it?

Max

Read only

0 Likes
2,806

Oh ok ok...under Selection...got it got it...thanx a lot

Read only

0 Likes
2,806

But is there a way to get the same on the screen, instead of going under the Selection tab?

regards,

Read only

ThomasZloch
Active Contributor
0 Likes
2,806

You might also be able to work with the subset functionality for views. Create a maintenance view for your Z-table, mark e.g. the MATNR field with "S" (subset), and generate the maintenance dialog for the maintenance view, not the table. When entering through SM30, you will be asked to enter selections (i.e. filter).

Thomas

Read only

0 Likes
2,806

Yes

Thomas has said all could be said

If you want to open a selection screen as soon as the maintenance dialog is called you need to manage the subset

Max

Read only

0 Likes
2,806

hi,

Actually i wanted a button on the screen which could perform the same function as standard filter under Selection. So i added a button and under its functionality i called Perform SUCHEN.

This calls the filter functionality which is under Selection.

This solved my problem.

Thanx anyways

Regards

Read only

0 Likes
2,806

Hi Shraddha,

We have similar requirement, can you please let me know how can we get the code for form SUCHEN and what is the form for sort button.

Please let me know how you are able to add the code for filter button which works exactly as ALV filter button.

Thanks and Regards,

Umesh J D

Read only

0 Likes
2,806

Hi,

When i created the table maintenance generator i just call form SUCHEN under the functioning of a button i added on the screen.

This perform takes care of sort and filter.

Regards,

Read only

0 Likes
2,806

Hi Shraddha,

Thanks for reply. I need to add filter and sort buttons similar to ALV buttons in SM30. These buttons should work as alv buttons.

Please let me know how to achieve this.

Thanks and Regards,

Umesh J D

Edited by: JDumesh on Sep 7, 2011 4:24 PM