cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Forms

Former Member
0 Kudos

hi all,

after passing through a function module i m getting a variable v_flash which is charc type , its value is coming 25.00-C n i want it to be as -25.00C at output

how can i do that .

himanshu sharma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

after using this CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

sign is coming in front but the this is 25.00-*C is changed to -25.00 and the *C is not coming so how to bring that .

himanshu sharma

Former Member
0 Kudos

Try this code after getting the v_flash value from FM.

-


******************----


data text1(10) type c.

search v_flash for '-'.

if sy-subrc = 0 and sy-fdpos <> 0.

split v_flash at '-' into v_flash text1.

condense v_flash.

condense text1.

concatenate '-' v_flash text1 into v_flash.

else.

condense v_flash.

endif.

-


*****************----


If this solves ur query kindly close the thread and award points.

Cheers

Shafiq

Answers (4)

Answers (4)

former_member196280
Active Contributor
0 Kudos

Usually program symbols with numeric values can have leading sign.

Not sure it works on character fields or not. Since it is a numeric value try like this..

v_flash& --> 1000-

&v_flash(<)& --> -1000

OR

I guess this can be done by adding program lines in your Sf and using FM 'CLOI_PUT_SIGN_IN_FRONT'

Regards,

SaiRam

Former Member
0 Kudos

Hi Sharma,

Yes, as per the above solutions we can move.

Reply for queries.

Regards,

Kumar.

Former Member
0 Kudos

hi,

Use the following function module for u r requirement

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

value = gv_temp_var1.

Regards,

Sankar

Former Member
0 Kudos

Hi,

Afetr getting the value..

Use this code..

v_amount = neg_value.

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

CHANGING

VALUE = v_amount.

write v_amount.

Reward if it helps..

Regards,

Omkar.