Skip to Content
0

How to shift Negative sign from Right to left in ALV if data type is P

Jan 15, 2017 at 07:25 PM

658

avatar image

Hi Experts,

I have a requirement to display '-' sign in left side of field value in ALV output, But the field refers to data type is Packed decimal. Earlier blogs are telling use data type char then it will work in this case we cannot use filter option for that column in ALV output, Any leads how to do this with refer to data type as a packed decimal.

Thanks,

10 |10000 characters needed characters left characters exceeded

Sorry there is a typo error, instead of filter we cannot apply summarize option for that column in ALV output.

0
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Raymond Giuseppi
Jan 16, 2017 at 07:17 AM
1

Did you try to add an EDIT_MASK in the field catalog? (Look for character "V" in USING EDIT MASK mask)

Regards,
Raymond

Share
10 |10000 characters needed characters left characters exceeded
Ajeet Kumar Jan 16, 2017 at 05:06 AM
0

Hi Ramesh,

Try this:

*******************************

data : lv_var1 type p VALUE '10-'.
data : lv_var2 type char5 .

lv_var2 = lv_var1.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
value = lv_var2
.

WRITE : lv_var2.

*******************************

Regards

Ajeet Kumar

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Jan 15, 2017 at 07:36 PM
0

See the following recent questions :


Use FM "CLOI_PUT_SIGN_IN_FRONT" to reposition the negative sign ...

Share
10 |10000 characters needed characters left characters exceeded
RAMESH SAHOO Jan 16, 2017 at 05:36 AM
0

Hi Ajeet,

Thanks for replying my post but what you are suggesting already i tried . That is not my requirement.

my requirement is need to put '-' sign symbol in left side of field value and that field is referring to data type P.

Thanks.

,

Hi Nic,

I saw your link's which was you sent, but there they are using char field for sign symbol, which i already mentioned in my post. Do you have any idea how to display '-' sign symbol in packed decimal field.

Thanks,

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Astafev Jan 16, 2017 at 10:31 AM
0

1) Create FM CONVERSION_EXIT_ZZZZZ_OUTPUT where you will call FM CLOI_PUT_SIGN_IN_FRONT to move sign to the left

2) Add edit mask for your column in ALV as ==ZZZZZ

Share
10 |10000 characters needed characters left characters exceeded
Suhas Saha
Jan 16, 2017 at 11:48 AM
0

Hello,

There's a string template formatting option which lets you position the SIGN. You don't need to use FM CLOI_PUT_SIGN_IN_FRONT.

BR,

Suhas

Share
10 |10000 characters needed characters left characters exceeded