Application Development 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: 

ALV GRID Filter

Former Member
0 Kudos
389

Hi ,

i have a bug in the ALV grid , The functionality of the filter is not wroking with few fields on the ALV grid , is there any way to check why its not working with only few fields .

Thanks,

Vind.

5 REPLIES 5

Former Member
0 Kudos
135

Hi Vind,

Hope the below links help you:

http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5533cd30911d2b467006094192fe3/content.htm

Hope the below threads help you:

REUSE_ALV_GRID_DISPLAY - Output of a simple list (single-line)

SDN - Reference for Using REUSE_ALV_GRID_DISPLAY - Basic Program

SDN - Reference for Use of IT_FILTER in REUSE_ALV_GRID_DISPLAY

SDN - Reference for use of IT_FILTER with CODE in REUSE_ALV_GRID_DISPLAY

SDN - Refernce for Using IT_ALV_GRAPHICS in REUSE_ALV_GRID_DISPLAY

SDN - Reference for Editing a graph in ALV (IT_ALV_GRAPHICS) using REUSE_ALV_GRID_DISPLAY

SDN - Reference for use of IT_HYPERLINK in REUSE_ALV_GRID_DISPLAY

SDN - Reference including example of IT_ADD_FIELDCAT in REUSE_ALV_GRID_DISPLAY

SDN - Reference for scenario for use of IT_EXCEPT_QINFO in REUSE_ALV_GRID_DISPLAY

SDN - Reference for application example of IT_EXCEPT_QINFO in REUSE_ALV_GRID_DISPLAY

Have A Good Day

Chaitanya.

former_member188685
Active Contributor
0 Kudos
135

Yes we can check. What are those fields. are those Currency and Quantity fields. If so you need to give the additional information to the fieldcatalog for those fields like REF Table and Ref field etc.

former_member188685
Active Contributor
0 Kudos
135

If the field is currency field, You need to have an extra field Currency key. and for this field you have to populate the Fieldcatalog.

clear w_fcat.
  w_fcat-cfieldname = 'WAERK'. "<==Currency key
  w_fcat-ctabname = 'T_ALV'.  <---internal table name
  w_fcat-tabname = 'T_ALV'.  "<--- internal table
  w_fcat-fieldname = 'NETWR'. "<----amount field
  w_fcat-ref_tabname = 'VBRP'. "<--- Ref table
  w_fcat-ref_fieldname = 'NETWR'. "<-----ref field
  w_fcat-decimals_out = 2.
  w_fcat-seltext_l = 'Amount'.
 
  APPEND w_fcat TO t_fcat.

if the field is Qty field, you need to have a field in the table with Qty Units (MIEINS) , and for this field also populate the fieldcatalog.

clear w_fcat.
  w_fcat-qfieldname = 'MEINS'. "<==Qty Unit
  w_fcat-qtabname = 'T_ALV'.  <---internal table name
  w_fcat-tabname = 'T_ALV'.  "<--- internal table
  w_fcat-fieldname = 'KWMENG'. "<----Qty field
  w_fcat-ref_tabname = 'VBAP'. "<--- Ref table
  w_fcat-ref_fieldname = 'KWMENG'. "<-----ref field
  w_fcat-decimals_out = 2.
  w_fcat-seltext_l = 'Qty'.
 
  APPEND w_fcat TO t_fcat.

Check after doing this...

Former Member
0 Kudos
135

Hi Vijay ,

The field displayed is a text ( Status Check ) like 'Delivered' , 'Not Delivered' etc .

Internal Table :

data : begin of itab_display occurs 0,

vbeln like vbap-vbeln,

posnr like vbap-posnr,

lfgsa like vbup-lfgsa,

lfimg like lips-lfimg,

kwmeng like vbap-kwmeng,

matnr like vbap-matnr,

matkl like vbap-matkl,

meins like vbap-meins,

delivery like vbap-vbeln,

delivery_item like vbfa-posnn,

aufnr like vbep-aufnr,

lfsta like vbup-lfsta,

lfsta_text like tvbst-bezei,

cmgst like vbuk-cmgst,

cmgst_text like tvbst-bezei,

end of itab_display.

Fields Cat. as below :

add 1 to i.

clear afield.

afield-col_pos = i.

afield-fieldname = 'LFSTA_TEXT'.

afield-ref_tabname = 'ITAB_DISPLAY'.

afield-ddictxt = 'L'.

afield-seltext_s = 'Delivery Status'.

afield-seltext_m = 'Delivery Status'.

afield-seltext_l = 'Delivery Status'.

afield-outputlen = '20'.

append afield to t_fieldcat.

Thanks,

vind.

Former Member
0 Kudos
135

Hi,

whilE building the fieldcatlog , add the lowErcase field as ''X'.

tHIS WILL SOLVE U R PROBLEM

Regards,

Rani