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

Type conversion at batch

Former Member
0 Likes
665

Hi,

I have a problem in type conversion at batch.

I am declaring a char variable(hsl2(20).) to hold the currency value, but at sm35(while processing the session created)

I am facing a problem as:

Assume that itab-hsl eq 100;

then

hsl2 = itab-hsl. "itab-hsl = 100.

PERFORM bdc_field USING tran HSL2.

But What I see is : 10000, it puts two more zeros at the end of the number. What is the problem?

Thanks.

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
642

hi Deniz,

instead of

hsl2 = itab-hsl

you should use:

WRITE itab-hsl TO hsl2 CURRENCY ...

(and you mention the currency)

hope this helps

ec

3 REPLIES 3
Read only

Former Member
0 Likes
642

Hi,

Can you check any other currency is referred for the values.

because for JPY 2 more zeros will be added in the last.

Read only

Former Member
0 Likes
642
REPORT  ZTEST_CONVER.

data: val(20).

data: quan(10) type p decimals 0.

quan = 100.

val = quan.

write val.

Show the Declaration of ITAB-HSL ?

check what is the value in ITAB-HSL in Debug mode.

and I am getting 100 only. Check it once.

Read only

JozsefSzikszai
Active Contributor
0 Likes
643

hi Deniz,

instead of

hsl2 = itab-hsl

you should use:

WRITE itab-hsl TO hsl2 CURRENCY ...

(and you mention the currency)

hope this helps

ec