Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from wnash7658 on Sep 25 at 9:10 PM Hello, I got a developer friend to help me and I made some changes. The ABAP below is just an example for me to use to get the correct value without decimal points. I have done the same thing to get the ratio by using an F and then putting the result into a P. REPORT ZSD00045 NO STANDARD PAGE HEADING MESSAGE-ID Z1 LINE-SIZE 132. TABLES: EKPO, MVKE. TYPE-POOLS: SLIS. ************************************************************************ *GLOBAL DATA * ************************************************************************ DATA: L_P1(5) TYPE P DECIMALS 3, L_P2(5) TYPE P DECIMALS 3, L_P3(5) TYPE P DECIMALS 3, L_P4 TYPE F, L_P5(5) TYPE P DECIMALS 3. L_P1 = 5 / 2. L_P2 = TRUNC( L_P1 ). L_P3 = CEIL( L_P1 ). WRITE: L_P1, L_P2, L_P3. L_P2 = L_P2 * 1000. L_P4 = 5 / 2. "Answer L_P5 = TRUNC( L_P4 ). "Answer L_P5 = L_P5 * 1000. "Answer WRITE /. WRITE: L_P1, L_P2, L_P3, L_P4, L_P5.
| | | ---------------Original Message--------------- From: wnash7658 Sent: Monday, September 24, 2012 6:50 AM Subject: Ratio Between Two Quantity Fields I have order qty and ATP qty and I want to find the ratio between them. The qty fields are using QUAN 13 3 from the data disctionary. I have declared a variable RATIO TYPE P DECIMALS 2. When order qty > ATP qty it works fine, but when order qty < ATP qty it is returning zero and I am getting a short dump because later on I am dividing by zero. Any help. Regards Waza | | Reply to this email to post your response. __.____._ | _.____.__ |