SAP ABAP Training - Modifying Data In A Database Table Using Open SQL Statements - Insert
SAP Training - BEGINNERS GUIDE TO LEARNING SAP ABAP - Create Your First ABAP Program
The Insert Statement
The SELECT statement has already been used, so here it will be skipped for now to focus on the INSERT statement. In this example then, a new record will be inserted into the ZEMPLOYEES table. Firstly, type INSERT, followed by the table name, and then a period:
Doing this, one must always type the table name, a variable's name cannot be used in-stead. Use the check statement (IF) to include an SY-SUBRC check, telling the system to do if this does not equal 0:
This is the simplest form of the INSERT statement, and not necessarily the one which is encouraged. Using this form is no longer standard practice, though one may come across it if working with older ABAP programs...
Videos in the series:
Learn SAP ABAP - Video Playlist - • SAP ABAP Tutorials
Websites and Profiles:
SAP Training Courses http://www.saptraininghq.com
SAP Academy Courses http://academy.saptraininghq.com
SAP Training on Twitter: / petermoxon
SAP Training on Google + https://plus.google.com/u/0/+PeteMoxon
STHQ on Linked-In / petermoxon
STHQ on YouTube / pcmoxon
More SAP Resources:
SAP site http://www.sap.com
SAP community netwrok http://scn.sap.com
About SAP http://en.wikipedia.org/wiki/SAP_AG
About ABAP http://en.wikipedia.org/wiki/ABAP
Various YouTube channels on SAP:
SAP InnoJam / channel
SAP on YouTube / @sap
SAP TV on YouTube / @saptv
SAP SCN on YouTube / @sapcommunity