SAP ABAP IMG Activity REFX_RECA_SH_METH_CH (Implement/Activate Search Methods for Search Strategies)
Hierarchy
EA-FIN (Software Component) EA-FIN
   FI-LOC (Application Component) Localization
     GLO_REFX_CH_LR (Package) Localization Flexible Real Estate Switzerland
IMG Activity
ID REFX_RECA_SH_METH_CH Implement/Activate Search Methods for Search Strategies  
Transaction Code S_EEI_69000140   (empty) 
Created on 20121031    
Customizing Attributes REFX_RECA_SH_METH_CH   Implement/Activate Search Methods for Search Strategies 
Customizing Activity REFX_RECA_SH_METH_CH   Implement/Activate Search Methods for Search Strategies 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name REFX_RECA_SH_METH_CH    

Use

This BAdI can be used to define your own search methods for a search strategy. Search methods are each assigned to a search strategy. The BAdI method that is used depends on the type of search method that is entered for the method in table TIVCASHMETH. The following applies:

Type SPACE - Single Value Method, Values Are in VICASHFVALUES-SHMETHDIFF
There is no BAdI call, the values for the search strategy are entered directly in table VICASHFVALUES.

Type 1 - Search Strategy + Possibly Object Data => (Program) Values
The BAdI determines the possible values solely from the name of the of search strategy and possibly from the object data.
BAdI method to be implemented: GET_VALUES

Type 2 Search Strategy =>SMETHDIFF => (Program) Values
First a differentiation criterion is determined for the search strategy from the value table VICASHFVALUES. The BAdI then determines the possible values from this differentiation criterion, possibly dependent on the object data and the name of the search strategy. BAdI method to be implemented: GET_VALUES_FOR_SHMETHDIFF

Type 3 Object Data => (Program) SMETHDIFF => (VICASHFVALUES) Values
The BAdI determines a differentiation criterion from the object data and possibly from the name of the search strategy. The values for this differentiation criterion are then read from table VICASHFVALUES.
BAdI method to be implemented: GET_SHMETHDIFF

Search strategies are used in the following contexts:

  • One-Time Postings:
    Vendor search field (VENDOR) and service charge key (SCSCKEY)
    The search strategy is determined from the Customizing settings for the posting activity (VENDOR) or for a specific item of the posting activity(SCSCKEY). An object reference is not transferred.

  • Master Data of Parcel:
    Search fields for main contractual partner (PARCOFF) and for all hierarchical locations (LOCHIER). The object reference of the parcel is transferred.
    For the LOCHIER search field, the location structure of the hierarchicallocation you are searching for is also in the ID_CONTEXT field.

  • Master Data of Land Register:
    Search fields for land registry (LROFFICE) and for the hierarchical location (LOCHIER). The object reference of the land register is transferred.
    For the LOCHIER search field, the location structure of the hierarchicallocation you are searching for is also in the ID_CONTEXT field.

The following applies to the search fields for the land register and parcel:
For each search field, only one search strategy is allowed to be designated as active.

Requirements

Standard settings

Activities

Depending on the type of search method, implement one of the 3 methods:

  • GET_VALUES
  • GET_VALUES_FOR_SHMETHDIFF
  • GET_SHMETHDIFF

Description of parameters:

Method GET_VALUES and GET_SHMETHDIFF:
FLT_VAL
Search method

IO_REF_OBJ
Reference to the real estate object that is currently being processed. The reference is empty when the call is from posting activities. For theland register, the reference contains a reference to the land register master data; and for parcels, a reference to the parcel master data.
The BAdI method can retrieve the current object data using the API that belongs to it.

ID_CONTEXT
For the LOCHIER search field, contains the location key of the hierarchical location being searched for; otherwise it is empty.

IS_SHSTRAT
Contains certain Customizing data for the active search strategy

IS_SHFIELD
Contains the system Customizing data for the current search field

CT_VALUES
The result of the search is to be placed in this table. The KEY field has to be filled with the determined key of the search field. The text for it does not have to be entered. For methods of type 3, the value of the search field is not entered. Instead the differentiation criterion, which should be used to search in VICASHFVALUES, should be filled. In this case, wildcard characters ('%') are allowed for a search for similar values.

CD_DEFAULT_VALUE
If a default value was determined, it can be returned here. The default value is set when the value of the field, for which the search help was called, was initial at the time of the call.

CF_OTHER_VALUES_ALLOWED
This value should be returned as TRUE, if you want to have an option to choose "Other Values" in the search dialog box, in addition to the search result. If the user chooses this option, then the system calls the standard search help. The value does not influence whether the system checks the result of the search help (normally there is no check).

Method GET_VALUES_FOR_SHMETHDIFF
In addition to the parameters of GET_VALUES, the values that are maintained in the value table for the search strategy are also transferred to table IT_SHVALUES.

Example

Example class CL_EXM_IM_RECA_SEARCH_METHOD contains examples for the following search methods:

Type 1 - Search Strategy + Possibly Object Data => (Program) Values

GET_VALUES for LOCHIER search method
The hierarchical location of the parcel is derived from hierarchical locations to other location structures that are already entered in the system. A value is allowed here if the same text is entered for this location in Customizing.

GET_VALUES for PARTNR search method
The prerequisite here is that there is external number assignment for land registries (land register) and for the main contractual partner (survey office or responsible agency) of the parcel.
The partner number of the land register corresponds to the land registerdistrict; the number of the survey office corresponds to the first 8 characters of the leading hierarchical location.
This method might need to be adjusted to agree with the practices of your company regarding partner numbers. For example, it is possible thatthe partners could all have a prefix in the number, such as LR for land registry.

GET_VALUES for ADDR search method
The assumption here is that the postal code of the land registry corresponds to the land register district. All land registries, where postal code = land registry, are offered for selection.
For the parcel, the system searches for a partner with the "Responsible Agency" role, where the city agrees with the text of the hierarchical location of the parcel.

Type 2 Search Strategy =>SMETHDIFF => (Program) Values
GET_VALUES_FOR_SHMETHDIFF for ROLE search method
This search method is appropriate for the VENDOR search field. The search method returns all vendor numbers of partners for the role that are maintained in the value table for the search strategy.
For example, if you create your own role for insurance, you can assign a search strategy with this search method to a posting activity for "insurance costs".

Type 3 - Object Data => (Program) SMETHDIFF => (VICASHFVALUES) Values GET_SHMETHDIFF for VALREG search method
You can use this search method when the land registries for the land register district are entered in the value table. The search method determines the land register district for the current land register, or for the first 10 characters of the hierarchical location of the current parcel.

Notes for Developers

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency I   Valid for countries specified 
Customizing Attributes Country Key Country Name
REFX_RECA_SH_METH_CH CH Switzerland
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG REFX_RECA_SH_METH_CH 0 PEN0000002 Real Estate Localization Switzerland 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20121031 
SAP Release Created in 617