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

-ve value

Former Member
0 Likes
744

Hi,

I am getting the vlaue like this(59.00-).

Now i want to convert like this (-59.0).

please let me know how i can convert this.

thanks in advance.

vij.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

Hello,

You could:


CONCATENATE '-' zpayment INTO zpayment.
CONDENSE zpayment NO-GAPS.
SHIFT zpayment RIGHT DELETING TRAILING space.

On the other hand, you could do the calculation before moving the amount to zpayment.

Or use the FM

<b>CLOI_PUT_SIGN_IN_FRONT</b>

VAsanth

6 REPLIES 6
Read only

Former Member
0 Likes
717

Hi,

Use Shift Circular.

Try This,

DATA: T TYPE F VALUE '56.00-',

NUM LIKE T.

NUM = T.

SHIFT NUM BY 1 PLACE CIRCULAR.

WRITE / NUM.

Regards,

Padmam.

Read only

Former Member
0 Likes
717

well in SAP-Script the solution is:

&value(<)&

Message was edited by:

Florian Kemmer

Read only

Former Member
0 Likes
717

hi ..

u can use the <b>SHIFT</b> statement..

for example:

<b>shift string by 1 places circular.</b>

Thnks Ashu

Read only

kiran_k8
Active Contributor
0 Likes
717

Viji,

CLOI_PUT_SIGN_IN_FRONT.You can use this Fn Module.

K.Kiran.

Read only

Former Member
0 Likes
718

Hello,

You could:


CONCATENATE '-' zpayment INTO zpayment.
CONDENSE zpayment NO-GAPS.
SHIFT zpayment RIGHT DELETING TRAILING space.

On the other hand, you could do the calculation before moving the amount to zpayment.

Or use the FM

<b>CLOI_PUT_SIGN_IN_FRONT</b>

VAsanth

Read only

Former Member
0 Likes
717

Hi friend ....

before passing it to the fields catalog append please use this finction module and tehn pass to fields cataol and appned it

suppose you pass 105.00- the o/p is -105.00

Fm -.

CLOI_PUT_SIGN_IN_FRONT

 fc_tmp-reptext_ddic    = 'Price'.
  fc_tmp-fieldname  = 'STPRS'.
  fc_tmp-tabname   = 'IMARA'.
  fc_tmp-datatype  = 'CURR'.
  fc_tmp-just       = 'R'.
  fc_tmp-outputlen  = '15'.
  fc_tmp-decimals_out   = '2'.
  fc_tmp-col_pos    = 4.
  fc_tmp-do_sum     = 'X'.
 
CLOI_PUT_SIGN_IN_FRONT   
changing
    value         = imara-stprs.
          .
modify imara.
.

so that you problen will be solved ....

if data has Minus END ...IT WILL BE DISPLAYED IN FRONT .... if no minus then no minus in Display ..

reward points if it is usefull ...

Girish