Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

data dictionary

Former Member
0 Kudos

hi all,

pl, explain lock object, match code & search help.

with regards,

6 REPLIES 6

Former Member
0 Kudos

LOCK OBJECTS:- are used in SAP to avoid the inconsistancy at the time of data is being insert/change into database.

SAP Provide three type of Lock objects.

• Read Lock(Shared Locked)

protects read access to an object. The read lock allows other transactions read access but not write access to

the locked area of the table

• Write Lock(exclusive lock)

protects write access to an object. The write lock allows other transactions neither read nor write access to

the locked area of the table.

• Enhanced write lock (exclusive lock without cumulating)

works like a write lock except that the enhanced write lock also protects from further accesses from the

same transaction.

Do the following steps..

GO TO SE11

Select the radio button "Lock object"..

Give the name starts with EZ or EY..

Example: EYTEST

Press Create button..

Give the short description..

Example: Lock object for table ZTABLE..

In the tables tab..Give the table name..

Example: ZTABLE

Save and generate..

Your lock object is now created..You can see the LOCK MODULES..

In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function

MATCH CODE:- Matchcodes are defined in two stages in Abap/4 Dictionary:

1) The revelant table and fields are stipulated in matchcode object. A matchcode object describes the set of all possible search paths for a search item.

2) One or more matchcode ID can be defined for a matchcode object. A matchcode ID describes a special search path for a search term.The fields or combination of fields via which the search is to take place is defined in the matchcode ID.

In the initial screen of Data Dictionary,

Enter a name for your new object, click on the Matchcode radio button, and press the Create button.

Enter descriptive text as you enter your primary table on the Attributes screen and press the Save button.

The primary table represents the primary source table for the subsequent field search. Secondary tables can also be maintained at this point by double-clicking on the primary table or pressing the Tables button. These tables must link to the primary table through foreign keys.

The Maintain Matchcode Object attributes screen.

At this point you have the option of creating the matchcode as a local object or attaching it to a transport request. After you have done this, click on the Save button

The Create Object Catalog Entry screen.

As the status bar reflects, the mandatory key fields are transferred automatically .If you want, you can press the Fields button and maintain any selection fields you want. At this point you need to click on the green arrow to go back to the Maintain Attributes screen.

The Maintain Matchcode Object (Fields) screen.

The next step in the creation process is to activate the matchcode object. The status of the object is New and Saved .

The matchcode attributes prior to activation.

The status is now set to Active and Saved. Next you need to create a matchcode ID or your object will be incomplete.

To do this, click the Matchcode IDs button.

The matchcode attributes after activation.

The system will prompt you to create a new ID if one does not exist To do this, click on the Yes button.

A prompt to Create Object.

On the Create Matchcode ID screen , specify a matchcode ID number, valid input ranges from all of the alphabet, and any number. You can also click on the down arrow to view a range of valid entries.

The Create Matchcode ID dialog box.

Let's view some possible entries this list window shows a number of matchcode IDs and a short description of each. Choose one and click on the green arrow.

A Matchcode hit list.

Follow these steps we learned to maintain selection fields for this matchcode ID, be sure to enter an Update type, and click on Save . At this point, you can enter further selection criteria by pushing the Selection Criteria button.

Maintenance of matchcode attributes.

In the Maintain Selection Conditions screen, you can enter and maintain fields and selection criteria for your matchcode IDs. Here is an example of a requirement of a Material Number not greater than the value of 8888 .When finished, click Save and the green arrow to go back.

The Maintenance Selection Conditions dialog box.

Now all you have to do is activate your matchcode ID and your new object is ready to use

Generate and use the matchcode.

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 ..

Reward points if this helps.

regards,

preet

Former Member
0 Kudos

Hi,

LOCK OBJECTS

How many types of lock objects?

How to create Lock objects?

What is the main use of it in real time?

Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.

SAP Provide three type of Lock objects.

- Read Lock(Shared Locked)

protects read access to an object. The read lock allows other transactions read access but not write access to

the locked area of the table

- Write Lock(exclusive lock)

protects write access to an object. The write lock allows other transactions neither read nor write access to

the locked area of the table.

- Enhanced write lock (exclusive lock without cumulating)

works like a write lock except that the enhanced write lock also protects from further accesses from the

same transaction.

You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.

Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.

Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.

Technicaly:

When you create a lock object System automatically creat two function module.

1. ENQUEUE_<Lockobject name>. to insert the object in a queue.

2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.

You have to use these function module in your program.

MATCH CODE

What is meant by "Matchcode"?

Matchcodes are defined in two stages in Abap/4 Dictionary:

1) The revelant table and fields are stipulated in matchcode object. A matchcode object describes the set of all possible search paths for a search item.

2) One or more matchcode ID can be defined for a matchcode object. A matchcode ID describes a special search path for a search term.The fields or combination of fields via which the search is to take place is defined in the matchcode ID.

Regards,

kavitha.

Edited by: kavitha koppada on Apr 8, 2008 11:28 AM

prasanth_kasturi
Active Contributor
0 Kudos

SAP locks.

The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for

an entire application object. An application object consists of one or more entries in a database

table, or entries from more than one database table that are linked using foreign key

relationships.

Lock Types

There are two types of lock in the R/3 System:

• Shared lock

Shared locks (or read locks) allow you to prevent data from being changed while you are

