Tutorial
  • Home
  • ABAP
  • Fiori
No Result
View All Result
Tutorial
  • Home
  • ABAP
  • Fiori
No Result
View All Result
Tutorial
No Result
View All Result

Top 10 ABAP Statements Every Beginner Should Know (With Examples & Tips)

Efe Umut by Efe Umut
June 9, 2025
in Uncategorized
0 0
0
0
SHARES
2
VIEWS
Share on FacebookShare on Twitter

If you’re new to SAP ABAP and want to write clean, functional programs, mastering the core statements is your first milestone. In this post, we’ll walk through the 10 most essential ABAP commands every beginner should know with real code examples, practical tips, and visual aids to help you understand when and how to use them effectively.

1) ABAP Statement : DATA

DATA is used to declare variables in ABAP. You define the type and optionally assign a default value.

💻Code Example

DATA lv_name TYPE string.
lv_name = 'Sherlock Holmes'.

💡Tip:

Use DATA(...) = for modern inline declarations

DATA(lv_age) = 30.

2) ABAP Statement : WRITE

Displays data on the screen (SAP list output). Used often in classical reports.

💻Code Example

WRITE: / 'Hello World!', lv_name.

💡Tip:

For modern UIs WRITE is rarely used but for learning, it’s great to understand output basics.


3) ABAP Statement : SELECT

Retrieves data from database tables. It’s one of the most used statements.

💻Code Example

SELECT * FROM mara INTO TABLE @DATA(lt_mara) UP TO 10 ROWS.

💡Tip:

Avoid SELECT * in productive code. Always prefer specifying fields for performance


4) ABAP Statement : LOOP AT

Used to iterate through internal tables (arrays).

💻Code Example

LOOP AT lt_mara INTO DATA(ls_mara).
 WRITE: / ls_mara-matnr.
ENDLOOP.

💡Tip:

Use LOOP AT GROUP BY for grouped logic (advanced)


5) ABAP Statement : IF / ELSEIF / ELSE / ENDIF

Conditional branching

💻Code Example

IF lv_age < 18.
 WRITE: 'Minor'.
ELSEIF lv_age < 65.
 WRITE: 'Adult'.
ELSE.
 WRITE: 'Senior'.
ENDIF.

💡Tip:

Too many nested IFs? Use CASE for cleaner logic.


6) ABAP Statement : READ TABLE

Used to read a single line from an internal table.

💻Code Example

READ TABLE lt_mara INTO DATA(ls_mara) WITH KEY matnr = '12345'.

💡Tip:

With sorted tables, useBINARY SEARCH for faster access.


7) ABAP Statement : CLEAR

Resets the value of a variable or structure.

💻Code Example

CLEAR lv_name

💡Tip:

You can also clear internal tables:

CLEAR lt_mara

8)ABAP Statement : APPEND

Adds a row to the end of an internal table.

💻Code Example

APPEND ls_mara TO lt_mara.

💡Tip:

Modern syntax:

APPEND VALUE #( matnr = '12345') TO lt_mara.

9) ABAP Statement : DELETE

Removes entries from internal tables.

💻Code Example

DELETE lt_mara WHERE matnr = '12345'

💡Tip:

Use DELETE ADJACENT DUPLICATES FROM to remove duplicates


10) ABAP Statement : MOVE ( veya = ataması)

Used to assign values. Modern ABAP uses = instead of MOVE.

💻Code Example

lv_result = lv_value1 + lv_value2.

💡Tip:

Avoid using MOVEmodern code prefers the assignment operator.


These 10 ABAP statements form the foundation of most real-world SAP development tasks. If you’re just getting started, try to build a small project or mini-report using each of them. In future posts, we’ll explore more advanced ABAP features like OOP, dynamic programming , and integration with Fiori apps.

Previous Post

Hello world!

Efe Umut

Efe Umut

Leave a Reply Cancel reply

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

You might also like

Top 10 ABAP Statements Every Beginner Should Know (With Examples & Tips)

June 9, 2025

Hello world!

May 11, 2025

Create Device Mockups in Browser with DeviceMock

April 11, 2025

Creating A Local Server From A Public Address

April 10, 2025

Professional Gaming & Can Build A Career In It

April 9, 2025

3CSS Properties You Should Know

April 8, 2025
Clean ABAP

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Tags

Apple Artificial Intelligence Branding CSS Gaming Javascript Laravel Photoshop PHP Server Smartphone Typography User Experience Web Design

Stay Connected

  • Home
  • ABAP
  • Fiori

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • ABAP
  • Fiori

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.