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:
BEx Web Application Designer: Creating Web Templates
Both data providers are to be based on query QUERY_REVALUATION.
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) |
|
Set the Document Icons for Datacharacteristic to On.
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" > <html > <head > <title >Netweaver BI Web Application</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body > <bi:QUERY_VIEW_DATA_PROVIDER name="DP_DOCS_ALL" > <bi:INITIAL_STATE type="CHOICE" value="QUERY" > <bi:QUERY value="QUERY_REVALUATION" text="QUERY_REVALUATION" /> </bi:INITIAL_STATE> </bi:QUERY_VIEW_DATA_PROVIDER> <bi:QUERY_VIEW_DATA_PROVIDER name="DP_DOCS_RESTRICTED" > <bi:INITIAL_STATE type="CHOICE" value="QUERY" > <bi:QUERY value="QUERY_REVALUATION" text="QUERY_REVALUATION" /> </bi:INITIAL_STATE> </bi:QUERY_VIEW_DATA_PROVIDER> <bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" /> <!-- insert data providers, items and other template content here --> <p > <bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" > <bi:DATA_PROVIDER_REF value="DP_DOCS_ALL" /> <bi:LINKED_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" /> <bi:NEW_LINES_COUNT value="0" /> <bi:SELECT_ROWS value="SINGLE_WITH_COMMAND" > <bi:SINGLE_WITH_COMMAND type="COMPOSITE" > <bi:ACTIVATION_ACTION type="CHOICE" value="INSTRUCTION" > <bi:INSTRUCTION > <bi:SET_SELECTION_STATE_BY_BINDING > <bi:TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST" > <bi:TARGET_DATA_PROVIDER_REF index="1" value="DP_DOCS_RESTRICTED" /> </bi:TARGET_DATA_PROVIDER_REF_LIST> <bi:SELECTION_BINDINGS type="UNORDEREDLIST" > <bi:SELECTION_BINDING type="COMPOSITE" index="1" > <bi:SELECTION_BINDING_TYPE type="CHOICE" value="ITEM_CHARACTERISTIC" > <bi:ITEM_CHARACTERISTIC type="COMPOSITE" > <bi:ITEM_REF value="ANALYSIS_ITEM_1" /> <bi:CHARACTERISTIC value="ZD_ACCNT" text="Account number" /> </bi:ITEM_CHARACTERISTIC> </bi:SELECTION_BINDING_TYPE> <bi:CHARACTERISTIC value="ZD_ACCNT" text="Account number" /> </bi:SELECTION_BINDING> </bi:SELECTION_BINDINGS> </bi:SET_SELECTION_STATE_BY_BINDING> </bi:INSTRUCTION> </bi:ACTIVATION_ACTION> </bi:SINGLE_WITH_COMMAND> </bi:SELECT_ROWS> <bi:DOCUMENT_ICONS_DATA value="X" /> <bi:BLOCK_COLUMNS_SIZE value="5" /> <bi:BLOCK_ROWS_SIZE value="5" /> </bi:ANALYSIS_ITEM> </p> <p > <bi:SINGLE_DOCUMENT_ITEM name="SINGLE_DOCUMENT_ITEM_1" designheight="300" designwidth="350" > <bi:DATA_PROVIDER_REF value="DP_DOCS_RESTRICTED" /> <bi:MAX_TEXT_LINES value="10" /> <bi:MAINTENANCE_POSSIBLE value="X" /> <bi:EDIT_MODE value="X" /> <bi:DOCUMENT_CLASS type="CHOICE" value="MULTI" /> <bi:PROPERTY_LIST type="ORDEREDLIST" /> </bi:SINGLE_DOCUMENT_ITEM> </p> </body> </html> </bi:bisp>
Execution on the Web