Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

FOREIGN KEY AND TEXT TABLE.pptx

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
Shell programming
Shell programming
Cargando en…3
×

Eche un vistazo a continuación

1 de 17 Anuncio

FOREIGN KEY AND TEXT TABLE.pptx

Descargar para leer sin conexión

Foreign key and text table are vital concept in DB of SAP ABAP for working at the backend
all the concern topics with the relationship diagram are shown in the PPT and the text table with examples are given to create and demonstrate the concept

Foreign key and text table are vital concept in DB of SAP ABAP for working at the backend
all the concern topics with the relationship diagram are shown in the PPT and the text table with examples are given to create and demonstrate the concept

Anuncio
Anuncio

Más Contenido Relacionado

Más reciente (20)

Anuncio

FOREIGN KEY AND TEXT TABLE.pptx

  1. 1. FOREIGN KEY A PRIMARY KEY IS A FIELD OR COMBINATION OF FIELD THAT UNIQUELY IDENTIFY A RECORD IN A TABLE. • FOREIGN KEYS ARE USED TO ESTABLISH THE RELATIONSHIP BETWEEN THE DIFFERENT TABLES PRESENT IN THE ABAP DICTIONARY. • WE CAN CREATE VALUE CHECKS FOR INPUT FIELDS USING THE FOREIGN KEYS. VALUE CHECKS ARE REQUIRED TO VALIDATE THE VALUES OF SOME FIELDS IN A TABLE WITH THE VALUES OF OTHER FIELDS OF DIFFERENT TABLES. • THE TABLE THAT CONTAINS THE FOREIGN KEY IS CALLED A FOREIGN KEY TABLE AND ANOTHER TABLE THAT CONTAINS VALID FIELDS, KNOWN AS THE VALUE TABLE.
  2. 2. WHY DO WE NEED TO ESTABLISH RELATIONSHIP BETWEEN TABLES ? 1.DATA REDUNDANCIES WILL BE REMOVED. 2.CRASHING DATABASE VERY OFTEN WILL BE PREVENTED IN OTHER WORDS, EFFICIENCY CAN BE IMPROVED BY SPLITTING AND ESTABLISHING RELATIONSHIP AMONG TABLES. 3.SEARCHING AND FILTERING DATA WILL BE IMPROVED USING QUERY OF RELATED TABLE INSTEAD OF USING A VERY LARGE TABLE. 4.DATA MANAGEMENT UPDATE, DELETE ETC. WILL BE IMPROVED. RELATIONSHIP PROVIDES FLEXIBILITY ABOUT SUCH MANAGEMENT.
  3. 3. COMPONENT OF FOREIGN KEY • BELOW ARE SOME OTHER CONCEPTS RELATED TO THE FOREIGN KEY: • COMPOUND FOREIGN KEYS • GENERIC AND CONSTANT FOREIGN KEYS • THE CARDINALITY OF FOREIGN KEY
  4. 4. COMPOUND FOREIGN KEYS: • A FOREIGN KEY CONSISTING OF TWO OR MORE FIELDS IS CALLED A COMPOUND FOREIGN KEY. • TO APPLY CHECKS FOR COMPOUND FOREIGN KEYS, THE SYSTEM COMPARES TWO FIELDS IN THE FOREIGN KEY TABLE AGAINST THE TWO FIELDS IN THE CHECK TABLE.
  5. 5. GENERIC AND CONSTANT FOREIGN KEYS • AS WE KNOW, TO CREATE A FOREIGN KEY, ALL THE PRIMARY KEYS OF THE CHECK TABLE MUST BE INCLUDED IN A FOREIGN KEY RELATIONSHIP. • BUT IN SOME CASES, WE JUST WANT TO PERFORM VALIDATION AGAINST SELECTED FIELDS ONLY, AND OTHER FIELDS CAN BE EXCLUDED, SO FOR SUCH CASES, WE CAN USE THE GENERIC FOREIGN KEYS. • WE CAN ALSO ASSIGN A CONSTANT VALUE TO THE KEY FIELD OF THE CHECK TABLE, WHICH WILL ALLOW US TO CHECK THE VALUES AGAINST A CONSTANT VALUE OF THE CHECK TABLE.
  6. 6. THE CARDINALITY OF FOREIGN KEY • THE CARDINALITY OF THE FOREIGN KEY IS USED TO SPECIFY THE ALLOWED ROWS IN THE FOREIGN KEY TABLE FOR THE CORRESPONDING VALUE IN THE CHECK TABLE. • IT IS DEFINED WHILE CREATING THE FOREIGN KEY RELATIONSHIP. • IT CAN BE EXPRESSED AS X: Y RELATIONSHIP, WHERE X IS USED FOR THE CHECK TABLE, AND Y IS FOR THE FOREIGN KEY TABLE. • EXAMPLE: IF THE CARDINALITY IS GIVEN AS 1:N, IT MEANS THERE IS EXACTLY ONE RECORD THAT EXISTS FOR EACH RECORD OF THE FOREIGN KEY TABLE.
  7. 7. ABAP TEXT TABLES • A TEXT TABLE IN SAP ABAP IS A DATABASE TABLE USED TO STORE THE DESCRIPTIONS OF A FIELD IN DIFFERENT LANGUAGES. • FOR EXAMPLE, IN ENGLISH WE STORE A DESCRIPTION AS “COMPUTER” AND IF YOU WANT TO STORE THIS IN GERMAN LANGUAGE ALSO WE CAN ALSO DO THE SAME.
  8. 8. CURRENCY AND QUANTITY FIELD • A CURRENCY FIELD IS A COMPONENT OF A STRUCTURE, DATABASE TABLE, OR VIEW DEFINED IN ABAP DICTIONARY OF TYPE CURR AND USED TO RECORD AN AMOUNT IN A SPECIFIC CURRENCY. THE AMOUNT IS SPECIFIED AS A WHOLE NUMBER IN THE SMALLEST UNIT OF THE CURRENCY. • A CURRENCY FIELD MUST BE ASSOCIATED WITH A CURRENCY KEY OF A STRUCTURE, DATABASE TABLE, OR VIEW THAT SPECIFIES THE CURRENCY AND THE NUMBER OF DECIMAL PLACES. A CURRENCY KEY IS A COMPONENT OF A STRUCTURE, DATABASE TABLE, OR VIEW DEFINED IN ABAP DICTIONARY, HAS THE TYPE CUKY, AND CAN CONTAIN A CURRENCY ID FROM THE DATABASE TABLE TCURC.

×