*ADD / *ENDADD
This structure allows you to automatically cumulate a set of members to a calculated member as specified in a comma delimited range.
The range can be dynamically derived using a *SELECT( ) instruction. See *SELECT.
The syntax is:
*ADD {variable} = {set}
{formula}
*ENDADD
*ADD %ACC%=[CE0004010],[CE0004020],[CE0004030] [#CE0661000] = %ACC%/[CE0652000]
*ENDADD
*COMMIT
[#CE00661000] = [CE0661000]/[CE0652000]
The ADD statement expands into:
[P_ACCT].[#CE0661000] =[P_ACCT].[CE0004010]/[P_ACCT].[CE0652000]+[P_ACCT].[CE0004020]/[P_ACCT].[CE0652000]+[P_ACCT].[CE0004030]/[P_ACCT].[CE0652000]
The expression to the right of the equals sign ( = ) currently does not support more complex expressions.
Only one formula can be written inside the ADD/ ENDADD structure.
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.