Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

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

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:16:36+00:00 2026-06-05T16:16:36+00:00

I found 2 examples for creating a structure. This one with TYPES : TYPES

  • 0

I found 2 examples for creating a structure.

This one with TYPES:

TYPES : BEGIN OF employee_information,
            name TYPE c LENGTH 20,
            surname TYPE c LENGTH 20,
            tel_no TYPE n LENGTH 12,
          END OF employee_information.

and this other one with DATA:

DATA : BEGIN OF employee_information,
            name TYPE c LENGTH 20,
            surname TYPE c LENGTH 20,
            tel_no TYPE n LENGTH 12,
          END OF employee_information.

I read the documentation topic “The Statements TYPES and DATA” in the SAP Library, but I don’t understand why we use these distinct terms TYPES and DATA for creating a structured data type.

Can you explain the difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:16:38+00:00Added an answer on June 5, 2026 at 4:16 pm

    First of all, creating a TYPE is the newer and recommended method to use.

    When you create a DATA, lets say for an internal table;

    DATA: BEGIN OF employee_information OCCURS 0,             "itab with header line
                name TYPE c LENGTH 20,
                surname TYPE c LENGTH 20,
                tel_no TYPE n LENGTH 12,
          END OF employee_information.
    

    You can have the internal table with header line. But this is the old method.

    When you use TYPE in order to declare an internal table you can use its headerline and its content simultaneously;

      TYPES: BEGIN OF t_employee_information,
                name TYPE c LENGTH 20,
                surname TYPE c LENGTH 20,
                tel_no TYPE n LENGTH 12,
      END OF t_employee_information.
    
      DATA: employee_information TYPE STANDARD TABLE OF t_employee_information INITIAL SIZE 0,      "itab
            employee_information TYPE t_employee_information.                    "work area (header line)
    

    For example: You can use this TYPE in order to create as many internal tables as you want such as:

      DATA: employee_information_1 TYPE TABLE OF t_employee_information, "itab1
            employee_information_1 TYPE t_employee_information.          "work area1 (header line)
      DATA: employee_information_2 TYPE TABLE OF t_employee_information, "itab2
            employee_information_2 TYPE t_employee_information.          "work area2 (header line)
      DATA: employee_information_3 TYPE TABLE OF t_employee_information, "itab3
            employee_information_3 TYPE t_employee_information.          "work area3 (header line)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I like to end a process using VBScript. Unfortunally I only found examples in
All the examples I've found online for displaying a gallery of images require creating
I'm creating application with OptionsMenu . I found few examples with it, but everyone
I've found examples on how to either set the classpath so that a Java
I found many examples of generic repository using LINQ to SQL. However there is
I found great examples of what Im looking for here : http://hugoduncan.org/post/2010/shell_scripting_in_clojure_with_pallet.xhtml But seems
I found many examples for older versions of CherryPy but they each referenced importing
I have found numerous examples on uploading a file to a web server via
I've found some examples of .AVI in html on the web. But my page
Trying out the examples found on pleac.sf.net , I'm not able to get an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.