Skip to Content
0
Former Member
Aug 10, 2011 at 06:47 PM

DB Update from BAPI

118 Views

Hi All,

I am trying to create a RFC FM ( BAPI) which will be called from external system. The role of this FM is insert to 3 different Z tables. Table structure's is like Header, Details & Sub details.

Requirement is if the insert/update fails on Header than all other insert/update should fail Also i need to report back any errors to calling system.

I have designed the BAPI in such way that after some initial data check, i call another FM in update task.

Inside this FM i am doing insert/update. After coming out i am doing Commit Work. Also setting SET UPDATE TASK LOCAL

My doubt is

(1) how would this handle a situation where update in header fails so all other update are rejected.

(2) I would like to let the other system know, if the insert is good or fail. Since Update task does not allow export, how to handle this.

Please advice the best solution for this.