Show TOC

Syntax documentation*COMMIT Locate this document in the navigation structure

A logic file can contain formulas that depend on the result of calculations performed by the cube, and these calculations in turn depend on the results of some other formulas in the same logic.

Example Example

[P_ACCT].[#CE0004030] = ( [P_ACCT].[CE0004010] + [P_ACCT].[CE0004020] ) * 0.15

[P_ACCT].[#CE0661000] =

( [P_ACCT].[CE0004010] + [P_ACCT].[CE0004020] + [P_ACCT].[#CE0004030] ) / [P_ACCT].[CE0652000]

End of the example.

In this example, CE0661000 depends on the first calculation, and this calculation in turn depends on the calculation of CE0004030.

The logic, if written in the above format, does not work correctly, because CE0004030 cannot be retrieved from the cube until its result has been posted to the cube. To get the right results, CE0004030 must be calculated AND stored in the cube. THEN, the calculated result can be retrieved from the cube and be used to calculate CE0661000.

To force a write back of the result of the calculation of CE0004030 into the cube before the calculation of CE0661000, you can insert the instruction *COMMIT between the two calculations. The logic then works when written as follows:

Example Example

[P_ACCT].[#CE0004030] = ( [P_ACCT].[CE0004010] + [P_ACCT].[CE0004020] ) * 0.15

*COMMIT

[P_ACCT].[#CE0661000] =

( [P_ACCT].[CE0004010] + [P_ACCT].[CE0004020] + [P_ACCT].[CE0004030] ) / [P_ACCT].[CE0652000]

In this case CE0004030 in the second formula does not have the pound sign (#), because it is a stored amount read from the cube.

End of the example.

Note Note

Any number of commit instructions can be entered in a logic file. However, the number of commit instructions should be kept to the minimum, because they have a negative impact on the overall performance of the logic execution due to increased communication between the database and script logic engine. The ideal case is to have one commit at the end.

End of the note.

Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.