SlideServe
Menu
Préférences
© SlideServe · v2026

ABAP Tables

eugene avatar
22 diapositives · 538 Views · Sep 03, 2014

ABAP Tables. Northern Arizona University College of Business. Database tables. To reference a database table inside an ABAP program the Tables identifier must be used. Tables: Sflight. Records - Revisited. Data: Begin of Flight_Record , Carrid Like Sflight-Carrid ,

ABAP Tables - slide 1
01 / 22ABAP Tables
1 / 17

Télécharger la présentation

ABAP Tables
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. ABAP Tables Northern Arizona University College of Business

  2. Database tables • To reference a database table inside an ABAP program the Tables identifier must be used. Tables: Sflight .

  3. Records - Revisited Data: Begin of Flight_Record , Carrid Like Sflight-Carrid , Connid Like Sflight-Connid , End of Flight_Record .

  4. Internal Tables Data: Begin of INT_Demo Occurs 100 , Carrid Like Sflight-Carrid , Connid Like Sflight-Connid , End of INT_Demo .

  5. Internal Tables Data: Begin of INT_Demo Occurs 100 , Include Structure Sflight , End of INT_Demo .

  6. Internal Table Structure Header Header Items Items

  7. Header Record • The header record is a temporary holding area. • The header contains data before it is written to the internal table (append). • The header contains data after an item has been read.

  8. Item Records • The item records are the internal table. • All usage of the items are via the header record.

  9. Selecting from an External Table Select * from Sflight into Flight_Record. Select Carrid Connid from Sflight into Flight_Record.

  10. Moving from the record to the header of the internal table. Move: Flight_Record-Carrid to INT_Demo-Carrid , Flight_Record-Connid to INT_Demo-Connid .

  11. Appending records from the header to the items. Append INT_Demo. • The contents of the header record are added to the end of the items.

  12. Clearing the Header Clear INT_Demo. • The Clear statement clears the header only, not the items.

  13. Clearing the Items Refresh INT_Demo. • The Refresh statement purges the internal table of all data, but not the header.

  14. Sorting the Internal Table Sort INT_Demo by Carrid Ascending SeatsOcc Descending . • Up to 50 fields can be sorted .

  15. Determining the number of items Data: W_Lines type I , W_Cnt type I . Describe INT_Demo Lines W_Lines .

  16. Looping through the table While W_Cnt < W_Lines . W_Cnt = W_Cnt + 1 . Read Table INT_Demo Index W_Cnt . . . . . . . . EndWhile .

  17. Field Strings (Record) Data: Begin of INT_Key , City(10) type C , State(2) type C , End of INT_Key .

  18. Read with Key Move ‘Flagstaff’ to City . Move ‘AZ’ to State . Read Table INT_Demo with Key INT_Key . Read Table INT_Demo with Key INT_Key Binary Search .

  19. Loop At Loop At INT_Demo . whatever . EndLoop .

  20. Loop At Where Loop At INT_Demo Where condition . whatever . EndLoop .

  21. Modifying an item Loop At INT_Demo . (modify the header field(s)). Modify INT_Demo Index sy-tabix . Clear INT_Demo . EndLoop .

  22. Deleting an item Loop At INT_Demo . If whatever . Delete INT_Demo Index sy-tabix . EndIf . Clear INT_Demo. EndLoop .