![]() This means that we do the same thing that the output control does with the table line: We buffer the value of this line.Īfter all table lines have been processed, one last calculation is missing, which we execute in the footer. Gs_4next_addition, before we add it to the total in the next loop pass. Then, we temporarily store the current value of Otherwise, theĬOLLECT statement would use an empty currency in Gs_4next_addition is empty at the beginning, we must query this in the programming. If no new table line starts, the value of the last line above node This would not have happened if node D had been inserted before node If this last line does not fit onto the page, the output control jumps to the footer processing. ![]() The important fact is that the output control has recognized that a new table line starts (with the new table type, this is achieved by explicitly creating table lines). The node can even be positioned further down in the tree. And for this reason we need the additional fieldĭ). To synchronize the calcuation of the total with its output, the calculation must be delayed. The output control recognizes that the last table line is finished as soon as it starts processing the next line. The program lines nodes, in contrast, are not buffered but executed directly during processing. The output control needs the height specifications of the entire line before it can determine when to trigger the automatic page break. ![]() Determining the page break requires the output control to buffer table lines before printing them. The reason for this lies in the output control for Gs_sflight to the corresponding value in the internal table Gs_4next_addition for? Why don't we simply add the current value of Other steps, in contrast, are hard to understand at first sight, for example, what do we need field G to print the totals sorted by currencies. GT_TOTAL corresponds to the totals value in one currency.Īt the beginning of the table, all summing fields must be cleared (node We can then use the ABAP statementĬOLLECT to add up the values, thereby easily assigning each new value to the correct currency. To be able to calculate the price in accordance with the currency, we need the internal table Some steps within the form logic are self-explanatory: Enhance the form logic as follows:įorm logic for calculating the grand total To keep it simple, the table output in our example (see below) consists only of the nodesĮ (containing the currency). ![]() ![]() In the navigation tree, you are already printing the table in the main window using table nodeī. You now want to calculate the total on the flight prices, taking into account that the airlines use different currencies to indicate their prices.Ĭreate three additional fields in the global definition: GS_SFLIGHT of type SFLIGHT as a global field. To print a table line, you have defined field Table (T_SFLIGHT) is defined in the form interface and has type A table containing the flights of the airline carriers is already being printed in a form. We will use the flight data model to explain this summing method. However, you can also use this method if you only want to print the grand total at the end of the table. To print a subtotal of the grand total before a page break, the subtotal must be calculated in a special way. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |