Show TOC

Syntax documentation*STORE_ORG Locate this document in the navigation structure

Allowed uses: ByCommit, SQL

Sometimes it happens that a section of SQL-based logic needs to read the value of a parent member, to perform some subsequent calculation. (For example it may need to store a profit and loss net profit into a balance sheet account). This instruction allows you to store in the writeback table all parent members of a given dimension as specified in a property like PARENTH1 or PARENTH2.

The syntax is:

*STORE_ORG {dimension name} = {property name}

Example Example

*STORE_ORG ACCOUNT = PARENTH1

End of the example.

The STORE_ORG instruction must be executed standalone is its own COMMIT section.

There is no particular drawback to storing records in the writeback table that OLAP never sees (parent members are recalculated on the fly in the OLAP cube). However, that this might increase the size of the writeback table unnecessarily, especially if the selected organization has many intermediate parents.

While it may work, duplicating the values of OLAP parents in the database is not a recommended way to use this feature. A much more practiced approach is to use this instruction to store the values of “parent-like” members, defining some generic property such as MYPARENTH1 or MYSUBTOTALS, and using it to store members that for the application are not parents in any real hierarchy.

This also permits you to store only the appropriate parents, skipping all nonrequired intermediate parents that a true organization may include for other reasons. For example, you could store just the value of Net Income in a dummy organization defined in property MYORG, skipping all other parents such as Gross Profit or NPBT. In this case, the logic statement is:

*STORE_ORG ACCOUNT = MYORG

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.