Skip to Content
-1

Doubt in Packed Multiplication

Hi all,

Small Doubt in Packed type calculation.

DATA: lv_abc TYPE p LENGTH 8,
      lv_test TYPE TCURR-UKURS.


lv_test = '1.95583-'.
lv_abc = lv_test * 1000000.

in the above code for lv_abc i am getting value as '195583000000-'

my doubt is what is the calculation behind it

what my expectation is '1955830'

May i know the logic behind the above result

Regards,

kiran rachamalla.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 18, 2019 at 02:12 PM

    No, your program should calculate lv_abc = -1955830.

    OR

    Your program has not the attribute "fix point arithmetic" (possibly your code is in a program of SAP SD, which is known to not use "fix point arithmetic").

    Please select this program attribute (selected by default), or explain your problem.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.