How can I create a two-dimensional array in ABAP?
ABAP does not use an array concept, but anything you would do with a multidimensional array, you can do with ABAP.
The internal table is like a one-dimensional array of records. For two dimensions, you have a number of choices. You can put the second dimension as another key field. You can use nested tables -- where a field of the record is in a table itself. And if you really want to, you can create dynamic tables -- where the number of fields in a record isn't determined until run time.
Rather than look at the question of how to create a two-dimensional array in ABAP, the question you should be addressing is "How can I solve this business/data problem?" It is a mistake to apply the concepts of one programming language directly to another. A wider view gives better solutions.
Dig Deeper on SAP ABAP
Related Q&A from Matthew Billingham
An SAP user is trying to run a report in an SAP ALV Grid online and wants to know how to get the data in the report to appear along with the header.continue reading
An SAP user needs information on how to change the password on several SAP user accounts from a central location.continue reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.