Skip to Content
0
Former Member
Dec 05, 2006 at 05:24 AM

commit/rollback

163 Views

There is a record having many fields & I want to insert the record in 3 custom tables designed accordingly . but either all the tables should get filled or none of the table should get filled.Should I use commit/rollback?? How??

The following is the syntax in a function module.

INSERT ZTEST1 FROM ZTEST1.

INSERT ZTEST2 FROM ZTEST2.

INSERT ZTEST3 FROM ZTEST3.

IF SY-SUBRC = 0.

COMMIT WORK.

ELSE.

ROLLBACK WORK.

ENDIF.

This does not work. Any Solution??