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

ALV Grid Filter it_filter

Former Member
0 Likes
2,566

Hi Experts.

Filter is not working. Giving DUMP "Unable to interpret '*' as number".

I am trying not to show 0.00 values in ALV for field 'OPEN_BAL'.

My code

 
  ls_filter-fieldname = 'OPEN_BAL'.  " *Is a Currency Field of TYPE umxxs* 
  ls_filter-tabname = 'GT_AR_FINAL_TABLE'. 
  ls_filter-sign0 = 'I'. 
  ls_filter-optio = 'NE'. 
  ls_filter-valuf_int = '0'. 
  APPEND ls_filter TO lt_filter. 

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
    EXPORTING 
      i_callback_program      = sy-cprog 
      i_callback_user_command = 'USER_COMMAND' 
      i_callback_top_of_page  = 'TOP_OF_PAGE' 
      is_layout               = ls_struct_layout 
      it_fieldcat             = gt_fieldcat[] 
      i_save                  = 'A' 
      it_events               = gt_events 
      it_filter               = lt_filter[] 
    TABLES 
      t_outtab                = gt_ar_final_table 
    EXCEPTIONS 
      program_error           = 1 
      OTHERS                  = 2. 

Not sure why. When i debug the DUMP i can see I and NE in the selopt table but then low value has * init.....Not sure why.

Any Ideas.

Regards,

Sharat Chandra.

17 REPLIES 17
Read only

Former Member
0 Likes
1,994

Instead of ls_filter-valuf_int = '0' use ls_filter-valuf_int = 0. Here remove single cote.

.

Read only

0 Likes
1,994

Hello Gunasekhar,

Tried that ...no luck....

Sharat

Edited by: Sharat Chandra on Dec 17, 2008 2:35 PM

Read only

MarcinPciak
Active Contributor
0 Likes
1,994

Hi Sharat,

Try giving up this line at all.

ls_filter-valuf_int = '0'.

It would mean: filter the values where NE empty. Assuming OPEN_BAL is an amount field, empty would be by default set to 0, therefore it should work.

Hope it will help you

Marcin

Read only

0 Likes
1,994

Hello Marcin Pciak

No Luck here also.

Can you let me know what else do i have to take care before doing a filter.

Regards

Sharat

Read only

MarcinPciak
Active Contributor
0 Likes
1,994

Hi Sharat,

Maybe this will help:


ls_filter-valuf = '0.00'.
ls_filter-valuf_int = '0'.

Once again: what is the select options name, and what table GT_AR_FINAL_TABLE has data in?

Marcin

Read only

0 Likes
1,994

Hello Marcin Pciak,

 
ls_filter-valuf = '0.00'. 
ls_filter-valuf_int = '0'. " *No luck here Still giving me DUMP* 

What select options name do u want?

GT_AR_FINAL_TABLE has two charactor field and 6currency field.

i need that if first currency field is 0.00 then don't show that row at all.

Regards

Sharat,

Read only

Former Member
0 Likes
1,994

Any Clues plz...

thanks

Sharat

Edited by: Sharat Chandra on Dec 17, 2008 4:52 PM

Read only

0 Likes
1,994

Note 1159560 - ALV filter: Incorrect length in filter dialog box

The correction also applies to your case.

Read only

0 Likes
1,994

Hi Sandra Rossi,

Can you please explain.

if you can, plz send me a simple filter program in ALV. It will help me a lot.

Thank you in advance.

Regards

Sharat Chandra

Read only

0 Likes
1,994

apply this sap note to correct the bug (be sure that it applies to your current sap release/patch). There is also another sap note, check by yourself if it is needed, and tell us if it works.

I found this note because I have the same bug in release 7.0, and I debugged where was the problem and found that this correction will probably help (in fact, the number is right-aligned by SAP at 45 characters, but is then truncated to 39 and SAP loses the "0" value and replaces it by "*" because of some dark reasons...)

Your program is correct

Read only

0 Likes
1,994

Ooppss!!............thats very very bad news......

Is there any alternative you found for that. If yes, please let me know.

And thanks very much from stopping break my head.

Cheers,

Sharat Chandra

Read only

0 Likes
1,994

why bad news? just apply the correction, that's all. Do you know how to do it?

Read only

0 Likes
1,994

Bad news is i dont know....

Can you help me how to....

Thanks

Sharat

Read only

0 Likes
1,994

To apply a note, ask the administrator. They will use SNOTE transaction, to download the note and apply it (one button to do it automatically). If this note does not apply to your current release, the admins will tell you. If this notes requires other notes, the admins will apply them (normally they should inform you). It takes 10 minutes.

Good luck.

Read only

0 Likes
1,994

Hi Sandra Rossi ,

Can you please send the note number to solve this porblem

Thanks

Sharat

Read only

0 Likes
1,994

refer to my answer [here|;

Read only

0 Likes
1,994

Hi Sharat,

Even I am facing the same problem that you described above. You have marked this question as "Answered".

So can you share what solution did you apply to get rid of this dump? Did you implement the SAP Note which Sandra was talking about?

Appreciate if you could reply.

Thank you.

Regards,

Sud.