Application Development 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: 

Multiply problem

Former Member
0 Kudos
110

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

Former Member
0 Kudos
71

What are the datatypes for these 2 variables?

former_member156446
Active Contributor
0 Kudos
71

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.

0 Kudos
71

lv_1 QUAN 13 3

lv_2 CURR 11 2

matt
Active Contributor
0 Kudos
71

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

matt

Former Member
0 Kudos
71

Compute BDC overflow dump

Former Member
0 Kudos
71

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

-Pavan

0 Kudos
71

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> .

matt
Active Contributor
0 Kudos
71

Field symbols? How does that help?

Try [this solution already suggested.|]

matt

matt
Active Contributor
0 Kudos
71

Then your lv_1 is not defined as long enough.

Try DATA: lv_1 type P length 16 decimals 3.

matt

Former Member
0 Kudos
71

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.