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

conversion routine

Former Member
0 Likes
425

hi,

I have fetched 2 fields from db tables into my int.table by declaring same type.

output :1. 5,00000- (data tye: decimal length 10)

2. 3,00 (data type: decimal length 2)

actually these fields specifies no.of days.

so the display format should be like -5 , 3 , 3.5, 50 like.....

could anybody plz tell me how to declare ,convert and display?

helpful answers would be rewarded.

best regards.

venkat

2 REPLIES 2
Read only

Former Member
0 Likes
397

Hi,

You can move the negative symbol '-' to the left side by using the function module CLOI_PUT_SIGN_IN_FRONT.

You can remove the zeroes by using the SHIFT statement.

SHIFT w_variable RIGHT DELETING TRAILING '0'.

Regards,

Imran.

Read only

Former Member
0 Likes
397

Hi venkat,

Try this.

declare the output field as T5PA3-NODAY

then assign value to this field eg,

data lv_no_of_days like T5PA3-NODAY.

lv_no_of_days = 'your field having this value'.

For the - sign to display in front of the value use this FM -CLOI_PUT_SIGN_IN_FRONT

just try where used list and see how to use this FM

Hope this helps

Cheers

Kothand