reading it. They prevent other programs from setting an exclusive lock (write lock) to

change the object. It does not, however, prevent other programs from setting further read

locks.

• Exclusive lock

Exclusive locks (or write locks) allow you to prevent data from being changed while you

are changing it yourself. An exclusive lock, as its name suggests, locks an application

object for exclusive use by the program that sets it. No other program can then set either

a shared lock or an exclusive lock for the same application object.

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

matchcode object

This addition links the input field of the parameter to a search help search_help from the ABAP Dictionary. The name of the search help must be entered directly. For the input field of the parameter on the selection screen, the input help key is displayed. When the input help (F4) is requested, the user is displayed the hit list from the search help. When an entry is selected, the respective value is placed into the input field. If no search help for the specified name exists in the ABAP Dictionary, a message is displayed in the status line when the input help is requested.

Former Member
0 Kudos

hi,

Lock objects:

simultaneous access of records by two users synchronized by lock objects.

Lock objects: Lock Object is used to avoid the inconsistency data on the table while updating more than one user.

types of lock objects:

- Read Lock(Shared Locked)

protects read access to an object. The read lock allows other transactions read access but not write access to

the locked area of the table

- Write Lock(exclusive lock)

protects write access to an object. The write lock allows other transactions neither read nor write access to

the locked area of the table.

- Enhanced write lock (exclusive lock without cumulating)

works like a write lock except that the enhanced write lock also protects from further accesses from the

same transaction.

Matchcode:

It is used to display the possible input entries for the corresponding field. 4.6 onwards match code object calling as search help.Match code objects : First of all this is an addition to the PARAMETER stmt ,and used to link a selection screen field with a search help for providing list of input values.Match codes – tool to help you search for data records in the system

venkat_o
Active Contributor
0 Kudos

Hi Shirish, Check this. Regarding Locks Lock Mechanism You can synchronize access by several programs to the same data with a logical lock mechanism. This lock mechanism fulfills two main functions: . A program can tell other programs which data records it is just reading or changing. . A program can prevent itself from reading data that is just being changed by another program. To set locks, a Lock Object must be defined in the ABAP Dictionary. When this lock object is activated, two functions are generated with the names ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname>. If data records are to be locked, you must call function module ENQUEUE_<lockobjectname>. The values of the key fields that specify the records to be locked are passed for all the tables contained in the lock object when the function module is called. There is a generic lock if a value is not passed for all the key fields. The function module writes the appropriate lock entry. If another program also requests a lock, it will be accepted or rejected depending on the lock mode. The program can then react to this situation. Locked data records can be unlocked by calling function module DEQUEUE_<lockobjectname>. The key values and the lock mode used to set the lock must be passed to the function module.

"--------------------------------------------------------------------------------------------------------------------------------------|
" Exclusive(Write) Lock               |Shared(Read) Lock                            |Exclusive but not cumulative                      |
"--------------------------------------------------------------------------------------------------------------------------------------|
*The locked data can only be          |More than one user can access the            |Exclusive but not cumulative locks                |
*displayed or edited by a single user.|locked data at the same time in display mode.|can be called only once from the same transaction.|
"--------------------------------------------------------------------------------------------------------------------------------------|
*A request for another exclusive lock |A request for another shared lock is         |All other lock requests are rejected.             |
*or for a shared lock is rejected.    |accepted, even if it comes from another user.|                                                  |
*                                     | An exclusive lock is rejected.              |                                                  |
"--------------------------------------------------------------------------------------------------------------------------------------|
-


>To create Lock objects in the dictionary just follow the link. [http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm] Regarding Search helps. Search Help The user can display the list of all possible input values for screen fields with the input help (F4 Help). This standard process can be completely defined by creating a search help in the ABAP Dictionary. This search help only has to be assigned to the screen fields in which they should be available

|--------------------------------------------------------------------------------------------------------------------------------------|
"Elementary Search Help                                                        |Collective Search Help
|--------------------------------------------------------------------------------------------------------------------------------------|
|The elementary search help must define where                                  |Combine several elementary search helps. The user can  |
|the data of the hit list should be read from (selection method),              |thus choose one of several alternative search paths    |
|how the exchange of values between the screen template and                    |with a collective search help.                         |             
|selection method is implemented (interface of the search help)                |                                                       | 
|and how the online input help should be defined                               |                                                       |
|(online behavior of the search help).                                         |                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------|
|Components :                                                                  |The interface parameters (import and export parameters)|
|-> where does the data displayed in the hit list come from(Selection method). |of the included search helps must be assigned to the   |
|-> What information should be displayed in the dialog box for value selection |parameters of the collective search help.              |          
|   and in the hit list (Search help parameters).                              |                                                       |
|-> what field contents can be taken into account for hit list selections      |                                                       |
|   and which values in the hit list can be returned to the screen fields      |                                                       |
|   (search help parameters)                                                   |                                                       |
|-> what dialog steps should be executed in the input help (dialog behavior)   |                                                       |
"--------------------------------------------------------------------------------------------------------------------------------------|
To create search helps , Check the documentation. [http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm] Regarding Match code These are obselete instead of these Search helps have come. I hope that it helps u .. Regards, Venkat.O

Former Member
0 Kudos

Hi Shirish,

For Lock Objects , check this link:

Link:[http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]

For Search Helps , check this link:

Link:[http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]

Match code objects are obsolete.

Reward if helpful.