Sunday, 1 May 2011

SEARCH HELP and Lock Objects

SEARCH HELP

ABAP Dictionary: search help  & lock objects                                                                                                                                  

Customer table                                                            ORDER TABLE























   Search help : provide a list of values from database provide the curser or respective field and press F4 for search the

v                       if it is simple F4 it can check the tables independently but it does n’t check relation b/w the tables i.e. primary key & foreign key relation shown in above fields.
v                       If it is match code objects first it can check the tables intently late it can check relation b/w the tables also.
v                       So match code object +F4 in better
v                       With Match code objects user can avoid  ‘Data redundancy’

§   Having r/3 Presentation server
§   Apart from it having Application server and having R/3 database server
§   Imagine these environment
§   Now I can say Presentation server having SAP GUI FRONT-END
§   We are going to use recruitment application in R/3 application server
§   If u look into tables having dept tables, having emp details tables in database server
§   END-USER can work on Recruitment application in Application server
§   With SEARCH HELP user can get list of values from R/3 database
§   F4 is for SEARCH HELP
§   Regarding search help SAP provided MATCH CODE objects concepts
§   Make it I implemented MATCH CODE objects on dept tables
§   Match code object+f4 is also search help

F4 is for search help and it can execute search help while searching the data independently from respective tables

*                  Match code objects + F4 is for search help and it can execute search help based on primary foreign key relations
*                  Match code objects avoids data redundancy.

questions on DATA DICTIONARY


1)      What are the different types of data dictionary objects?
Ans :  Tables – Data Elements – Domains  -  Structure – Foreign Keys

2)      How many types of tables exist and What are they in data dictionary?
Ans : Transparent Tables -  Pooled Tables – Cluster Tables

3)      What is the step by step process to create a table in data dictionary?
Ans : Create Domain – Create Data elements – Create fields – Create Tables

4)      Can a transparent table exist in data dictionary but not in the database physically?
5)      What are the domains and data elements?
Ans : domain describes Technical Characteristics of a table fields e.g. value range
6)      Elements describe role played by a fields in technical contains e.g. Form of field text.

7)      Can you create a table with fields not referring to data elements?   
Ans : yes
            

VIEWS


VIEWS

view creation:   view is logical table and it maintain the data at runtime only.

§                     If u look into previous class, created database tables i.e:1) ydept(fields are dno & dname) this table is for dept details, 2) yempk(emp details) fields are eno, dno, ename.
§                     Based on these two tables provide a definition for VIEWS
§                     Ydept + yempk = views
§                     Here views contains i.e. yviews (fields are dno, eno, dname)
§                     View is a virtual table
§                     Working with prog part, I can apply SQL statement i.e.: select * from yviewk
§                     View maintains the data on run time only
Once execute program its puts impact






ENO
DNO
E Name









d.no
Dname



 

Dno
Eno
Dname




 

Eno
D name
Ename







 








 
                                 
                                  +                                    =
                                                                                                                                                                                    










            view demo:



                           
§   go to ABAP Dictionary.
§   select  view and provide view name YJVIEW.
§   go for create.
§   select database view[because we are using database tables based on database view]
§   provide short text :DEMO
§   provide tables which we are using for view creation i.e. YJEMP                                                         YJDEPT        
§   provide Joined condition Relation by selecting Joined

YJEMP                     ENO                          = YJDEPT          ENO
§   Go with view fields
§   Provide the fields from above view table [diagram]

   ENO                                 YJEMP                      ENO                                                                                                                       DNO       YJDEPT DNO                                                                                                                                                                            ENAME     YJEMP   ENAME                    

§   ctrl+s  development class
§   ctrl+f3   local object
§   For execution: go with Utilities from menu under
§   Utilities select contents
§   press f8 for execute
§   It will show the records from both tables what we selected
§   advantage of view is performance


Demo for relative b/w the tables


Demo for relative b/w e tables
Also creation of view of this  table


