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

Multiply problem

Former Member
0 Likes
915

Hi ;

I want to variabels one of 2 decimal and one of 3 decimal . lv_v1 = 25051.000 and lv_v2 = 1666.58 for example

lv_1 = lv_1 * lv_2 .Gives errror how can I fix this issue

10 REPLIES 10
Read only

Former Member
0 Likes
876

What are the datatypes for these 2 variables?

Read only

former_member156446
Active Contributor
0 Likes
876

data: lv_v1 type p decimals 3,

lv_v2 type p decimals 2.

lv_1 = lv_1 * lv_2

lv_1 will get the 3 decimals output.

Read only

0 Likes
876

lv_1 QUAN 13 3

lv_2 CURR 11 2

Read only

matt
Active Contributor
0 Likes
876

Can you give us a hint? What error do you get?

matt

Read only

Former Member
0 Likes
876

Compute BDC overflow dump

Read only

Former Member
0 Likes
876

Then it is overflow problem, in debug try to give some small values and test it.

-Pavan

Read only

0 Likes
876

why dont you try using fiels symbols.

<fs_1> quant

<fs_2> curr

assign: lv_1 to <fs_1> ,

lv_2 to <fs_2>.

<fs_1> = <fs_1> * <fs_2> .

Read only

matt
Active Contributor
0 Likes
876

Field symbols? How does that help?

Try [this solution already suggested.|]

matt

Read only

matt
Active Contributor
0 Likes
876

Then your lv_1 is not defined as long enough.

Try DATA: lv_1 type P length 16 decimals 3.

matt

Read only

Former Member
0 Likes
876

Hi,

You are getting memory overflow dump, try defining two variables of type fm_saldo.

I have faced similar kind of issue, I declared the variable of type fm_saldo and the issue was resolved.

Thanks,

Sriram Ponna.