SlideShare a Scribd company logo
1 of 15
Lecture 6 Internal Tables BCO5647 Applications Programming Techniques (ABAP)
Readings & Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is an internal table ? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Defining an Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Filling an internal table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Filling an internal table – Example 1 A table  customers  has the following fields : cnum customer number cname customer name caddress customer address cphone customer phone no. report  intabex. tables: customers. data: begin of itabcust occurs 0,   cnum  like  customers-cnum,   cname like  customers-cname, end of itabcust. select  *  from customers.   move-corresponding customers to itabcust.   append itabcust. endselect.
Filling an internal table – Example 2 A table  customers  has the following fields : cnum customer number cname customer name caddress customer address cphone customer phone no. report  intabex. tables: customers. data: begin of itabcust occurs 0,   cnum  like  customers-cnum,   cname like  customers-cname, end of itabcust. select  cnum cname  from customers   into table itabcust.
Filling an internal table  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Filling an internal table  (cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sorting an Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Retrieving lines ,[object Object],[object Object],[object Object]
Retrieving lines (cont’d) ,[object Object]
Changing an internal table ,[object Object],[object Object]
Changing an internal table  -  Example. ,[object Object],[object Object],[object Object],[object Object]
Other table commands ,[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

good practices in formatting ms excel spreadsheets
good practices in formatting ms excel spreadsheetsgood practices in formatting ms excel spreadsheets
good practices in formatting ms excel spreadsheets
Descartes Arreza
 
Database Fundamentals
Database FundamentalsDatabase Fundamentals
Database Fundamentals
wmassie
 
Database Fundamentals
Database FundamentalsDatabase Fundamentals
Database Fundamentals
lindy23
 

What's hot (20)

Spread sheet tools presentation
Spread sheet tools presentationSpread sheet tools presentation
Spread sheet tools presentation
 
good practices in formatting ms excel spreadsheets
good practices in formatting ms excel spreadsheetsgood practices in formatting ms excel spreadsheets
good practices in formatting ms excel spreadsheets
 
spreadsheet program
spreadsheet programspreadsheet program
spreadsheet program
 
Microsoft Office Excel
Microsoft Office ExcelMicrosoft Office Excel
Microsoft Office Excel
 
Tabulation
TabulationTabulation
Tabulation
 
Ppt Lesson 13
Ppt Lesson 13Ppt Lesson 13
Ppt Lesson 13
 
Devry bis 155 week 3 quiz data analysis
Devry bis 155 week 3 quiz data analysisDevry bis 155 week 3 quiz data analysis
Devry bis 155 week 3 quiz data analysis
 
Lecture 6 spreadsheets
Lecture 6 spreadsheetsLecture 6 spreadsheets
Lecture 6 spreadsheets
 
Spreadsheet advanced functions ppt (2)
Spreadsheet advanced functions ppt (2)Spreadsheet advanced functions ppt (2)
Spreadsheet advanced functions ppt (2)
 
Database Fundamentals
Database FundamentalsDatabase Fundamentals
Database Fundamentals
 
Gse 213 lesson 3
Gse 213 lesson 3Gse 213 lesson 3
Gse 213 lesson 3
 
Intro to Data warehousing Lecture 04
Intro to Data warehousing   Lecture 04Intro to Data warehousing   Lecture 04
Intro to Data warehousing Lecture 04
 
Use of Excel Spreadsheets in Computing Grades
Use of Excel Spreadsheets in Computing GradesUse of Excel Spreadsheets in Computing Grades
Use of Excel Spreadsheets in Computing Grades
 
Database Fundamentals
Database FundamentalsDatabase Fundamentals
Database Fundamentals
 
Std 10 Computer Chapter 5 Introduction to Calc
Std 10 Computer Chapter 5 Introduction to CalcStd 10 Computer Chapter 5 Introduction to Calc
Std 10 Computer Chapter 5 Introduction to Calc
 
Dervy bis-155-week-5-quiz-new
Dervy bis-155-week-5-quiz-newDervy bis-155-week-5-quiz-new
Dervy bis-155-week-5-quiz-new
 
Spreadsheet for Year 8
Spreadsheet for Year 8Spreadsheet for Year 8
Spreadsheet for Year 8
 
Abap report
Abap reportAbap report
Abap report
 
29
2929
29
 
Powerpoint school
Powerpoint schoolPowerpoint school
Powerpoint school
 

Viewers also liked

Lecture08 abap on line
Lecture08 abap on lineLecture08 abap on line
Lecture08 abap on line
Milind Patil
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
Milind Patil
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
Milind Patil
 
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
Milind Patil
 
Lecture04 abap on line
Lecture04 abap on lineLecture04 abap on line
Lecture04 abap on line
Milind Patil
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
Milind Patil
 
0100 welcome
0100 welcome0100 welcome
0100 welcome
vkyecc1
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
Milind Patil
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
Milind Patil
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
Kranthi Kumar
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
Milind Patil
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
Milind Patil
 
0103 navigation
0103 navigation0103 navigation
0103 navigation
vkyecc1
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
Milind Patil
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
Milind Patil
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
vkyecc1
 
Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
Milind Patil
 

Viewers also liked (20)

Lecture08 abap on line
Lecture08 abap on lineLecture08 abap on line
Lecture08 abap on line
 
Lecture09 abap on line
Lecture09 abap on lineLecture09 abap on line
Lecture09 abap on line
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
 
Lecture04 abap on line
Lecture04 abap on lineLecture04 abap on line
Lecture04 abap on line
 
control techniques
control techniquescontrol techniques
control techniques
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
 
0100 welcome
0100 welcome0100 welcome
0100 welcome
 
Lecture16 abap on line
Lecture16 abap on lineLecture16 abap on line
Lecture16 abap on line
 
Lecture14 abap on line
Lecture14 abap on lineLecture14 abap on line
Lecture14 abap on line
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
 
Abap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecksAbap slide lockenqueuedataclustersauthchecks
Abap slide lockenqueuedataclustersauthchecks
 
Abap slide exceptionshandling
Abap slide exceptionshandlingAbap slide exceptionshandling
Abap slide exceptionshandling
 
0103 navigation
0103 navigation0103 navigation
0103 navigation
 
Abap slide class3
Abap slide class3Abap slide class3
Abap slide class3
 
Abap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checksAbap slide lock Enqueue data clusters auth checks
Abap slide lock Enqueue data clusters auth checks
 
Abap slides set1
Abap slides set1Abap slides set1
Abap slides set1
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
 
0106 debugging
0106 debugging0106 debugging
0106 debugging
 
Abap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfilesAbap slide class4 unicode-plusfiles
Abap slide class4 unicode-plusfiles
 

Similar to Lecture06 abap on line

BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
KeerthanaP37
 
Introduction to MySQL - Part 2
Introduction to MySQL - Part 2Introduction to MySQL - Part 2
Introduction to MySQL - Part 2
webhostingguy
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
Sydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexesSydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexes
paulguerin
 
Sap internal
Sap   internalSap   internal
Sap internal
kyashpal
 

Similar to Lecture06 abap on line (20)

Aspire it sap abap training
Aspire it   sap abap trainingAspire it   sap abap training
Aspire it sap abap training
 
Best SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | AspireBest SAP ABAP Training Institute with Placement in Pune | Aspire
Best SAP ABAP Training Institute with Placement in Pune | Aspire
 
Module 3
Module 3Module 3
Module 3
 
Hive commands
Hive commandsHive commands
Hive commands
 
BCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdfBCS4L1-Database Management lab.pdf
BCS4L1-Database Management lab.pdf
 
Introduction to MySQL - Part 2
Introduction to MySQL - Part 2Introduction to MySQL - Part 2
Introduction to MySQL - Part 2
 
Linked List
Linked ListLinked List
Linked List
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
MySQL Essential Training
MySQL Essential TrainingMySQL Essential Training
MySQL Essential Training
 
Sql server lesson6
Sql server lesson6Sql server lesson6
Sql server lesson6
 
Indexing
IndexingIndexing
Indexing
 
Sydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexesSydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexes
 
chapter2.PPT
chapter2.PPTchapter2.PPT
chapter2.PPT
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)MySQL Indexing : Improving Query Performance Using Index (Covering Index)
MySQL Indexing : Improving Query Performance Using Index (Covering Index)
 
Microsoft Excel Training
Microsoft Excel TrainingMicrosoft Excel Training
Microsoft Excel Training
 
Sap internal
Sap   internalSap   internal
Sap internal
 
BAPI - Criação de Ordem de Manutenção
BAPI - Criação de Ordem de ManutençãoBAPI - Criação de Ordem de Manutenção
BAPI - Criação de Ordem de Manutenção
 
9223301.ppt
9223301.ppt9223301.ppt
9223301.ppt
 
Less08 Schema
Less08 SchemaLess08 Schema
Less08 Schema
 

More from Milind Patil

Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
Milind Patil
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
Milind Patil
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
Milind Patil
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
Milind Patil
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
Milind Patil
 
Lecture07 abap on line
Lecture07 abap on lineLecture07 abap on line
Lecture07 abap on line
Milind Patil
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
Milind Patil
 
Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on line
Milind Patil
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
Milind Patil
 
Lecture15 abap on line
Lecture15 abap on lineLecture15 abap on line
Lecture15 abap on line
Milind Patil
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp software
Milind Patil
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programs
Milind Patil
 

More from Milind Patil (15)

Step by step abap_input help or lov
Step by step abap_input help or lovStep by step abap_input help or lov
Step by step abap_input help or lov
 
Step bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentationStep bystep abap_fieldhelpordocumentation
Step bystep abap_fieldhelpordocumentation
 
Step bystep abap_field help or documentation
Step bystep abap_field help or documentationStep bystep abap_field help or documentation
Step bystep abap_field help or documentation
 
Abap slides user defined data types and data
Abap slides user defined data types and dataAbap slides user defined data types and data
Abap slides user defined data types and data
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Step bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecordStep bystep abap_changinga_singlerecord
Step bystep abap_changinga_singlerecord
 
Abap reports
Abap reportsAbap reports
Abap reports
 
Lecture10 abap on line
Lecture10 abap on lineLecture10 abap on line
Lecture10 abap on line
 
Lecture07 abap on line
Lecture07 abap on lineLecture07 abap on line
Lecture07 abap on line
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
 
Lecture02 abap on line
Lecture02 abap on lineLecture02 abap on line
Lecture02 abap on line
 
Lecture01 abap on line
Lecture01 abap on lineLecture01 abap on line
Lecture01 abap on line
 
Lecture15 abap on line
Lecture15 abap on lineLecture15 abap on line
Lecture15 abap on line
 
Abap course chapter 6 specialities for erp software
Abap course   chapter 6 specialities for erp softwareAbap course   chapter 6 specialities for erp software
Abap course chapter 6 specialities for erp software
 
Abap course chapter 5 dynamic programs
Abap course   chapter 5 dynamic programsAbap course   chapter 5 dynamic programs
Abap course chapter 5 dynamic programs
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Lecture06 abap on line

  • 1. Lecture 6 Internal Tables BCO5647 Applications Programming Techniques (ABAP)
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Filling an internal table – Example 1 A table customers has the following fields : cnum customer number cname customer name caddress customer address cphone customer phone no. report intabex. tables: customers. data: begin of itabcust occurs 0, cnum like customers-cnum, cname like customers-cname, end of itabcust. select * from customers. move-corresponding customers to itabcust. append itabcust. endselect.
  • 7. Filling an internal table – Example 2 A table customers has the following fields : cnum customer number cname customer name caddress customer address cphone customer phone no. report intabex. tables: customers. data: begin of itabcust occurs 0, cnum like customers-cnum, cname like customers-cname, end of itabcust. select cnum cname from customers into table itabcust.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.

Editor's Notes

  1. Multitudes of records can be processed using internal tables – a very important part of ABAP programming ! Because internal tables are held in the current program’s memory space, the access time to read and process the data stored inside the internal tables is significantly less than a read of the database table. The trade-off is CPU time. The header record space holds a copy of whichever record has been read or modified, as well as any new record being added to the table. Individual data records in an internal table are known as table rows or table entries. Individual components in a row are referred to as columns of the internal table.
  2. To define an internal table body, use occurs n on the definitions of any field string. To define an internal table with a header line, you must include either begin of or with header line in the definition. The only time you would create an internal table without a header line is in the case of a nested internal table. The body of the internal table and the header line have the same name. Where you use that name determines what you are referring to. Example : data: begin of table1 occurs 0, fld1(1), fld2(2), end of table1. The fieldnames in the above example will be prefixed by the table name. Example : table1-fld1. If you cannot estimate the size of a table, set it to zero. The system will increase it as required. A table set to occurs 0 takes up 8-16K,
  3. You can read specific fields directly into an internal table using: select no name from vendor into table vendtab. Normally the previous content of the internal table is overwritten by the new data. If appending is used, the new lines are added at the end of the table. The append statement adds the content of the header line to the end of the internal table. The contents of an internal table can be appended to another table using the addition lines of . e.g. append lines of table1 from 10 to 20 to table2.
  4. In example 1, the order is implicitly determined by the sequence of fields in the line structure of the record; i.e. the left-most column represents the highest sort criterion. Note that only non-numeric fields are considered as sort criteria in this form of the statement. In example 2, studname takes precedence, within that the table is sorted by studid.
  5. Example 1. These statements display the student id and name for all entries of the internal table stud_tab. During the loop, the header line is filled with the current line of the table at each step. Example 2. The where clause can support all conditional operators that are supported for the if statement. During the loop the current line number is held in sy-tabix. Loops in internal tables can be nested. In addition you can specify the range of lines you want to work with. e.g. loop at stud_tab from 10 to 20.
  6. Reading single lines. Example 3. This reads the fifth line in the table. If the table does not have at least 5 entries, the return code sy-subrc returns a non-zero result. Example 4. If this read is successful, the index of the line is returned in sy-tabix. Example 5. Use of multiple keys. Example 6. The binary search algorithm requires that the table entries are sorted according to the specified key. This is a much faster way of locating entries in large tables.
  7. Insert : e.g. insert stud_tab index sy-tabix. Inserts before the current line. Delete : e.g. delete stud_tab index sy-tabix.
  8. Advanced commands - ref. to on-line Help.