WriteCells
SplashingOptions
element is included, a splashing operation is performed.
If the SplashingOptions
element is not included, a normal
write operation is performed even if the destination cell is a consolidated cell.
Syntax
<WriteCells>
<Cube>Cube Name</Cube>
[<Slicer>…</Slicer>]
[<SplashingOptions>…</SplashingOptions>]
<Cell> … </Cell>
...
<Cell >… </Cell>
</WriteCells>
All writes are done using the WriteCells
element. It must contain a Cube
element that provides
the cube name to be written to. Writes to different cubes must be done in separate
requests. In addition, other elements can be included.
This table describes the elements:
Elements | Description |
---|---|
Cube
|
Cube name to which data is written. |
Slicer
|
Defines a set of members that are common across all cells being written. An error occurs if more than one member from a dimension is specified. |
SplashingOptions
|
Indicates that
all writes are splashing writes. In addition, SplashingOptions can be indicated for each cell to make it
splash or to override the SplashingOptions
for the entire request. If it is not included in the request at all, only
normal cell writes are done. SplashingOptions on a leaf cell are allowed but do not have any
effect. |
Cell
|
Specifies everything that is required for a single cell write. |
WriteCellsResponse
|
Every WriteCells command returns a WriteCellsResponse . If the write succeeds, the
element is empty. If the entire write fails, the element is empty, and an
error is returned in the SOAP response. |
<SplashingOptions> XML element
<SplashingOptions>
[AllocationMode=AllocationModeType]
[DecimalPlaces=integer]
[ErrorCorrection=true|false]
[DoNotDeleteOnZero=true|false]
[<Member>MemberUniqueName</Member>]
…
[<Member>MemberUniqueName</Member>]
</SplashingOptions>
WriteCells
supports the standard options DecimalPlaces
,
ErrorCorrection
, and DoNotDeleteOnZero
. Also it supports
the general allocation modes except External weighted delta
.
If an external weighted allocation mode was selected, it is necessary to
provide information on which values serve as a source of the distribution. The
Member
element within the SplashingOptions
element
defines a deviation of the source cell coordinates from the target cell coordinates.
<Cell> XML element
<Cell>
[<SplashingOptions>…</SplashingOptions>]
<Member>MemberUniqueName</Member>
…
<Member>MemberUniqueName</Member>
[<Value [action="delete"]>value</Value>]
[<Note [action="delete"]>note</Note>]
</Cell>
Cells can each have their own SplashingOptions
allowing them to override any of the options specified in
the request. They can specify members, including overriding those that are already
specified in the Slicer
. Between the Slicer
and the Cell
elements, a Member
must be specified for each
dimension, or an error occurs.
The Cell
element can also have a
Value
and a Note
. For
normal writeback, the Value
is written directly to the
cell, for splashing it is the value that is spread. The Note
is always written directly to the cell, even if splashing is occurring for
the values. If action="delete"
is specified, the value or
note is deleted from the cube. If action="delete"
is
specified for splashing, all base values are deleted. The other splashing options are
ignored in this scenario.
Example 1
This example includes normal writeback along with note writeback and deletion.
<WriteCells>
<Cube>STATUS</Cube>
<Slicer>
<Member>[STATUS].[Start]</Member>
<Member>[VERSION].[Actual]</Member>
<Member>[LEVEL].[IFRS]</Member>
<Member>[UNIT].[C1101]</Member>
</Slicer>
<Cell>
<Member>[TIME].[03_2017]</Member>
<Value>1.28</Value>
</Cell>
<Cell>
<Member>[TIME].[05_2017]</Member>
<Value>2.56</Value>
</Cell>
<Cell>
<Member>[TIME].[06_2017]</Member>
<Note>Example text of cell note</Note>
</Cell>
<Cell>
<Member>[TIME].[07_2017]</Member>
<Value action="delete" />
<Note action="delete" />
</Cell>
</WriteCells>
If successful, the response is:
<WriteCellsResponse/>
If some cells fail, the response is:
<WriteCellsResponse>
<Cell>
<Member>[VERSION].[Budget]</Member>
<Member>[TIME].[All Years].[2017].[Q2_2017].[05_2017]</Member>
<Member>[LEVEL].[IFRS]</Member>
<Member>[UNIT].[G0000].[C1100].[C1101]</Member>
<Member>[STATUS].[Start]</Member>
<Error ErrorCode="34" Description="You are not authorized to carry out this operation." />
</Cell>
</WriteCellsResponse>
Example 2
In this example the source is always ACTUAL but has a different quarter
for every target cell. SplashingOptions
are added to
each cell.
<WriteCells>
<Cube>STATUS</Cube>
<Slicer>
<Member>[STATUS].[Start]</Member>
<Member>[VERSION].[Budget]</Member>
<Member>[LEVEL].[IFRS]</Member>
<Member>[UNIT].[C1101]</Member>
</Slicer>
<SplashingOptions AllocationMode="External weighted" DecimalPlaces="2">
<Member>[VERSION].[Actual]</Member>
</SplashingOptions>
<Cell>
<SplashingOptions>
<Member>[TIME].[Q1_2017]</Member>
</SplashingOptions>
<Member>[TIME].[Q3_2017]</Member>
<Value>12</Value>
</Cell>
<Cell>
<SplashingOptions>
<Member>[TIME].[Q2_2017]</Member>
</SplashingOptions>
<Member>[TIME].[Q4_2017]</Member>
<Value>14</Value>
</Cell>
</WriteCells>
If the request in Example 1 was successfully executed beforehand, this request is also successful. Otherwise, the source area is empty and the request returns two errors with the same error message:
<WriteCellsResponse>
<Cell>
<Member>[VERSION].[Budget]</Member>
<Member>[TIME].[All Years].[2017].[Q3_2017]</Member>
<Member>[LEVEL].[IFRS]</Member>
<Member>[UNIT].[G0000].[C1100].[C1101]</Member>
<Member>[STATUS].[Start]</Member>
<Error ErrorCode="21210" Description="The external value that is to be consolidated must not be empty or zero." />
</Cell>
<Cell>
<Member>[VERSION].[Budget]</Member>
<Member>[TIME].[All Years].[2017].[Q4_2017]</Member>
<Member>[LEVEL].[IFRS]</Member>
<Member>[UNIT].[G0000].[C1100].[C1101]</Member>
<Member>[STATUS].[Start]</Member>
<Error ErrorCode="21210" Description="The external value that is to be consolidated must not be empty or zero." />
</Cell>
</WriteCellsResponse>