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

Former Member
0 Likes
683

Hi Experts,

How to create Search help and lock objects in SE11.

Thanks&Regards,

Sreedhar

1 ACCEPTED SOLUTION
5 REPLIES 5
Read only

Former Member
0 Likes
595

Hi Sreedhar,

check this link

fuller.mit.edu/tech/search_helps.ppt

here u can find the ppt detailed reg searchhelp

How many types of lock objects?

How to create Lock objects?

What is the main use of it in real time?

for all these questions u can get detailed info in the below link

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

Hope this will give a basic idea

Reward pts if useful...

Regards

Sreenivas

Read only

Former Member
0 Likes
595

Hi

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

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm

Search Help Exits:

Creating Elementary Search Helps

Procedure

In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.

A dialog box appears in which you must select the type of search help.

Select Elementary search help and choose .

The maintenance screen for elementary search helps appears.

Enter an explanatory text in the field Short text.

You can for example find the search help at a later time using this short text.

In the Definition tab page enter the selection method of the search help.

You can enter the name of a table or a view (database view, projection view or help view) here. If you enter a table that has a text table, the name of the text table is automatically entered in the corresponding field.

Using the input help (F4 help), select fields of the selection method as parameter in the Search help parameter area. Select the fields that should be used in the dialog box for value selection or in the hit list.

If the selection method is a table that has a text table, both the fields of the table and the fields of the text table are offered in the input help.

The data element of the parameter is automatically copied from the selection method. The data element defines the output attributes and the F1 help of the parameter in the hit list and in the dialog box for value selection.

You can assign the parameter another data element. To do so, select the Mod flag. The Data element field is now ready for input. Then select a data element with the input help (F4 help). Only data elements whose data type, length and number of decimal places is the same as those of the previous data element can be assigned.

This removes the link between the data element of the search help parameter and the data element of the selection method field having the same name. If you cancel the Mod flag, the data element of the assigned table field is used again.

Define the attributes of the search help parameters.

Select the IMP flag if it is an import parameter. Select the EXP flag if it is an export parameter.

You can define the dialog for the input help with the fields LPos, SPos and SDis. Enter the parameter position in the hit list in LPos. If you enter nothing or the value 0 here, the parameter is not displayed in the hit list.

Enter the parameter position in the dialog box for value selection in SPos. If you enter nothing or the value 0 here, the parameter is not displayed in the dialog box for value selection.

Set the SDis flag if the parameter should be a pure display field in the dialog box for value selection. The user is thus informed that the contents of the parameter restrict the value, but he cannot change this restriction. This makes sense for example when the parameter is an import parameter or if it has a default value.

You can assign the parameter a default value in the Default value field.

Select the dialog type of the search help.

The dialog type defines how the hit list is displayed in the input help.

Save your entries.

A dialog box appears in which you have to assign the search help a development class.

Choose .

Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.

Result

The search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred during activation, the activation log is automatically displayed.

Other Options

Assign a hot key: If the search help is to be accessed with a hot key, you must enter a one-place ID in the Hot key field. All the elementary search helps contained in a collective search help should have different short cuts.

Assign a search help exit: In exceptions, you might have to change the standard flow defined by the search help with a search help exit. In this case enter the name of the search help exit in the corresponding field.

Test the search help: You can test the flow of an input help defined by the elementary search help with . A dialog box appears in which you can simulate the behavior of the search help under different conditions. You can obtain information about the options provided in this window with .

http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ee5f446011d189700000e8322d00/content.htm

.

For our example, it would be DEQUEUE_EZMARA.

Refer the code executed by user (say abap1) for

matnr = ’000000000000000012’.

Lock Objects are used to synchronize access to the same data by more than one user. Function modules that can be used in application programs are generated from the definition of a lock object in the ABAP Dictionary.

The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules .These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.

Structure of a Lock Object

The tables in which data records should be locked with a lock request are defined in a lock object together with their key fields.

When tables are selected, one table (the primary table) is first selected. Further tables (secondary tables) can also be added using foreign key relationships.

Lock Arguments

The lock argument of a table in the lock object consists of the key fields of the table.

