Application Development and Automation 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: 
Read only

Search Help and Lock Object

Former Member
0 Likes
1,489

Hi Friends,

Could any one of please explain what is search Help and lock objects.

and how to create it.

jai.

Hi Friends,

Could any one of please explain what is search Help and lock objects.

and how to create it.

jai.

4 REPLIES 4
Read only

Former Member
0 Likes
989

Hi,

LOCK OBJECT.

purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.

Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:

1. enque_lockobject

1. deque_lockobject

before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.

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_ LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function

Lock objects:

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm

Match Code Objects:

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html

See this link:

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

Check these links -

SEARCH HELP...

earch Help

Use

With this function you can search for objects, thereby defining and linking different selection conditions for the search help.

Prerequisites

You can call this function by:

· Selecting Object ® Search... () in the main menu bar of the Integration Builder

· Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)

In this case the software component version is defined as the search criteria.

Features

Defining the Object Type

You can select the object type in a dropdown list in field Object Type.

In the design (Integration Repository) you can

· Select an object type (for example Message Interface)

· Select a cross-object category (for example Interface Objects)

In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.

-

-


CHECK THIS LINK TO CREATE A SEARCH HELP.

http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm

Search help are two types :

1 Elementary Search help

2.Collective search help.

Elementary serach help is single table f4 value ..

Goto SE11 and select radio button search help and use name start with Z* or Y* and click on create button ..

you will get pop up window and select elementary search help and hit enter..

Now use Your table and Table parameters properly..

go to se11

give your search help name.. F5

click the elementary radio button..

select the table(VBAK) from which you want the values in SELECTION METHOD..

give the field name(your field ) in the Search help parameter..

save and activte it..

Now in your program

select-options: s_ot type vabk-xxx matchcode object ..

you will get f4 help now..

Regards,

Priyanka.

Read only

Former Member
0 Likes
989

Hi Guru,

Search Help :

Basic Search Help

Creating a basic search help which allows you to provide the user with a selection help to select specific fields from

a table or view is very straight forward. Simply create a search help with the desired table as the selection method

and add the fields you want them to see/select into the search help parameters section. See below for details of how

to create a search help for table TRDIR

steps:

Step1: Execute transaction SE11

Step2: Create new search help called 'ZSH' (must be less than 5 chars long to be used as matchcode)

Step3: Enter the following details:

http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm

Step4: Save and activate

Step5: Add following line into your program: PARAMETER p_prog LIKE trdir-name MATCHCODE OBJECT zsh.

Or see other methods of adding a search help.

Lock Objects :

Lock mode

Defines how to synchronize table record access by several users

Exclusive lock or read lock

The locked data can be read or processed by one user only. A request for another exclusive lock or for a shared lock is rejected.

Shared lock or write lock

Several users can read the same data at the same time, but as soon as a user edits the data, a second user can no longer access this data. Requests for further shared locks are accepted, even if they are issued by different users, but exclusive locks are rejected.

Exclusive but not cumulative lock

Exclusive locks can be requested by the same transaction more than once and handled successively, but an exclusive but not cumulative lock can only be requested once by a given transaction. All other lock requests are rejected

Thanks,

Reward If Helpful.

Read only

former_member196299
Active Contributor
0 Likes
989

hi ,

here are some of the informations about search helps :

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 )

1) Elementary search helps ( ESH 😞 These kind of 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).

An ESH defines the standard flow of an input search. The following components of this flow can be defined in the search helps.

• Where does the data displayed in the list come from( selection method ).

• What information should be displayed in the dialog box for value selection and the in hit list ( search help parameters ) .

• What field contents can be taken into account for hit list selection and which values in the hit list can be returned to the screen fields (import and export parameters).

• What dialog step should be executed in the input help ( Dialog behavior ) .

Selection Method: The possible input values of fields displayed in the hit list are determined at runtime by a database selection. In Selection method we provide the

Table name from where the data is being selected. If data retrieval is from more than

two tables then we can create a view ( database view or help view ) and then use it in Selection method . If the tables are client specific then the client field must be copied to the view or else the selection will be for all the clients.

Sear help parameters: A search help has an interface consists of parameters. These parameters defines the fields of the selection method that should be used in the input field. The parameters are copied from the corresponding selection method, that is they always have the same name as the corresponding field of the selection method.

If the search is restricted with a parameter of the search help, this is used in the data selection for formulating a WHERE condition for the field of the selection method with the same name. A data element should be assigned to each search help parameter in other words you define a type for the search help parameter.

Import and Export parameters: The interface of a search help defines the context data that can be used in the input help (import) and the data that can be returned in the input template (export) .

When an input help is called, the entries that the user already made in the input template are taken into consideration. For example, if a user calls the input help for the flight number and already specified the carrier, of course only the numbers of flights of this carrier should be offered. On the other hand if the user selects one row of the hit list, more than one field of the input template might have to be filled with data from the selected row of the hit list. For example, if the flight number is obtained from the hit list, the city of departure and the destination should also be returned in the screen template.

Creation of Elementary Search Help:

The creation of an elementary search help is described below with example.

1. Open TCode – SE11 for DDIC objects -> select the radio button for Search helps -> give the name of the search help you want to create, ex – ZSH004.Click on Create .

2. In the next screen select the option “ Elementary search help “ .

3. Now you need to provide the short text for your search help.

4. In the selection method provide the table or view name you want to use for data retrieval. Ex. ZMARA_01.

5. Select the dialog type according to your scope, ex. “ display values immediately’.

6. Then provide the search help parameters i.e. the interface parameters for the search help .

7. The ZMARA_01 table fields MATNR, ERSDA,MHDHB,MHDHT,MHDRZ are provided by selecting the table fields , by doing this the data elements for these fields are automatically copied to the interface from the selection method.

8. Now define the type of parameter ( import or export ) here for the selection and return of values in runtime.

9. Provide the positions to these parameters to specify how they will be arranged in the hit list display.

10. Now save the object in the respective development class and check the same for errors and then activate .Finally the creation of a ESH ( ex: ZSH004 ) is complete and can be used for providing the input help.

Regards,

Ranjita

Read only

Former Member
0 Likes
989

Hi,

A lock object is used as the locking mechisum. So for example, the user gos to VA02 to change a sales order, in this program, a lock is set. You can see such locks in transaction SM12. If a lock is set, and another user accesses the same sales order, then they will get a message saying that the sales order is locked. The ENQUEUE function module is used to set the lock, the DEQUEUE function module is to release the lock.

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.

Elementary search helps defines a search path where we will define the table from which the data has to be read and the selection criteria. Through import and export parameters. Used when we gets the data rom a single table.

Collective search helps:- Combination of elementary search helps. When we need to fetch data based on multiple selection criteria’s. More than one tables or Selection from multiple tables

For more help on Search helps , Check this http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

<b>Reward points</b>

Regards