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

Leading sign problem

Former Member
0 Likes
1,298

Hi,

The negative sign of a currency field is being displayed at the end of the value ( i.e at thr right side of the value). I want it at the left, i.e at the begining of the value.. how do i get it ???

<b>i dont want to convert it into a character type..</b>

B'coz i have to download data into Excel. So that all numeric fields should appear

with sign(left side).otherwise excel treats as char field.

regards,

leoiz

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,002

Hi leoiz,

an other way for you is the edit mask option of the WRITE command;


  data:
    lv_price                              TYPE bseg-dmbtr VALUE '123.45-',
    lv_price2                             TYPE bseg-dmbtr VALUE '123.45'.

  WRITE:
    / lv_price  USING EDIT MASK 'RRV__________.__',
    / lv_price2 USING EDIT MASK 'RRV__________.__'.

This will place the sign in front of the value.

Still I think you could use a smarter appoach exporting values to Excel: ALV excel inline grid, ALV calling external excel, OLE intergration with CALL METHOD OF EXCEL and so on.

But just for the purpose of placing the sign, the edit mask should be OK.

Regards,

Clemens

Hi,

The negative sign of a currency field is being displayed at the end of the value ( i.e at thr right side of the value). I want it at the left, i.e at the begining of the value.. how do i get it ???

<b>i dont want to convert it into a character type..</b>

B'coz i have to download data into Excel. So that all numeric fields should appear

with sign(left side).otherwise excel treats as char field.

regards,

leoiz

5 REPLIES 5
Read only

Former Member
0 Likes
1,002

Hi,

Try using the FM CLOI_PUT_SIGN_IN_FRONT

Thanks,

Naren

Read only

Clemenss
Active Contributor
0 Likes
1,002

Hi leoiz,

display it as ALV grid and use the built-in ALV-Excel export.

Regards,

Clemens

Read only

Former Member
0 Likes
1,002

I have tried to convert char and again moved to currency format,still it takes right side sign.

I think it is not possible without converting char and do not move it to currency format,try to download with charcter only.

I tried function module but no luck ...

Thanks

Seshu

Read only

Clemenss
Active Contributor
0 Likes
1,003

Hi leoiz,

an other way for you is the edit mask option of the WRITE command;


  data:
    lv_price                              TYPE bseg-dmbtr VALUE '123.45-',
    lv_price2                             TYPE bseg-dmbtr VALUE '123.45'.

  WRITE:
    / lv_price  USING EDIT MASK 'RRV__________.__',
    / lv_price2 USING EDIT MASK 'RRV__________.__'.

This will place the sign in front of the value.

Still I think you could use a smarter appoach exporting values to Excel: ALV excel inline grid, ALV calling external excel, OLE intergration with CALL METHOD OF EXCEL and so on.

But just for the purpose of placing the sign, the edit mask should be OK.

Regards,

Clemens

Read only

0 Likes
1,002

Hi

use the FM CLOI_PUT_SIGN_IN_FRONT