The lock argument fields of a lock object are used as input parameters in the function modules for setting and removing locks generated from the lock object definition. When these function modules are called, the table rows to be locked or

unlocked are specified by defining certain values in these fields.These values can also be generic. The lock argument fields therefore define which subset of the table rows should be locked

.

Data Dictionary/ Lock Objects

The simplest case of a lock object consists of exactly one table and the lock argument of the table is the primary key of this table. Several tables can also be included in a lock object. A lock request therefore can lock an entire logical

object, and not only a record of a table. Such a logical object can be for example a document comprising an entry in a header table and N entries in a positiontable.

Lock Mode

The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the

lock table of the system for each table. Access by more than one user can be synchronized in the

following ways:

Exclusive lock: The locked data can only be displayed or

edited by a single user. A request for another exclusive lock

or for a

shared lock is rejected.

Shared lock: More than one user can access the locked data

at the same time in display mode. A request for another

shared lock is accepted, even if it comes from another user. An exclusive lock

is rejected. Exclusive but not cumulative: Exclusive locks can be requested

several times from the same transaction and are processed

successively. In contrast, exclusive but not cumulative locks

can be called only once from the same transaction. All other

lock requests are rejected.

1) Select object type Lock object in the initial screen of the ABAP Dictionary, enter an object name and choose Create. The name of a lock object should begin with an E (Enqueue).The maintenance screen for lock objects is displayed.

2) Enter an explanatory short text in the field Short text. You can then use the short text to find the lock object at a later time, for example with the R/3 Repository Information System.

3) Enter the name of the primary table of the lock object. All other tables in the lock object must be linked with the primary table using foreign keys.

4) Select the lock mode of the primary table in the field below it The lock mode is used as the default value for the corresponding parameters of the function modules generated from the lock object.

5) Choose Add if you want to lock records in more than one

table with the lock object. A list of all the tables linked with the primary table using valid foreign keys is displayed. Select the appropriate table. The lock

mode of the primary table is copied as lock mode. You can change this setting as required, for example you can assign the lock mode separately for each table.

Similarly, you can add a table linked with the secondary table just added with foreign keys. To do this, place the cursor on the name of the secondary table and choose Add.

If no lock mode is assigned to a table, no lock is set for the

entries in this table when the generated function modules are

called. You should not assign a lock mode if a secondary table

was only used to define a path between the primary table and

another secondary table with foreign keys.

6) Save your entries.

A dialog box appears in which you have to assign the lock

object a development class.

7) You can define whether the function modules generated from

the lock object should be RFC-enabled on the Attributes tab

page. If you set the Allow RFC flag, the generated function

modules can be called from within another system with Remote

Function Call. If you permit Remote Function Calls for an

existing lock object, you must ensure that the generated

function modules are called from within an ABAP program with

parameters appropriate for the type. You should therefore check

all programs that use the associated function modules before

activating the lock object with the new option.

😎 Choose Activate

Reward if u sefull

Read only

Former Member
0 Likes
595

Hi Sreedhar,

search helps are two types. Elementary search help and collective search help.

To create elementary search help, go to se11. Give name and press create. select elementary search help. description is mandatory. give selection table. Give fields you know as input the fields you want as output. and give position for the fields like 1,2. For example if you know material type and to know all the material numbers exists for that material type use selection table as mara and fields mtart as input material number as output. and give positions as you want. activate the search help.

If you know plant and find what are all the material in that plant give selection table as marc and fields as werks and matnr and create another elementary search help.

To create collective search help, from se11 create it and give the description and the elementary search helps. and activate. test it.

There are 3 types of lock objects. shared, exclusive, exclusive cumulative. shared means only first user can able to change. Others can view. Exclusive only the first user can view and change. Others cannot view or change. Exclusive cumulative means only it can be used once in program and also same as exclusive.

To create lock objects go to se11 and give name ez_name and create. Give description and table name and activate it. The system automatically creates 2 function modules enqueue_ez_name and deque_ez_name. Enqueue function module is used to lock the record in the program and deque is used to release lock.

regards,

kamala.