You want to build a planning application with which you enter turnover amounts for certain account numbers and with which you can create a document for such a data record. The planning application is to look approximately as follows:
This example serves in particular to clarify the interaction between an Analysis Web item and an Individual DocumentWeb item. Special properties here are:
● Row selection with command in the Analysis Web item. The row selection immediately takes effect in the document display.
● As in example Revaluating Planning Functions (with Analysis Web Item), you use
○ an aggregation level that contains the following InfoObjects: unit Currency Key, time characteristics Quarter and Calendar Year, key figure Amount, characteristics Version, Account Number, Cost Center.
○ filter ACCOUNT_FILT
○ query QUERY_REVALUATION
● In the InfoObject maintenance (transaction RSD1), you have set the option Characteristic is Document Property for characteristic Account Number (tab page General).
...
1. In the BEx Web Application Designer, create a Web template with the name DOC_SELECTION.
2. Create the following data providers of type Query View Data Provider:
○ DP_DOCS_ALL
○ DP_DOCS_RESTRICTED
Both data providers are to be based on query QUERY_REVALUATION.
3. Create the following Web items:
○ ANALYSIS_ITEM_1. Data provider DP_DOCS_ALL is assigned to the analysis grid as the (source) data provider.
Choose Behavior → Row Selection → Single with Command (SINGLE_WITH_COMMAND).
Row selection Single (SINGLE): The user can only select one row; there is no roundtrip to the server. Row selection Single with Command: The user can only select one row, but the system starts a roundtrip to the server and executes activation and deactivation commands if necessary.
Example: Row 1 is active. You now select row 2. The system executes the deactivation command on row 1 if necessary and deactivates row 1. The system then selects row 2 and executes the activation command on row 2.
In our example, the aim is that when you select a row in the Analysis Web item, the system displays the document that corresponds to this row selection. To do this, use the command wizard to create the following command as the activation action:
Table of Commands
Command |
Parameter |
Data provider-specific command SET_SELECTION_STATE BY BINDING (set filter values according to different sources) |
● Command target: target data provider DP_DOCS_RESTRICTED ● Data binding: selection binding using the Account Number (ZD_ACCNT) characteristic, where the value of the binding type Web item selection is to come from the ANALYSIS_ITEM_1 Web item, characteristic Account Number (ZD_ACCNT). |
Set the Document Icons for Data characteristic to On.
○ SINGLE_DOCUMENT_ITEM_1.
A document is to contain a maximum of 10 rows. It is to be embedded into the Web application (and not only displayed as a link). If multiple documents are included, these are to be displayed as a list. Set the following parameters accordingly:
Internal Display → Maximum Number of Text Rows: 10; Display in Web Application : On; Web Item List of Documents: On
Behavior → Maintenance Possible: On; Processing Mode: On
Data provider DP_DOCS_RESTRICTED is assigned to the document as the (source) data provider. The document is to be created for changing a turnover amount, that is, for a transaction data record. Set the following parameters accordingly:
Data Binding → Data Provider: DP_DOCS_RESTRICTED, Document Class: InfoProvider[MULTI]
If you choose the Master Data setting, you can enter documentation for an account number.
The following figure illustrates the layout of the DOC_SELECTION Web template:
The table below contains the XHTML source text of the DOC_SELECTION Web template:
XHTML Source Text of the DOC_SELECTION Web Template
<bi:bisp xmlns="http://www.w3.org/TR/REC-html40" xmlns:bi="http://xml.sap.com/2005/01/bi/wad/bisp" xmlns:jsp="http://java.sun.com/JSP/Page" > |
...
1. Execute the Web template on the Web.
2. Select a row, enter a text in it, and save this text. In the corresponding amount field in the analysis grid, a document icon indicates that documentation exists for this data record.
3. If you have created documents for multiple rows, these are displayed as a document list.