§                     Go to ABAP Dictionary
§                     select database table and provide name   YJEMP
§                     Go for Create
§                     Provide description for table : Employee Details
§                     Select Attributes option in that window (attributes are properties of tables
Under attributed
§                     Provide delivery class A (indicates master & transactional detail
§                     Enables checkbox for maintenance allowed
Go to field option under this 
Fields               P.k       Field type
Eno                              YENOJDATA                        
§                     Ctrl+s
§                     Double click on Dataelement i.e. YENOJDATA   
§                     enter
§                     Provide short text for Data element   Data element for ENO
§                     Provide Domain name YENOJDOMAIN (we create it later i.e. next Step)
§                     Go with fields label
§                     Provide length and label
Medium 20   Employee number
§                     Ctrl +s
§                     Go with definition
§                     Double click on domain which u provided i.e. YENOJDOMAIN
§                     Provide short text for domain Domain for End
Data type : CHAR
Length  :           10
§                     ctrl +s
§                     ctrl +F3
§                     F3
§                     Activate Data element
§                     F3 Back   ß
§                     Go with new rows
§                     Provide second field Ename
§                     Go with Data element Direct type
§                     For second field provide the data type and length
Data type         : CHAR
Length              :           25
§                     Ctrl +s
§                     Select GoTo option from menu
§                     Click at à technical setting   enter
§                     Under setting provide data class   :Application 1
§                     Size category : 1 it means 6100 records can be sted
§                     Select 1 Buffering not allowed
§                     Ctrl +s
§                     F3
§                     Activate the table ctrl+F3
Inserting of Records
  • Go to   utilities from menu   enter
  • Choose          Table Contents
  • select create and enter key
  • Enter a record
  • Eno                         : 1
    Ename                     : Rajendra
    §                     Ctrl +s
        F3 is back
    Creation of YEDEPT table : ( Another table )
    §                     Go to ABAP Dictionary
    §                     Provide table : VJDEPT
    §                     Go for Create
    §                     Provide the Description   Dept Details
    §                     Delivery class   A
    §                     Enable check box for maintenance allowed
    §                     Go with fields option provide the first field
                                              Field              Pk            field type
                                              DNO                                             YDNOJDATA( Data element )
    §                     Ctrl+s
    §                     Double click on Data element mentioned above (ydnodata) Enter
    §                     Provide short text   Data element for DNO
    §                     Provide Domain YENOJDOMAIN
    §                     Provide Domain of ENO of YEMP table because there two tables properties ABAP
    §                     go with field label and provide length & label :Medium  20   Dept Number
    §                     Ctrl+s   or we can use ctrl+F3 for save & activate
    §                     Ctrl +F3 and f3 for back
    §                     Go with new rows
    §                     Provide second field ENO
    §                     And provide Data element which we already created for  in YEMP table because labels are same i.e. YENOJDATA
    §                     Go with Foreign key symbol i.e. (After new rows we can see this button)
    §                     Provide short text  : Relation b/w VJEMP and VJDEPT
    §                     Provide check table (primary key table name ) VJEMP
    Provide primary key table name
    §                     Accept the proposal  enter (here proposal means relation of two tables)
    §                     By seeing check box we can identity foreign key.
    §                     Provide last field
    DNAME without Data element direct type
    §                     Provide Data Type (char ) and length (30) for last field
    §                     Go to
    §                     Settings
    §                     Provide Data class   Application 1
    §                     Size category   1
    §                     Select buffering not allowed
    §                     Ctrl+s and f3 for back
    §                     Ctrl+f3
    Inserting a record : choose utilities  from menu
    §                     Contents
    §                     Create
    §                     Enter record
    Dno                          : 10
    ENO                         : 1
    D Name                   :HRDEPT
    * It will saved successfully.
    §                     Enter one more record
    DNO                        :              11
    ENO                         :              2
    D NAME                 :              FI DEPT
    NOTE:             It will give error because second record is not available in YJEMP table relation will not exists.