‎2008 Sep 23 3:33 AM
Hi
I hwve problem in the following code. I am trying to multiply IT_DETAIL-DMBTR (value is 10,000) to -1. But output is 0 instead of -10,000.
Pls help me
ELSEIF IT_DETAIL-BLART = 'SA' and IT_DETAIL-SHKZG = 'H'. " AND it_detail-sgtxt(2) = 'DR'.
IT_SUM-MACHINE = ( IT_DETAIL-DMBTR ) * ( -1 ).
‎2008 Sep 23 3:39 AM
Hello Kumar
Assuming that IT_SUM-MACHINE allows for negative values (do we know???) then you may try another calculation:
IT_SUM-MACHINE = 0.
IT_SUM-MACHINE = IT_SUM-MACHINE - IT_DETAIL-DMBTR.However, I assume that the problem lies in the type definition of MACHINE.
Regards
Uwe
‎2008 Sep 23 3:39 AM
Hello Kumar
Assuming that IT_SUM-MACHINE allows for negative values (do we know???) then you may try another calculation:
IT_SUM-MACHINE = 0.
IT_SUM-MACHINE = IT_SUM-MACHINE - IT_DETAIL-DMBTR.However, I assume that the problem lies in the type definition of MACHINE.
Regards
Uwe
‎2008 Sep 23 3:46 AM
you can do this also.
IT_SUM-MACHINE = IT_DETAIL-DMBTR * -1 .
What is the declaration of IT_SUM-MACHINE..?