‎2007 Jul 22 11:24 AM
hi to all experts,
my question is what are match code and matchcode id . what are the differences between search help and match codes.help me very urgent.
‎2007 Jul 23 7:57 PM
Hi,
Search Help : With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
Matchcode : A match code is a tool to help you in searching for data fro the database
Matchcode ID: Several matchcode IDs can be created for one matchcode object. The matchcode IDs are derived from the matchcode object by projection (field selection) and selection (definition of a selection condition).
A matchcode ID must be identified within a matchcode object with one letter or digit. This means that a maximum of 36 matchcode IDs (26 letters and 10 digits) can be defined for each matchcode object.
‎2007 Jul 22 12:03 PM
hi,
Match code is a tool to help us to search for data records in the system. Match Codes are an efficient and user-friendly search aid where key of a record is unknown.
A match code Id is a one character ID that can be a letter or a number.
Yes, the number 0 to 9 are reserved for us to create our own Match Code Ids for a SAP defined Matchcode object.
If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated. The update type stipulates when the matchcode is to be updated and how it is to be done. The update type also specifies which method is to be used for Building matchcodes. You must specify the update type when you define a matchcode ID.
follow this link for sample program...........
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee2b446011d189700000e8322d00/frameset.htm
regards,
Ashok Reddy
‎2007 Jul 23 8:01 AM
Hi
Match codes and search helps both are same which are used as a search tool for getting the fields values from a table
In Latest versions of SAP match codes are replaced with search helps
Match code Id's are agian the different ways fetching the field values using different fields from a table
see the doc how to create search help
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
CREATION:
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
See the links:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 23 9:49 AM
hai abdul,
matchcode checks the database table independently and it checks the relationship between the tables. where as search helps checks database table independently and it w'll not check the relationship between the tables.
inorder to create matchcode we techncially use it as matchcode id.
Regards,
Prasad
‎2007 Jul 23 11:51 AM
there is not much difference between search helps and mtach codes.
Search help you use for a fields directly for providing input help and you provide the input help for a field using match code in Parameter statement.
There is a standard way of providing input values to any screen field in ABAP reporting. This way of providing input values can be defined by creating the search helps in ABAP dictionary and using them in reports .
Search helps: Search helps are used to assign an input help ( F4 help ) to screen fields. You can do this by creating a search help for that screen field. And these search helps has only to be assigned to the corresponding screen fields.
There are 2 types of search helps according to their use are available in SAP.
They are : 1) Elementary search helps ( ESH )
2) Collective search helps ( CSH )
Match code object : you define in program like this
PARAMETERS : P_MATNR LIKE MARA-MATNR MATCH CODE object ID.
some more info :
A search help can be created in ABAP Dictionary ( tcode se11 )
Create a new search help (say myHelp) , choose Elementary search help (simple one), select Definitions tab, enter the table name(say myTable) in "Text Table" text box.
Then enter the column to be used (say myField) for this help in search help parameter, choose Import/Export, give Lpos as 1, and activate. ( You can add more columns from the same table here).
In report, code as
parameter p1 like myTable-myField matchcode object myHelp.
when you execute this report, p1 will have a f4 help enabled. The help list will have all values from myTable for field myField.
‎2007 Jul 23 7:57 PM
Hi,
Search Help : With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
Matchcode : A match code is a tool to help you in searching for data fro the database
Matchcode ID: Several matchcode IDs can be created for one matchcode object. The matchcode IDs are derived from the matchcode object by projection (field selection) and selection (definition of a selection condition).
A matchcode ID must be identified within a matchcode object with one letter or digit. This means that a maximum of 36 matchcode IDs (26 letters and 10 digits) can be defined for each matchcode object.
‎2007 Jul 30 1:23 PM
Hi
Match codes and search helps both are same which are used as a search tool for getting the fields values from a table
Here is complete Overview of Match code with each and everypoint covered
Match Code
Matchcodes are an SAP technique to help users find information, normally in
connection with the F4 key on an input field. Information from one or more
tables can be combined and queried on using various search criteria: for
example, all companies whose name starts with "LEVI" and whose location is
"San Francisco."
<b>How are matchcodes implemented?</b>
Traditionally, matchcodes were implemented as redundant collections of data
in pool tables, as illustrated in the following:
Company header table Company detail table Matchcode pool table
(TAB1) (TAB2) (M_POOL)
The advantage of the old pool matchcodes was a quick and easy search, as
long as the significant fields were entered by the end user (in this case,
company name and location). The disadvantage was that for every change in
the master tables, the system had to make redundant updates in the matchcode
tables. In addition, it was impossible to search in a pool matchcode for any
but the significant fields, i.e., it would have been very CPU intensive to
search for all companies in San Francisco.
This limitation led to the creation of matchcodes (more precisely, in SAP
terms, "matchcode IDs") for every possible query you could expect from end
users (one with company name as the significant field, one with location,
yet another with customer number, and so on). Customers with a very high
number of debitors, for example, soon found that their pool matchcode tables
grew to unmanageable sizes.
As of release 2.1, it is now possible to define so-called transparent or
view matchcodes. Transparent matchcodes are implemented by defining a
database view for the information that should be queried. Database views are
not redundant containers of data, but are merely definitions of paths to
obtaining that data. In the example:
Company header table Company detail table Database view:
(TAB1) (TAB2) (M_VIEW)
The advantage of this new technique is that it is no longer necessary to
maintain redundant matchcode data: a view takes only a small amount of
database dictionary space. Using this technique, the query is converted by
the database to a query against the original tables, so it becomes very
important that access be supported by the proper indexes.
Matchcode Customizing
When a transparent matchcode ID is activated, the system checks if an
appropriate index exists for the ID. Normally, such an index is necessary to
support the matchcode query. If such an index does not exist, there can be
major performance problems during matchcode selection. The system assumes
that the first field in the matchcode definition (for client-dependent match
codes the first field after the client field) is the relevant search field,
i.e., that the user will narrow down the search by entering a selection
criterion in this field.
An index is considered appropriate for the matchcode if it contains this
relevant matchcode field (or the client field followed by this field).
If no such index exists, a warning is given during the activation of the
matchcode ID. At this point, there are two possible courses of action:
1) If the matchcode view in the database covers less than 1,000 data
records, it is not necessary to create an index.
2) If the matchcode view will search more than 1,000 records, you should
create an index.
The first fields of an index to support matchcode selection should be
those that will be searched with equality (client, language or general
fields for which the get/set indicator has been set, i.e., the flag GP is
set for the field in the screen Update Matchcode ID Fields).
The index should have the following structure:
Client field -
Fields for which the Get Parameter flag is setSearch fields -
This index structure does not guarantee that the index willDeactivating matchcode IDs (as of Release 3.0)
Prerequisites for conversion
Conversion procedure
Searches are case sensitive
Sort order in output changes
Result set of a query can be smaller
The result set of a query on a transparent ID can be a real subset of the
results of an equivalent query on a physical matchcode ID. This is because
of the fact that transparent IDs are implemented with an inner join, whereas
the physical matchcodes are realized with an implicit outer join.
When searching with a transparent ID, records of a primary table that have
no corresponding entries in the foreign key fields of a secondary table will
not be found.
<b>Example:</b> An ID provides the search for an employee's personnel number using
name and department. The primary table contains the personnel number and
name. The secondary table contains departments and their employees.
Employees who have not been assigned to a department have no entry in the
secondary table. THose employees will not be found in a search with a
transparent matchcode with fields number, name and department. In a physical
matchcode ID with the same fields, those employees will be found.
Adapting partial fields
[Choose Sec. Tab. "presents candidate list
(&Tablename [Choose)... [Copy
[Fields
[Yes "Save before terminating Editing?
[Enter
(&Tablename [Choose Fields #Choosefields)..
[Save [Back [Activate
"Match Code Object is now created and activated.
<b>Or simply follow this</b>
SE11à Search Help à Zmatchcode(Give ur name with starting Z) à F5(Create)
à Short Descriptionà Selection Method(Select your table or press F4 and select)
à Dialog Type(Display Values Immediately,Dialog Depends on Set of Values, Dialog with restriction.)
*For present you can select Display Values Immediately*
Next goto Search Help Parameter declare your fields from table which already you had declared above. Then select both Import & Export Paramaters Give Lpos & Spos 1. Then check(Ctrl+F2) Then activate it.
Search Help
A search help is an object of the ABAP Dictionary with which input helps (F4 helps) can be defined.
There are the following types of search helps:
· Elementary search helps implement a search path for determining the possible entries.
· Collective search helps contain several elementary search helps. A collective search help therefore provides several alternative search paths for possible entries.
· Append search helps can be used to enhance collective search helps delivered by SAP with customer-specific search paths without requiring a modification.
The three components of the input help process described by a search help are the outer interface, the online behavior and the method of data collection.
The outer interface is defined by specifying the interface parameters They define the context information to be used in the input help process and the attributes to be sent to the screen by the input help.
The search help attachment defines the field contents for parametrizing an import parameter and the fields of the input template in which the contents of the export parameters should be returned.
The dialog behavior and data collection are defined differently for elementary search helps and collective search helps.
The behavior of a search help can be made more flexible than usual with search help exits
Elementary Search
An elementary search help is a search help that describes an input help process in which it is not possible to select one of a number of search paths.
The online behavior of an elementary search help is controlled by defining the dialog type and by specifying the fields to be displayed in the dialog box for restricting values or in the dialog box for displaying the hit list (including the order in these dialog boxes). These fields must be defined as parameters of the search help.
For data collection, a database table or a view is normally defined and the possible values are selected here. This table/view is called the selection method of the search help. If the selection method is a table, a text table can also be used for collecting data if one exists. In the selection, those fields of the selection method (and possibly of the text table) which have parameters with the same names in the search help are used.
If the standard options for describing the online behavior or data collection for the search help are not sufficient, you can define its behavior more flexibly by using a search help exit
Collective Search
A collective search help describes an input help process in which the user can choose one of several alternative search paths. Each alternative search path corresponds to an elementary search help i.e. a collective search help contains several elementary search helps.
Both elementary search helps and other collective search helps can be included in a collective search help. if a collective search help contains other collective search helps, they are resolved down to the level of the elementary search helps when the input help is called.
Like an elementary search help, a collective search help has an interface of import and export parametersThe data is exchanged between the screen template and the parameters of the elementary search helps contained in it using this interface. The parameters of the search helps included in a collective search help must be assigned to the parameters of the collective search help.
During the input help process, the collective search help only controls the user's selection of the required search path. The rest of the dialog and data collection is controlled by the selected elementary search help. If selection of the required elementary search help should be made flexible (e.g. with context-specific definition of the set of available search paths), the collective search help must be assigned a search help exit
Append Search
An append search help is used for modification-free enhancement of a collective search help (that is not the original in the current system) with further search help inclusions. This technique can be used for example in special developments and country versions, and by SAP partners and customers to add further search paths to a collective search help of the standard system.
An append search help has a fixed assignment to a collective search help (its appending object). This appending object is enhanced with the append search help.
The structure of an append search help corresponds to that of a collective search help, but the append search help takes on the parameters of its appending object so that it cannot be maintained separately any longer. Furthermore, an append search help cannot be assigned a search help exit.
An append search help is automatically included in its appending object. The parameters of the two search helps having the same name are assigned to each other.
Note: You can also hide modification-free search helps from a collective search help with an append search help. You have to insert the search help to be hidden in the append search help and then hide the inclusion there. The search path(s) defined by this search help are no longer offered in the appending search help. To cancel this, remove the hidden inclusion again from the append search help.
Note: Append search helps can also be used themselves to describe an input help. They are treated like collective search helps.
Note: If the parameters of the appending object change, this change is not automatically made in the append search help. Instead, you are informed that the parameters of the append search help should be adjusted. In this case you should check if you want to change the assignments between the parameters of the append search help and the search helps included in them.
Procedure: Proceed as follows to enhance a collective search help of the standard system with your own search paths:
1. For each search path, create an elementary search help in your namespace and activate these search helps.
2. In display mode, go to the maintenance screen for the collective search help and choose Goto -> Append search helps. Create the append search help in your namespace.
3. Include the elementary search help defined in the first step in the append search help. Maintain the parameter assignments between the parameters of the append search help and the parameters of the included search helps.
4. Activate the append search help. The append search help is automatically added to your appending object. The search paths inserted in the append search help are now available in the collective search help. They appear at the end of the list of available elementary search helps.
Search Help Exit
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
This module has been created as an example for the interface and design of Search help exits in Search help
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several
Events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
For more detailed information please refer to the documentation describing the concept of the search help exit.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
The following timepoints are defined:</b></u>
1. <b>SELONE</b>
Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
2. <b>PRESEL1</b>
After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
3.<b> PRESEL</b>
Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
4. <b>SELECT</b>
Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
5. <b>DISP</b>
Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
6.<b> RETURN</b> (usually as return value for the next timepoint)
The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
7.<b> RETTOP</b>
You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
8. <b>EXIT</b> (only for return as next timepoint)
The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
9. <b>CREATE</b>
The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
10. APP1, APP2, APP3
If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the moment). This search help exit should not do anything at this timepoint. Any preparatory work should be carried out at timepoint PRESEL1.
<b>Standard Search Help Exit for Changing Hit List</b>
Functionality of F4UT_LIST_EXIT
Shadowing mechanism
Default Value
Dependencies
Process On Value request
PROCESS ON VALUE-REQUEST.
Event in user-programmed help that occurs when the user presses F4 with the cursor positioned on a screen field. The modules specified in the subsequent FIELD statements are called instead of the SAP help system.
<b>Example</b>
FIELD XY MODULE XYZ
Module XYZ determines the value of field XY and places it in the input field on the screen.
VALUES
Definition of the valid input values:
FIELD field_name VALUES (list of values)
The list of values can define single values and/or intervals for input values that are allowed or not allowed. The values must be enclosed in apostrophes and separated with a comma.
('value') valid single value
(NOT 'value') invalid single value
(BETWEEN 'value' AND 'value') valid values in the interval
(NOT BETWEEN 'value' AND 'value') invalid values in the interval
SELECT
SQL interface
SELECT * FROM table name
WHERE table-keyfield = inputfield
and ....
INTO fieldname
WHENEVER NOT FOUND (or FOUND)
SEND ERRORMESSAGE (or WARNING)
messagenumber
WITH fieldname ...
You do not have to specify a message number and var. texts (WITH). If there is an error (FOUND or NOT FOUND), a standard message is output.
If the INTO ... statement is not defined, the table entry is not read in.
Check table
Table whose key fields are used to check the foreign key fields (see Foreign Keys). Only entries that are contained in the key fields of the check table can be contained in the foreign key fields.
The check table is used to check whether the input values are valid and for the input help (F4 help).
Foreign key
A foreign key creates a link between two tables T1 and T2. Every primary key field from T1 (check table) is assigned a field from table T2 (foreign key field). The fields from T2 assigned to primary key fields are marked as foreign key fields.
The most important function of the foreign key is the support of data integrity. The foreign key fields can only accept values which appear in the primary key of the check table. During input the values of the foreign key fields can thus be checked against the entries of the assigned key fields of the check table.
Foreign keys are also the foundation for defining lock objects, maintenance views and help views. These objects contain fields from several tables. All the tables used in such an object must be linked with foreign keys.
Dialog type
The dialog type defines the dialog steps executed for an input help.
There are the following dialog types:
· Immediate value display: The hit list is displayed immediately after the input help has been called. This option is advisable if the hit list usually contains only a few entries.
· Dialog with value restriction: The dialog box for restricting values is displayed immediately. Select this option if the list of possible entries is normally very large. Restricting the set of data to be processed increases the clarity of the hit list and reduces the system load during value selection.
· Dialog depends on value set: If the hit list contains less than 100 entries, it is displayed immediately. If the hit list contains more than 100 entries, the dialog box for restricting values is displayed.
Search Help Parameter
A search help parameter is a field for controlling the behavior of a search help.
There are the following roles for search help parameters, where a parameter can have more than one role:
1.
Import parameters:
These are parameters with which context information can be copied to the input help process from the input template or from the module pool of the processed screen.Export parameters:
These are parameters with which values can be returned to the input template from the input help process.Internal parameters:
These are parameters used for the input help process. Further data can be applied in the input help process using parameters that appear in the dialog box for restricting values or that have a default value. Furthermore, all the fields displayed in the hit list are internal parameters of the search help.
See the links:
pls go through this for search help creation
++
‎2007 Jul 30 2:58 PM
1.What is a Match Code?
2.What are the two levels in defining a Match Code?
3.What is the max no of match code Ids that can be defined for one Match code object?
4.Can we define our own Match Code IDs for SAP Matchcodes?
5.What is an Update type with reference to a Match code ID?
6.Can matchcode object contain Ids with different update types?
7.What are the update types possible?
The following update types are possible:
·
Update type A:The matchcode data is updated asynchronously to database changes.
·
Update type S:The matchcode data is updated synchronously to database changes.
·
Update type P:The matchcode data is updated by the application program.
·
Update type I:Access to the matchcode data is managed using a database view.
·
Update type L:Access to the matchcode is achieved by calling a function module.
8.What are the two different ways of building a match code object?
9.What are the differences between a Database index and a match code?
· Match code can contain fields from several tables whereas an index can contain fields from only one table.
· Match code objects can be built on transparent tables and pooled and cluster tables.
" Difference B/w Search Help & Match code ObjectMatch code is nothing but the Search help in Higher versions ... You can expand this concept by finding existing SAP search helps that are more than ...
reward points if it is usefull ......
Girish