exchange value
Posted: Sun May 25, 2014 4:09 pm
Hi
First of all, excuse me if I do not explain correctly what I want to do, if not public in the correct forum or if someone has posted this problem.
I have a file. This file has a header line, multiple lines of detail and a final line. The header line starting with "01" and detail lines with "02" the final line by "03". In detail lines I have various amounts (several amounts by line detail) separated by semicolons. In the header line for the amount I must multiply each of the detail lines (= exchange value). The result should leave it in the same line of detail.
The quantity (amount) of the header has 3 decimal (3 integers and 3 decimals),. The amount of detail lines are packed decimal with 2 decimal [first import is 4,8,pd, second import is 13,8,pd... ). The result is that I get an amount rounded to two decimal places (same structure as the amount origin: 8 pd)
The final line should not be treated
In short, how I can multiply lines detail the amount of the header line, leaving the amount in the corresponding en detail, respecting the origin of the amount format (2 decimal integer 13 packed format) Can you explain how I can make easily? Thank you very much
Input (FB=30)
Output (FB=58)
Attach example
First of all, excuse me if I do not explain correctly what I want to do, if not public in the correct forum or if someone has posted this problem.
I have a file. This file has a header line, multiple lines of detail and a final line. The header line starting with "01" and detail lines with "02" the final line by "03". In detail lines I have various amounts (several amounts by line detail) separated by semicolons. In the header line for the amount I must multiply each of the detail lines (= exchange value). The result should leave it in the same line of detail.
The quantity (amount) of the header has 3 decimal (3 integers and 3 decimals),. The amount of detail lines are packed decimal with 2 decimal [first import is 4,8,pd, second import is 13,8,pd... ). The result is that I get an amount rounded to two decimal places (same structure as the amount origin: 8 pd)
The final line should not be treated
In short, how I can multiply lines detail the amount of the header line, leaving the amount in the corresponding en detail, respecting the origin of the amount format (2 decimal integer 13 packed format) Can you explain how I can make easily? Thank you very much
Input (FB=30)
Output (FB=58)
Attach example