Sunday, 1 May 2011

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.

No comments:

Post a Comment