Anda di halaman 1dari 9

Web UI enhancement of transmitting data from main component to the search help component in SAP CRM 7.0.

Document Control
Revision History Date 12th May 10 Versio n 1.0 Author Debolina Description Web UI enhancement of Transmitting data from main component to the component of search help in SAP CRM 7.0. .

Web UI enhancement of transmitting data from main component to the component of search help in SAP CRM 7.0.
Scenario: In Web UI opening the search help for Campaigns in the Sales Contract screen (based on the transaction type of sales contract), the value of Campaign is defaulted in the search screen. In this instance we need to read a value in one component from another totally unrelated component. (Note: Do not consider functional feasibility of the requirement. The solution depicts the technical feasibility on the scenario mentioned above). Solution Approach: Components used-a) BT121H_SLSC - Sales Contract; b) MKTPR_ADVSEARCH Campaign search screen Data from BT121H_SLSC needs to be read in MKTPR_ADVSEARCH and accordingly the search criterion is to be determined. Steps: 1. Check whether a Component usage of MKTPR_ADVSEARCH is present in BT121H_SLSC or vice versa. In this component, it is already present. If unavailable, create a component usage between the two components.

2. Identify the context node of BT121H_SLSC which needs to be read in MKTPR_ADVSEARCH. This context node needs to be present in the component controller of BT121H_SLSC. In this instance, we have to read the BTADMINH context node.

3. Now, check whether this context node or its higher level node (for BTADMINH, its higher level node is BTORDER) is present in the interface controller of component MKTPR_ADVSEARCH.

4. In the component controller of MKTPR_ADVSEARCH, add a context node which will have the same type as BTADMINH. Since we just have to read the data and not store, so it can be a Model Node or a Value node. Here the node BTADMINH2 is added as a value node with one attribute Process type.

5. Create a custom controller in MKTPR_ADVSEARCH and add this BTADMINH2 context node in that. This is done so that the value of Contract type can be read from any of the views in this component.

6. Create a binding between this context node and the Component Controller Context node. This enables data to flow from the Component Controller to the Custom Controller and then to the view. (Note: Since the binding is already created, only Change binding and Delete binding are appearing. Actually you will be getting a Create binding here).

7. Now, add this node to the Interface Controller also.

8. Again go back to the component BT121H_SLSC, in the component controller of this component. In the method WD_USAGE_INITIALIZE, map the context nodes BTADMINH and BTADMIN2. The code is provided below: when 'CUCampaignSearchHelp'.
call method iv_usage->bind_context_node exporting

iv_controller_type = cl_bsp_wd_controller=>co_type_component iv_target_node_name = 'BTADMINH' "#EC NOTEXT

9. After following these steps, in any of the views of MKTPR_ADVSEARCH, the values of BTADMINH become accessible. I have enhanced the view MKTPR_ADVSEARCH/ASProject and redefined the DO_PREPARE_OUTPUT where you can initialize the search parameter.

Anda mungkin juga menyukai