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 sum problem

Former Member
0 Likes
1,193

Hello guys,

I have requirement like, need to sum a field called price in ALV grid. its type is dec(5,6). already maintained field catlog and checked  fieldcatalog-do_sum = 'X'. Its working fine but problem is , if the field is 00.00 then i need to set as 'NA'.

Thanks in advance

6 REPLIES 6
Read only

rajkumarnarasimman
Active Contributor
0 Likes
894

Hi Sangeetha,

  It is not possible for numeric/currency datatype. If required we can hide 00.00 value in the field, using field catalog attribute NO_ZERO = 'X'.

  If the field data type is character/string, it is possible to rename 00.00 -> NA, but if you do like that do_sum won't work, summation should be done manually.

Regards

Rajkumar Narasimman

Read only

SwadhinGhatuary
Active Contributor
0 Likes
894

Hi Sangeetha,

Welcome to SCN...

It is not possible .

Why-

If make loop in final table if field value initial and fill 'NA' first it gives dump as compatibility problem

second if change amount field to char so we change value to 'NA' then it failed at the time of  sum of field.

Hope this Will Help U

Read only

Former Member
0 Likes
894

Thanks guys.

yeah i tried with these things, by changing dec to char, it didnt work.i dont want to make it manually, any how we have option called do_sum in field catlog. so its like, maintain 2 fields in output structure and one ref field  for doing total sum calculation and other field for display purpose. is it possible in to make it ??

Read only

0 Likes
894

Hi Sangeetha,

Seems you can not do that. If you set that ref field as 'no_out', then it will not 'do_sum' action.

regards,

Archer

Read only

0 Likes
894

Ok thanks Dengyong...

Read only

Former Member
0 Likes
894

Hello,

i got the solution for this, i have used EDIT MASK in field catalog.

ls_fieldcat-edit_mask = '==ZRSCV'

ZRSCV is custom conversion exit name.

we can achieve by using this edit mask


if its helpful please reward the points.

Thanks