I am working on a BDC (Call Transaction) for PA40.
The program is working fine,but I have an issue when the Call Transaction fails.
I notice that when PA40 is called and has successfully passed the first few screens (say IT0000,01,02) and if the BDC fails at IT0006, the call transaction errors out for that particular record and returns with sy-subrc 1001 and an error message.
Now, my concern is that I do not see that tables PA0000,PA0001,PA0002 are updated though these screens have been successfully saved.Is this how it is supposed to be?? I mean, if the call transaction fails at a particular infogroup, wouldn't the previous ITs be updated. Is there something like a commit which happens only after the successfull execution of PA40 in background mode???I observe that this does not happen when I run the program in the foreground mode (screen mode). The successfull infotypes get updated in this case.
If this is the case, then how would it be possible to capture the pernr which has failed. It would not have been a problem if the pernr was not getting created, but i noticed that the next successfull record was being assigned a pernr (say 20) and i see that pernr 19 has no data for it (system generated the 19th pernr but the call transaction for it failed).
I don't think pernrs could be wasted like this with every BDC failure.
Any suggestions and inputs in this regard are highly appreciated.
I was using the update mode as S (synchronous). I also tried 'A' just in case. But not of any help.
Edited by: abaphr_mm on May 6, 2009 6:25 PM