Show TOC

Syntax documentation*ADD / *ENDADD Locate this document in the navigation structure

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 for the Microsoft version or *SELECT for the SAP NetWeaver version.

The syntax is:

*ADD {variable} = {set}

{formula}

*ENDADD

Example Example

*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]

End of the example.

Note Note

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.

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.