Skip to Content
-2

Showing one row of a database

Jan 18 at 01:11 PM

53

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Horst Keller
Jan 18 at 05:32 PM
1
Share
10 |10000 characters needed characters left characters exceeded