Skip to Content
0
Former Member
Aug 01, 2016 at 05:34 PM

Is there any way to catch the dump thrown by COMMIT WORK AND WAIT statement?

2716 Views

from CRM development, I have this scenario wherein I have to post payment from Web UI for the same account and same violation notice by 2 different users simultaneously.
As per debugging, there's a runtime error from COMMIT WORK due to failure of updating the database table.

I already tried a solution using TRY. ENDTRY but it didn't work.

TRY.

COMMIT WORK AND WAIT.


CATCH cx_error INTO DATA(lref_error).

ENDTRY.


Can you please suggest a fix to ignore the dump so the logic can proceed? Thanks in advance.

Dump details:

Category ABAP Programming Error

Runtime Errors MESSAGE_TYPE_X

ABAP Program SAPLFKB0

Application Component FI-CA

Date and Time 08/01/2016 17:16:24

Information on where terminated

The termination occurred in ABAP program "SAPLFKB0", in "DB_UPDATE". The main

program

was "SAPMSSY1".

In the source code, the termination point is in line 299 of (Include)

program "LFKB0FD0".

IF DB_1FKKOP-AUGBL_ORI = SPACE.

UPDATE DFKKOP SET AUGBL = DB_1FKKOP-AUGBL

AUGDT = DB_1FKKOP-AUGDT

AUGBD = DB_1FKKOP-AUGBD

AUGRD = DB_1FKKOP-AUGRD

AUGST = DB_1FKKOP-AUGST

AUGWA = DB_1FKKOP-AUGWA

AUGBT = DB_1FKKOP-AUGBT

AUGBS = DB_1FKKOP-AUGBS

AUGSK = DB_1FKKOP-AUGSK

AUGVD = DB_1FKKOP-AUGVD

AUGOB = DB_1FKKOP-AUGOB

QBSHB = DB_1FKKOP-QBSHB

QSZNR = DB_1FKKOP-QSZNR

XRAGL = DB_1FKKOP-XRAGL

XPYOR = DB_1FKKOP-XPYOR

NEGBU = DB_1FKKOP-NEGBU

WHERE OPBEL = DB_1FKKOP-OPBEL

AND OPUPK = DB_1FKKOP-OPUPK

AND OPUPW = DB_1FKKOP-OPUPW

AND OPUPZ = DB_1FKKOP-OPUPZ

AND BETRW = DB_1FKKOP-BETRW_ORI

AND AUGST <> '9'.

ELSE.

UPDATE DFKKOP SET AUGBL = DB_1FKKOP-AUGBL

AUGDT = DB_1FKKOP-AUGDT

AUGBD = DB_1FKKOP-AUGBD

AUGRD = DB_1FKKOP-AUGRD

AUGST = DB_1FKKOP-AUGST

AUGWA = DB_1FKKOP-AUGWA

AUGBT = DB_1FKKOP-AUGBT

AUGBS = DB_1FKKOP-AUGBS

AUGSK = DB_1FKKOP-AUGSK

AUGVD = DB_1FKKOP-AUGVD

AUGOB = DB_1FKKOP-AUGOB

QBSHB = DB_1FKKOP-QBSHB

QSZNR = DB_1FKKOP-QSZNR

XRAGL = DB_1FKKOP-XRAGL

XPYOR = DB_1FKKOP-XPYOR

NEGBU = DB_1FKKOP-NEGBU

WHERE OPBEL = DB_1FKKOP-OPBEL

AND OPUPK = DB_1FKKOP-OPUPK

AND OPUPW = DB_1FKKOP-OPUPW

AND OPUPZ = DB_1FKKOP-OPUPZ

AND BETRW = DB_1FKKOP-BETRW_ORI

AND AUGBL = DB_1FKKOP-AUGBL_ORI.

ENDIF.

IF SY-SUBRC NE 0.

CONCATENATE DB_1FKKOP-OPBEL '/' DB_1FKKOP-OPUPK '/'

DB_1FKKOP-OPUPW '/' DB_1FKKOP-OPUPZ

INTO LOC_ERRPO.

SELECT SINGLE AUGBL INTO LOC_AUGBL

FROM DFKKOP

WHERE OPBEL = DB_1FKKOP-OPBEL

AND OPUPK = DB_1FKKOP-OPUPK

AND OPUPW = DB_1FKKOP-OPUPW

AND OPUPZ = DB_1FKKOP-OPUPZ.

SELECT SINGLE WAERS INTO LOC_ERRWA

FROM DFKKKO

WHERE OPBEL = DB_1FKKOP-OPBEL.

WRITE DB_1FKKOP-BETRW_ORI TO LOC_ERRBT CURRENCY LOC_ERRWA.

MESSAGE X376 WITH LOC_ERRPO LOC_ERRBT SPACE LOC_AUGBL.

ENDIF.