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: 

move sign to left of quantity on alv grid with & stil total quantity column

Former Member
0 Kudos
749

Hi Guys,

Here is my problem.. I have a column on my alv grid that is signed. I want the sign to appear to the left of the number.

This column needs to be totalled so I can't use the function module CLOI_PUT_SIGN_IN_FRONT. I've also tried (as per forum thread) having the field type as TABHIST-DELRATE but this rounds the values and the sign is still on the wrong side.

Any ideas would be gratefully received..

Regards,

Liz.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos
465

Hi,

If you need to output with sign in left position you can fill the field 'EDIT_MASK' in the fieldcatalog.

Example : in this manner 'V___,__'.

11 REPLIES 11

former_member194669
Active Contributor
0 Kudos
466

Hi,

If you need to output with sign in left position you can fill the field 'EDIT_MASK' in the fieldcatalog.

Example : in this manner 'V___,__'.

0 Kudos
465

Hey,

Thanks for the response. As i'm very new to abap, would you mind giving me an example?

Thanks in advance,

Liz

0 Kudos
465

Hello,

YOu can do like this.


When filling the field catalog of the field just add this one
wa_fieldcat-edit_mask = 'V___,__'.

Hope this will helps you.

Vasanth

0 Kudos
465

Hi,

Here is the link

https://forums.sdn.sap.com/search.jspa?threadID=&q=signANDedit_maskANDalv&objID=f50&dateRange=all&numResults=15

0 Kudos
465

Thanks again for the response.

Have tried it with the edit_mask and while it does output the sign on the left, it screws up the coma's and decimal point position in the number.

It also screws up my date.

If you can think of anything else, i'd be most grateful.

Thanks again

0 Kudos
465

I think first you need to read

1. USR01-DCPFM for user default decimals values, by giving user sy-uname then go to

2. DDVAL giving USR01 & DCPFM you will get domain values

if domain values X or Y or space arrange the EDIT_MASK accordingly and pass to field catalog.

( Here you can also use fm DOMAIN_VALUE_GET)

May this will you out.

0 Kudos
465

Hey,

Thanks again for the response. I think I may have mislead you ... what i meant about the coma's and decimals being screwed up is that for example when i use the edit_mask the number 42,478.57 is output as 424.7857 which is a huge difference.

maybe i'm the one who misunderstood, as i said i'm very new to this....

Liz

Former Member
0 Kudos
465

Liz,

Where ever you are passing that value to final internal table ther use

FM CLOI_PUT_SIGN_IN_FRONT and move converted value to final internal table.

Means before moving that value to final internal table change that value by given FM and move to internal table.

0 Kudos
465

Hey,

I can't use that FM as i need to be able to sum the values and i cant sum a char field.

not sure where to go from here.........

Thanks.

Liz

0 Kudos
465

Hi

Liz,

Did you find any resolution for your problem??

Even I am facing the same issue. Do let me know how you resolved it.

Everyone

Do let know if anyone has resolved this issue previously....

Thanks

Debs

Former Member
0 Kudos
465

In form fill_fields, put the following code:

if p_fieldname = 'MENGE'.

afield-edit_mask = 'RRV_________.___'. endif.