Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

  • 0
  • 0
DPM125
Beginner

What is a Line Type and table type and what is the difference between them?

A line type defines the structure of a single row in an internal table.

· It can be a:

  • Data element (e.g., MATNR)
  • Structure (e.g., SFLIGHT)
  • Custom type created via TYPES

Example:

TYPES: BEGIN OF ty_line,

matnr TYPE matnr,

maktx TYPE maktx,

END OF ty_line.

Here,

ty_line is the line type — it represents the structure of a single row.

 

A table type defines the entire internal table, including:

  • Line type
  • Access method (standard, sorted, hashed)
  • Unique/non-unique keys

Example:TYPES: ty_table TYPE STANDARD TABLE OF ty_line WITH DEFAULT KEY.

Here:

· ty_line is the line type (structure of each row)

· ty_table is the table type (definition of the whole table)

Difference Between Line Type and Table Type

FeatureLine TypeTable Type
DefinitionDescribes a single rowDescribes the entire internal table
ContainsFields/data elementsLine type + table kind + key definition
UseUsed to define structure of rowsUsed to define the full internal table
DeclarationTYPES: BEGIN OF … END OFTYPES: … TYPE STANDARD TABLE OF …

 

Related Questions

Leave an answer

Leave an answer