‎2007 Jul 23 1:29 PM
1.what is table maintenance generator and how to create
that? What is the transaction code?
2.How many types of table joins are there?
3.difference between inner join & outer join?
4.what is a match code ? Lock objects ?
‎2007 Jul 23 1:33 PM
Hi,
1.what is table maintenance generator and how to create
that? What is the transaction code?
3.difference between inner join & outer join?
4.what is a match code ? Lock objects ?
-
Table maintenance generator is used to create screen to maintain values in a table. Once you create maintenance generator, you can goto transaction SM30 and add data to table .
-
Here are the steps to create the table maitenance generator for a ZTable :-
1.SE11.
2.CHOOSE TABLE.
3.UTILITIES--->TABLE MAINT GENERATOR.
4.AUTH GRP : W/O AUTH.
5.FUNCTION GRP: PROJ DEPENDENT (SEE CREATE FUNC GROUP).
6.MAINT TYPE : 2 STEP.
7.MAINT. SCR NO. : CLICK APPL BUTTON | FIND SCR. NUMBER(S) |
8.CHOOSE PROPOSE SCREEN NO FROM POPUP.
9.REMEMBER OVERVIEW SCR NO.
10.CLICK CREATE BUTTON ON APPL TOOL BAR.
11.CLICK SAVE ON FUNC TOOL BAR.
12.GO TO SE93. TO CREATE TRANSACTION CODE.
13.WRITE SUTIABLE TRAN NAME..CLICK CREATE
14.CHOOSE TRANSACTION WITH PARAMETERS(LAST).
15.FILL SHORT TEXT.
16.OK
17.TRANSACTION : SM30.
18.CHECK SKIP INITAL SCREEN CHKBOX
19.SCREEN NO : FROM STEP 9.
20.IN TABLE BELOW
NAME OF SCREEN FIELD VALUE.
VIEWNAME [TABLENAME]
UPDATE X
21.SAVE
22.RUN TRAN CODE IN COMMAND BOX.
-
tcode is SM30
-
2.How many types of table joins are there?
3.difference between inner join & outer join?
please refer the link below it will help you
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec77446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm
http://www.w3schools.com/sql/sql_intro.asp
-
4.what is a match code ? Lock objects ?
The MATCH CODE is nothing but a DDIC search help. If you want to assign a search help to a PARAMETERS or SELEC-OPTIONS in your report program you can use MATCH CODE followed by name of the DDIC search help. Make sure that the DATA ELEMENTS are matched when you make the assignment.
for more information on search help please referr the following link it help you
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
-
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.
Hope this will give a basic idea.
-
************please reward points if the information is helpful to you***************
‎2007 Jul 23 1:39 PM
Table maintainance generator is creted so that one can enter data in Ztables.
in se11 when you create a ztable after activating it in menu Utilities you can see option of Table Maintainance generator afetr creating table maintainance you go to sm30/31 & enter the name which you entered in table maintainance (preferred to have same name as table name) . now you can create & delete entries.
2> in SAP only inner join & left outer join.
3> in inner join all records for equality joins are fetched.
in outer join (only left outer join in SAP) records matching for equality condition are fetched for second table & all records for first table .
4> match code is used to provide search helps for parameters in reports
lock objects are used to lock tables before updating so that we can update it safely without allowing others to allow to update in the mean time.
rewar points if helpful
‎2007 Jul 23 1:45 PM
hi,
Table maintenance generator is used to create screen to maintain values in a table. Once you create maintenance generator, you can goto transaction SM30 and add data to table .
-
Here are the steps to create the table maitenance generator for a ZTable :-
1.SE11.
2.CHOOSE TABLE.
3.UTILITIES--->TABLE MAINT GENERATOR.
4.AUTH GRP : W/O AUTH.
5.FUNCTION GRP: PROJ DEPENDENT (SEE CREATE FUNC GROUP).
6.MAINT TYPE : 2 STEP.
7.MAINT. SCR NO. : CLICK APPL BUTTON | FIND SCR. NUMBER(S) |
8.CHOOSE PROPOSE SCREEN NO FROM POPUP.
9.REMEMBER OVERVIEW SCR NO.
10.CLICK CREATE BUTTON ON APPL TOOL BAR.
11.CLICK SAVE ON FUNC TOOL BAR.
12.GO TO SE93. TO CREATE TRANSACTION CODE.
13.WRITE SUTIABLE TRAN NAME..CLICK CREATE
14.CHOOSE TRANSACTION WITH PARAMETERS(LAST).
15.FILL SHORT TEXT.
16.OK
17.TRANSACTION : SM30.
18.CHECK SKIP INITAL SCREEN CHKBOX
19.SCREEN NO : FROM STEP 9.
20.IN TABLE BELOW
NAME OF SCREEN FIELD VALUE.
VIEWNAME [TABLENAME]
UPDATE X
21.SAVE
22.RUN TRAN CODE IN COMMAND BOX.
tcode is SM30
2. joins are of 4 types
1. equi join
2. inner join
3. cross join
4. outer join.
3. inner join : when used between two tables then common fields of both tables are accessed
ii. outer join: common fields of both tables and uncommon fields of both tables can also be accessed.
4. match code : providing search helps to objects in sap.
lock objects: to maintain data integrity
if helpful reward some points.
with regards,
Suresh Aluri.
‎2007 Jul 23 1:47 PM
<b>Inner Join and Outer Join </b>
The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
___________________________________________________________
LOCK OBJECTS:
The SAP system synchronizes simultaneous users to the same records via a lock mechanism. This lock mechanism is nothing but 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.
The data records of a table to be locked are defined by a logical condition. When a lock is set, this logical condition is entered in a lock table. This entry is retained until it is removed by the program or the program comes to an end. All the locks set by a program are thus removed at the end of the program.
To set a lock a lock object must be defined in the ABAP Dictionary. When this lock object is activated two function modules are generated with the names ENQUEUE_< lockobj name > and DEQUEUE_<Lock object name >.You must call these function modules for locking and unlocking your data records. The values of the key fields that specify the records to be locked are passed to the tables contained in the lock object when the function module is called or else there will be a generic lock if values are not passed for all the key fields.
Structure of the Lock Objects:
The tables in which data records should be locked with lock requests along with their key fields are defined in the Lock objects. When tables are selected, one table i.e. the primary table is first selected. Further tables can also be added by using the foreign key relationship.
Lock Argument:
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.
A lock mode can be assigned for each table in the lock object. This mode defines how other users can access a locked record of the table.
Creating Lock Objects:
1. Select object type Lock Object in the initial screen of ABAP Dictionary, enter the name of the object you want to create and choose [ Create ].Note : the name of the lock object should start with E.
EX: We created a lock object with the name EZ_FLIGHT_01 and provided the short text .
2. The maintenance screen then appears for this lock object, write the short text in the space provided for this .
3. Enter the name of the primary table of the lock object. All other tables in the lock object must be provided here who are linked with each other through foreign keys. [ Note : There are other conditional notes also available for the foreign key relationships which could be referred from the sap library .
Provided the name of the primary table SFLIGHT .
4. Select the lock mode of the primary table. This is used as a default value for the parameters of the generated function module.
Selected the lock mode as Exclusive, Cumulative .
[ Lock Modes : 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. Basically the lock mode describes what kind of lock is it.Below is a list of the lock modes available:
Shared Lock [ Lock Mode S ] : Several transactions can access the data in same time in display mode .Request from further shared locks are accepted, even if they are from different users .An Exclusive lock set on an object that already have a shared lock is rejected.
Exclusive Lock [ Lock Mode E ] : An exclusive lock protects the locked object against all types of locks from other transactions. Only the same lock owner can reset the lock (accumulate).
Exclusive but not cumulative lock [ Lock Mode X ] : Whereas exclusive locks can be requested several times by the same transaction and released one by one, an exclusive, non-cumulative lock can only be requested once by the same transaction. Each further lock request will be rejected.
Optimistic lock [ Lock Code O ]: Optimistic locks initially behave like shared locks and can be converted into exclusive locks. ]
Hope these documents will be of help !!There are even more documents available in SDN , may be you can refer them as well ..
<b>MATCH CODE OBJECTS</b>
Macro Choosefields (&Fieldname [Choose)... [Copy EndMacro
/SE11 "ABAP Data Dictionary
<Object name "the name of the Match Code Object
*Matchcode objects
[Create ><Short Text ><Primary Table
[Tables
[Yes "Save before terminating Editing?
><Development Class [Save
[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.
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 "TATA" and whose location is
"INDIA."
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.
CHECK THIS LINK
http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef46446011d189700000e8322d00/content.htm
http://web.mit.edu/sapr3/docs/webdocs/dontindex/pdf/mcqc.pdf
Regards,
Pavan