Some special points in Get_V methods in advance searches
GET_V methods locations:
We all know, if we want to add value help to a field, or replace standard value help to a field, we can make use of GET_V method. For example, in the sales order creation screen, the ‘Status’ field is a DDLB field, it has some values:
This status field comes from context node BTSTATUSH of view BT115H_SLSO/Details:
If we want to change standard value help, we can make enhancement on component BT115H_SLSO and view ‘Details’, enhance context node BTSTATUSH and redefine method CL_BT115H_S_DETAILS_CN05->GET_V_STATUS_CURRENT. In the same way, we can also add value helps by adding GET_V methods to those fields which have no value help originally.
However, there are some special cases in which the GET_V methods are not attached to the context node classes. For example, search field ‘Sales Org. ID’ has a value help:
This field is attribute STRUCT.SALES_ORG of context node BTQSLSORD in view BT115S_SLSO/SlsOrdSQ. This attribute has no GET_V method:
This is because there is a method GET_V_SALES_ORG in class CL_BT115S_S_SLSORDSQ_IMPL which actually locates in class CL_BTSLS_ADVS_CNTRL:
Of course, class CL_BT115S_S_SLSORDSQ_IMPL can also redefine its own logics in the GET_V methods. For example, CL_BTSLS_ADVS_CNTRL->GET_V_EMPLOYEE_RESP is redefined into CL_BT115S_S_SLSORDSQ_IMPL->GET_V_EMPLOYEE_RESP.
In SERVICEPRO business role, in search service order, GET_V methods exist in CL_BT116S_S_ADVANCEDSP_IMPL/CL_BTSRV_ADVS_CNTRL too.
GET_V methods types:
Inside the GET_V methods, there are different types to render the value helps:
- make use of value help id. The example is CL_BT116S_S_ADVANCEDSP_IMPL/CL_BTSRV_ADVS_CNTRL->GET_V_SALES_ORG
- make use of ddlb. The example is CL_BT116S_S_ADVANCEDSP_IMPL/CL_BTSRV_ADVS_CNTRL->GET_V_SERVICE_ORG
- make use of event triggers. For example, in method CL_BT116S_S_ADVANCEDSP_IMPL/CL_BTSRV_ADVS_CNTRL->GET_V_CATEGORY_ID, it defines event ‘SELECT_CATEGORY’ (if_crm_srqm_uiu_const=>gc_event_select_category).
Of course, the event should be handled somewhere. Here it is CL_BTSRV_ADVS_CNTRL->DO_HANDLE_EVENT.
There is a special function for search field ‘Categorization’: Normally, when we click on a field, the cursor will focus on it. If we want to use the F4 help function, we must click on the ‘F4 Help’ icon attached to this field. But for ‘Categorization’ field, if we click on the field itself, the F4 help dialog will also pop up like we click on the ‘F4 help’ icon directly. Why?
This is because the attribute cs_result-INPUT_HELP_MANDATORY is set as ‘X’.
Just like ‘operators’, ‘server_event’, ‘ddlb_options’, ‘output_mapping’, ‘help_id’, attribute ‘input_help_mandatory’ can also be assign values in CL_…_ADVS_CNTRL->GET_V_XXX methods.
But of course, there are other places to set these attributes. For example:
- For business role SERVICEPRO, search ‘service orders’, attribute for input_help_mandatory for field ‘Categorization’ is set in method CL_BSP_WD_CONTEXT_NODE_ASP->GET_DQUERY_VALUEHELPS according to the returned value from method CL_CRM_UIU_BT_ADVS_CN->GET_P_CATEGORY_ID.
- For business role SALESPRO, search ‘Leads’, in method CL_BT108S_L_SEARCH_IMPL->GET_DQUERY_DEFINITIONS, operators, server_event are controlled.