Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

full data load in case of INSERT statement

Former Member
0 Likes
574

Hi!

Requirement is that data needs to be inserted into database table

through INSERT statement but the condition would be that,

if any one of the record is not loaded into the database table

no commit work is going to take place and rollback will take place.

only full data load of data is allowed no partial data load is allowed.

How to handle this after we write the INSERT statement.

thanks

ABAP Developer1

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
538

insert into DB_tab_name from table ITAB. "insert all rows at once
if sy-subrc = 0.
  commit work.  "all rows were inserted
else.
  rollback work.   "at least one row was not inserted
endif.

Regards

Marcin

Hi!

Requirement is that data needs to be inserted into database table

through INSERT statement but the condition would be that,

if any one of the record is not loaded into the database table

no commit work is going to take place and rollback will take place.

only full data load of data is allowed no partial data load is allowed.

How to handle this after we write the INSERT statement.

thanks

ABAP Developer1

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
539

insert into DB_tab_name from table ITAB. "insert all rows at once
if sy-subrc = 0.
  commit work.  "all rows were inserted
else.
  rollback work.   "at least one row was not inserted
endif.

Regards

Marcin

Read only

Former Member
0 Likes
538

thanks for all your valuable time