Skip to Content
avatar image
-2
Former Member

Showing one row of a database

Hi, I am learning ABAP and I try to get a specific row of a database. So sry if this is a Noob-question.

Example: Table "AtoD"

| A | B | C | D |
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
| 4 | 2 | 1 | 7 |
| 1 | 6 | 0 | 8 |
| 1 | 5 | 7 | 9 |


A - D is the name of the row, all numbers are the entries.

I want to write a program, where i can just let me show row B. (Maybe later even say "show row B with entries 2" ).

Code yet:

SELECT SINGLE * FROM AtoD
WHERE id VALUE '2'.

IF sy-subrc = 0.
WRITE: / 'Number has been found'.
ELSE.
WRITE: / 'No number found'.
ENDIF.


Is this the correct way or am i totally wrong yet?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer