Difference between Structure and work area

by | Oct 7, 2020 | ABAP Differences

Home » SAP » ABAP » ABAP Differences » Difference between Structure and work area

Preface – This post is part of the Differences in ABAP for Interviews series.

Introduction

We have already discussed Work Area and Structure in SAP ABAP. We already know how they are created and used within the ABAP Report programs. Structure and Work Area in ABAP coding are almost same. It is hard to specify any difference. In this article we will discuss the difference between Structure and work area.

Structure in SAP ABAP

A Structure in SAP ABAP is a part of group TYPES in SE11, which consists components that also, refer to a type.

In simple terms, a structure is a reusable component that contains fields and holds single records at runtime.

Work Area in SAP ABAP

A work area in ABAP represents single row of an internal table and it is used to process internal table line by line. It holds only single data at runtime.

 

Difference between Structure and work area

StructureWork Area
A structure is created using SAP Data Dictionary (SE 11) as well as within a ABAP program.A work area is created within a report or Function Module.
A structure can be a global as well as a local component.A work are is a local component
A structure is reusable across all the ABAP programming interfaces and data dictionary.A work area is reusable within the report it is created.
A structure can be nested at multiple levels.A work area cannot be nested.

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Author