SAP ABAP Basic table insert / ABAP code to insert a line or row into a table.
Dr. Viktor Walter-Tscharf1 MIN. LESEZEIT
Find here a basic code to insert values into a row of a table. For the explanation:
Table name: zxpd_authusrobj
Column name of the table: low
Column name of the table: uname
Into this table and columns, we want to insert the value ‘Hello’ and ‘TestUser’ for columns “low” and “uname”. Therefore we are using the following code.
DATA my_Char(5) VALUE 'Hello'.
DATA wavalue(10) VALUE ‘TestUser’.
INSERT INTO zxpd_authusrobj VALUES @( VALUE #( low = my_Char uname = wavalue ) ).
Or
DATA my_Char(5) VALUE 'Hello'.
DATA wavalue(10) VALUE ‘TestUser’.
INSERT VALUE #( low = my_Char uname = wavalue ) into zxpd_authusrobj.
I hope it helped. Happy coding!

