Requirements:There are two pieces of data displayed in Wad: The data of all companies is displayed. The following figure shows the corresponding data after you select a company. If you click "China Guangdong Nuclear Power Group Co., Ltd.", the second part only displays the data of this company.
Technical implementation:It is implemented through row_selection of anananlysis_item in Wad.
Steps:
Step 1: create two queries, z08_zwupm_d1_cq_016 and z08_zwupm_d1_cq_017, which are used to display data in the first and second parts respectively.
Because the data in the second part is changed according to the company selected by the user, the query should have a variable to be input and created based on the company characteristics (zcupmgsbm, here I define zcupmgsbm01.
Remember: The company feature name is zcupmgsbm, and the variable created based on the company is zcupmgsbm01.
Step 2: Normally, create dataprovider, pull chart_item, and analysis_item to bind it with dataprovider. It is clearer to use a list for some settings:
Report Section |
Dataprovider |
Associated Query |
Analysis_item name |
Part 1 |
Dp_1 |
Z08_zwupm_d1_cq_016 |
Analysis_item_1 |
Part 2 |
Dp_2 |
Z08_zwupm_d1_cq_017 |
Analysis_item_2 |
Chart_item is not mentioned here, because it has almost the same settings as analysis_item.
The following describes how to implement row_selection of anananlysis_item.
Step 3: In the ananlysis_item attribute, there is a "select line". Here I implement it through commands.
Select "single_with_command" in the row selection,
In the activation operation, select "instruction". These two options mean that when you click a row of data, the set command is triggered.
Step 4: set_selection_state_by_binding (set the filter value through different sources). The set parameters include:
1. Affected data provider: dp_2.
2. Data Binding:
2.1. Features: zupmgsbm
2.2 binding type: For a web project, select [item_characteristic]
2.3. Web project: analysis_item_1
2.4. Features: zupmgsbm
This command is used to set which data provider will be affected when a user clicks and which feature value is bound. After the setting, the following code is automatically generated:
<Bi: set_selection_state_by_binding xmlns: Bi = "http://xml.sap.com/2005/01/bi/wad/bisp">
<Bi: target_data_provider_ref_list type = "orderedlist">
<Bi: target_data_provider_ref Index = "1" value = "dp_2">
</Bi: target_data_provider_ref>
</Bi: target_data_provider_ref_list>
<Bi: selection_bindings type = "unorderedlist">
<Bi: selection_binding type = "composite" Index = "1">
<Bi: Characteristic value = "zupmgsbm" text = "company department">
</Bi: Characteristic>
<Bi: selection_binding_type = "choice" value = "item_characteristic">
<Bi: item_characteristic type = "composite">
<Bi: item_ref value = "analysis_item_1">
</Bi: item_ref>
<Bi: Characteristic value = "zupmgsbm" text = "company department">
</Bi: Characteristic>
</Bi: item_characteristic>
</Bi: selection_binding_type>
</Bi: selection_binding>
</Bi: selection_bindings>
</Bi: set_selection_state_by_binding>
Step 5: run the set_variables_state command to bind the variable to the feature. The parameters include:
Variable: zupmgsbm01
Variable type: selection_binding_type
Binding type: item_characteristic
WEB Project: analysis_item_1
Feature: zupmgsbm
The following code is generated after setting:
<Bi: set_variables_state xmlns: Bi = "http://xml.sap.com/2005/01/bi/wad/bisp">
<Bi: variable_values type = "orderedlist">
<Bi: variable_value type = "composite" Index = "1">
<Bi: variable value = "zcupmgsbm01" text = "UPM-company department">
</Bi: Variable>
<Bi: variable_type type = "choice" value = "selection_binding_type">
<Bi: selection_binding_type = "choice" value = "item_characteristic">
<Bi: item_characteristic type = "composite">
<Bi: item_ref value = "analysis_item_1">
</Bi: item_ref>
<Bi: Characteristic value = "zupmgsbm" text = "company department">
</Bi: Characteristic>
</Bi: item_characteristic>
</Bi: selection_binding_type>
</Bi: variable_type>
</Bi: variable_value>
</Bi: variable_values>
</Bi: set_variables_state>
Step 6: run the test. The report will pop up and ask the user to select the "Company Department". This is a must-have time. Before the row selection function is implemented, however, the report has other variables, so you need to manually select them at this time.
Step 7: The report is displayed. The second part of the report also displays the data of the selected company. However, when you click the row of analysis_item_1 In the first part, the report returns to the variable input interface, asking the user to select a company department again.
I have set these two variables to implement it, set the triggered control, and set the pass variable value. The logic is correct. I always thought that I was wrong in the above settings. But I don't know where the problem is when I set it to a few times? I have been suffering from this problem for almost two weeks.
I accidentally saw an article on the Internet about query jump, which is somewhat enlightening.
Step 8: Use rsbbs to set the sender to z08_zwupm_d1_cq_016, And the receicer to z08_zwupm_d1_cq_017.
Step 9: run the report and test again. OK, requirement implementation.
I always think that rsbbs is a little superfluous, because the two commands have implemented relevant functions. Why do we need to design the BW report redirection in rsbbs?
Which of the following talents have high opinions? Please speak freely and study together.