Posted: Thu Nov 22, 2007 10:19 am Post subject: Как проверить, что транзакция выполнилась успешно?
Запускаю транзакцию me22n через CALL TRANSACTION, под отладчиком возращается ошибка sy-subrc = 1. Но транзакция нормально выполнилась. Как можно проверить успешность ее выполнения?
SAP returns a 0 subrc if the transaction completes without error, however, if some of the data is incorrect, (ie material not found, profit centre not found etc), or the transaction comes across a data lock, SAP normally displays a warning message which allows the user to correct the problem and then continue.
In a BDC this action is not possible and the BDC terminates.
At this point you will possibly have a subrc of 1001 (you will more likely have a subrc of 0) and a warning in your BDC collector.
Taking the data lock, this message has a different message number for each transaction; Same messages in different transactions do not have the same message number. Therefore you cannot look for this message number in your BDCMSGCOLL table using an Error message class (E or A).
I've taken the approach of using a small table which contains warning messages that I've come across that I wish to treat as errors. I scan my message table on the way out of my Call BDC routines and change the message type there if I find a match, Then all I need to look for are E class messages without having to make the procedure transaction specific.
I've used this approach since 3.0 and it's always worked without having to worry about subrcs being 0 or 1001, or what message means what and should I treat it as an error...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.