160 likes | 295 Views
ABAP/4 PROGRAMMING. Data Dictionary(1). 講 師:呂 昇 燦. Data Browser - SE16.
E N D
ABAP/4 PROGRAMMING Data Dictionary(1) 講 師:呂 昇 燦
Data Browser - SE16 ABAP Workbench tool for displaying information about table entries.You use the Data Browser to1.display table entries. 2.display table field values and their texts. 3.branch from table entries to check table entries. To maintain table entries, you must set the maintenance attribute for the table concerned. You can modify the Data Browser display to suit customer-specific requirements.
Table Types: Transparent database table (is created in the database) Pooled table (table data is stored in the appropriate table pool) Cluster table (table data is stored in the appropriate table cluster)
Basic Dictionary Objects Data element uses Domain uses
Transparent Tables ABAP/4 Dictionary Logical table definition field1 field2 field3 field4 field1 field2 field3 field4 Database-physical table definition
Structures ABAP/4 Dictionary Logical table definition field1 field2 field3 field4
Aggregate Objects : View Aggregate Objects are objects which are formed from several tables Views are application-dependent displays of various ABAP/4 Dictionary tables Provide users with information from fields of various tables required
Exercise:Create a Table SE11--Create a new tables ZMKPF_FDEVxx mandt, mblnr, mjahr, budat Save,Check,Active APPL0(Rarely update),APPL1(Frequently update) Size
Logical Database A logical database is linked to an ABAP report program as one of the program attributes. It supplies the report program with a set of hierarchically structured table entries derived from different database tables. This saves the developer from having to program the data retrieval. Interaction between database and report--During program processing,subroutine are performed in the database program and events are executed in the report.
Use Command to retrieve data Declare Table Select * from t1 [into wa] [where f1 op v1 and/or f2 op v2 …] [order by f1] t1 is names of a table previously defined on a tables statement wa is the name of work area that matches the structure of the table f1 is the name of a field in table t1 op is one of the following logical operator: = <> > >= < <= v1 is a literal or variable Endselect
Event Driven Top-Of-Page. End-Of-Page. Initialization Start-Of-Selection End-Of-Selection At Line-Selection
SCREEN DECLERATION SELECTION-SCREEN: BEGIN OF BLOCK [block name] WITH FRAME TITLE text-t01. SELECT-OPTIONS: var FOR [Table-Field]. SELECTION-SCREEN: END OF BLOCK [block name]. Text Element
Useful Command NO STANDARD PAGE HEADING Line-size 132(3). Line-count 65(3). Uline. Hide
Exercise:Create a Report Program Naming- YFOXCONN_FDEV_TESTxx xx is your two-digit group number. Create a selection screen with the variant MBLNR in table MKPF. Create a At Line-Selection event to drilldown all the details of selected Material Document. Hint:You must declare MKPF,MSEG tables and write a command to call MSEG from MKPF.
System Fields Table ‘SYST’ display all system fields: sy-index sy-datum sy-tabix sy-uname sy-dbcnt sy-subrc sy-langu sy-tcode sy-ucomm sy-lsind ……………...
Definition of a relationship between two tables. To form a foreign key, the fields of one table (known as the foreign key table) are assigned to the primary key fields of another table (known as the check table). Foreign keys are used to check input on screens, and to define the relationships between the tables in a view, matchcode object, or lock object. Foreign key