Portlet Factory, Version 6.1.2
Objects Created by the SAP BW DATA Builder
The SAP BW Data builder creates Variables for the Command and Properties data (if they were provided "hard-coded" instead of with a runtime indirect reference) and a "xmlaResponse" Variable which holds the complete XMLA response after the executeMdx method has returned. Each variable name is prefixed with the name given to the builder.The SAPBWDataHelper LJO provides the following methods (see sample models for their usage).
Note: The executeMdx method needs to be called before any of the other methods are callable:
Name Arguments Action executeMdx None Executes the MDX expression and returns the complete XMLA response. getTableData
- "noData" value
- The String that is used in response cells that contain no data.
- ValueCellName
- Either FmtValue or Value depending on whether you wish the formatted data value or the raw data value from the data cell.
Parses the response and returns only the table cell data and row labels in a form ready to be used by Dynamic Table or Data Page builders. Note: It is possible to call this method and massage the data with custom information or additional data before passing it through to the Table builder. The Dynamic Table builder operates solely on the runtime info and can be very flexible in those situations.
getChartData
- flipAxes
- true or false to switch around the row/column axes
- removeFirstRow
- true or false
- removeFirstColumn
- true or false
- removeLastRow
- true or false
- removeLastColumn
- true or false
Parses the response and returns the table cell data formatted into a form ready to be used by the WebChart builder. Setting "flipAxes" true can be useful to get the alternative view on the data. The removeXXX args are useful if, for example, the first row of data is summary/total data and thus dwarfs the other row values. Removing it can give a more useful chart.
Note: It is possible to call this method and massage the data before passing it into a chart tool.
getColLabelText columnNumber For any given column number (zero-based, corresponding to the table data) returns the col label from the Tuples/Tuple[i]/Member/Caption value. getColLabels None Returns all column labels getColumnCount None Returns the column count getRowCount None Returns the row count getRowLabelText rowNumber For any given row number (zero-based, corresponding to the table data) returns the row label from the Tuples/Tuple[i]/Member/Caption and Member[1]/Caption values. If there is a Member[1] Caption the result is returned in the form a-b where a is the Member/Caption and b is the Member[1]/Caption.
getRowLabels None Returns all of the row labels. getRowLabelUName loopCounterVarName,PagingAssistantName For any given row number in the Dynamic Table rendering, returns the uname for that row. From the getLabels() result the Tuples/Tuple[i]/Member/UName and Member[1]/UName values are determined. If there is a Member[1] UName the result is returned in the form a__b where a is the Member/UName and b is the Member[1]/UName. Pass in the name of the DynamicTable LoopCounter variable (for example, "dtLoopCounter"), and the name of the Paging Assistant (if any) used with the Dynamic Table. If there is no paging assistant being used, you may enter any name and it will be ignored. These values are used to calculate the current row number.
get1BasedRowLabelUName RowCounterVarName,PagingAssistantName For any given row number in the Data Page rendering, returns the uname for that row. From the getLabels() result the Tuples/Tuple[i]/Member/UName and Member[1]/UName values are determined. If there is a Member[1] UName the result is returned in the form a__b where a is the Member/UName and b is the Member[1]/UName. Data Page counters are 1-based, not zero-based like most other things. Pass in the name of the DataPage LoopCounter variable (for example, "RowCounterVar"), and the name of the Paging Assistant (if any). If there is no paging assistant being used, you may enter any name and it will be ignored. These values are used to calculate the current row number.
getSAPBWAccess None Returns a SAPBWAccess object that can be used to more directly interact with SAP BW. You must call the "release" method on this object when you have finished with it. See example below.
Parent topic: SAP BW Data Access builder
Library | Support |