Start of Content Area

Procedure documentation Documentation (with Analysis Web Item)  Locate the document in its SAP Library structure

Use

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 graphic is explained in the accompanying text

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.

Prerequisites

      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).

Procedure

BEx Web Application Designer: Creating Web Templates

...

       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).

Note

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]

Note

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:

This graphic is explained in the accompanying text

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-Typecontent="text/html; charset=utf-8" />
        </head>
        <body >
            
<bi:QUERY_VIEW_DATA_PROVIDER name="DP_DOCS_ALL>
                <bi:INITIAL_STATE 
type="CHOICEvalue="QUERY>
                    <bi:QUERY 
value="QUERY_REVALUATIONtext="QUERY_REVALUATION/>
                </bi:INITIAL_STATE>
            </bi:QUERY_VIEW_DATA_PROVIDER>
            <bi:QUERY_VIEW_DATA_PROVIDER 
name="DP_DOCS_RESTRICTED>
                <bi:INITIAL_STATE 
type="CHOICEvalue="QUERY>
                    <bi:QUERY 
value="QUERY_REVALUATIONtext="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_1designwidth="400designheight="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="CHOICEvalue="INSTRUCTION>
                                <bi:INSTRUCTION >
                                    <bi:SET_SELECTION_STATE_BY_BINDING >
                                        <bi:TARGET_DATA_PROVIDER_REF_LIST 
type="ORDEREDLIST>
                                            <bi:TARGET_DATA_PROVIDER_REF 
index="1value="DP_DOCS_RESTRICTED/>
                                        </bi:TARGET_DATA_PROVIDER_REF_LIST>
                                        <bi:SELECTION_BINDINGS 
type="UNORDEREDLIST>
                                            <bi:SELECTION_BINDING 
type="COMPOSITEindex="1>
                                                <bi:SELECTION_BINDING_TYPE 
type="CHOICEvalue="ITEM_CHARACTERISTIC>
                                                    <bi:ITEM_CHARACTERISTIC 
type="COMPOSITE>
                                                        <bi:ITEM_REF 
value="ANALYSIS_ITEM_1/>
                                                        <bi:CHARACTERISTIC 
value="ZD_ACCNTtext="Account number/>
                                                    </bi:ITEM_CHARACTERISTIC>
                                                </bi:SELECTION_BINDING_TYPE>
                                                <bi:CHARACTERISTIC 
value="ZD_ACCNTtext="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_1designheight="300designwidth="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="CHOICEvalue="MULTI/>
                    <bi:PROPERTY_LIST 
type="ORDEREDLIST/>
                </bi:SINGLE_DOCUMENT_ITEM>
            
</p>
        </body>
    </html>
</bi:bisp>

Execution on the Web

...

       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.

 

End of Content Area