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 on ALV

Former Member
0 Likes
3,538

When i use filter for character fields on ALV, the data is not populating without leading zeros.

How to eliminate the leading zeros to work for the filter.

-Vinod

When i use filter for character fields on ALV, the data is not populating without leading zeros.

How to eliminate the leading zeros to work for the filter.

-Vinod

11 REPLIES 11
Read only

Former Member
0 Likes
3,121

Hi,

You can use FM CONVERSION_EXIT_ALPHA_OUTPUT.

Best regards,

Prashant

Read only

0 Likes
3,121

This filter(which is like a tunnel icon) is related to field catalog in ALV. Is there any parameter to pass to supress leading zeros to the field catalog so that i can get the selected data thru filter.

Read only

0 Likes
3,121

it_fieldcat-lzero = "".

if this is 'X', then leading zeroes will be displayed , but this is applicable only for NUMC

if solved pls reward points

Message was edited by: chandrasekhar jagarlamudi

Read only

0 Likes
3,121

Is there any method for character type.

Read only

0 Likes
3,121

i dont think it is there

may be u can do like this

it_fieldcat-inttype = 'NUM'.

it_fieldcat-lzero = ''.

Read only

0 Likes
3,121

I need only for character fields...

Read only

0 Likes
3,121

U can use the field type as <b>NUMC</b>.

This will work out. make a try.

Kindly reward points if u find the answers are helpful.

Read only

Former Member
0 Likes
3,121

Hi ,

I have an ALV report which gives me short dump when I filter any of the 'P' type field. I tried to implement sap note 839839 in debug mode but in vain. Should I implement this note first and then check the chnage?

the short dump error "..........

Error in ASSIGN: Memory protection error.

The current program "SAPLSSEL " uses the ASSIGN statement.

However, the offset of the segment (20208) plus the length (69)

is greater than the length of the segment (20264).

This is not allowed.

If the error is in one of your own ABAP programs or an SAP program that

you have modified, try to correct it.

Reduce the offset and/or length that you are using.

If the error occurred in a non-modified SAP program, you may be

able to find a solution in the SAP note system.

If you have access to the note system yourself, use the following

search criteria:

"ASSIGN_OFFSET+LENGTH_TOOLARGE"

"SAPLSSEL " or "LSSELFDI "

"FILL_DYN_FROM_FIELD_SEL" ........."

I appreciate ur inputs.

thanks in advance,

regards,

shan

Read only

Former Member
0 Likes
3,121

Hi vinod,

1. usually this does not happen,

if we have defined the field in the internal table

like

<b> matnr like mara-matnr.</b>

2. The ZEROES are automatically taken care of.

3. ie. if there is a material number

with

0000000000000023

and in FILTER if we just enter

23,

it will show that material.

4. I just tried it with a sample program.

U can just copy paste and get a feel of it.

5.

REPORT ZTRN_ALV.

*----


type-pools : slis.

*----


Data Declaration

data : fc type SLIS_T_FIELDCAT_ALV.

data : begin of itab occurs 0.

include structure mara.

data : end of itab.

*----


Start of Selection

select *

from mara

into table itab

package size 500

where matnr like '0%'.

endselect.

*----


field catalogue

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = sy-repid

I_INTERNAL_TABNAME = 'ITAB'

I_INCLNAME = sy-repid

CHANGING

CT_FIELDCAT = fc

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

*----


CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

IT_FIELDCAT = fc

TABLES

T_OUTTAB = itab

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

regards,

amit m.

Read only

Former Member
0 Likes
3,121

Hi,

You can use the keyword SHIFT fieldname DELETING LEADIN '0'.

This works for datatype C, N, D, T and CHAR, NUMC etc.

Regards,

Arun S

Read only

Weiwei_z
Newcomer
0 Likes
3,092

when the fieldcatalog-no_zero is set to X, the field is displayed without leading zeros, but in the filter you must input leading zeros; the other way around, if it is not set, the field is displayed with leading zeros, but in the filter you don't have to input leading zeros. very strange setting.