08-25-2009 8:35 AM
Hi fellow SAP dudes,
Got a pretty big problemo.
I am using the BAPI - BAPI_OUTB_DELIVERY_CHANGE to create batch splits and add serial no's to an outbound delivery (type H)
I then call the FM - WS_DELIVERY_UPDATE to post goods issue the delivery.
Problem being is that Im hitting a short dump - See Below:
Has anyone hit this before? I pretty sure it has to do with the Serial Numbers (they are updating in table OBJK).
Any help would be ace.
cheers,
Todd
Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
Date and Time 25.08.2009 15:06:20
Short text
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLIPW1" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "OBJK_POST_UPDATE_N" "(FUNCTION)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
cheers,
Todd
08-25-2009 10:14 AM
Hi,
If you are calling the function module in the loop then Check if you are clearing all the variables after each iteration of loop before passing to WS_DELIVERY_UPDATE. You can use function modules like LE_DELIVERY_REFRESH_BUFFER to clear buffer areas.
KR Jaideep,
08-25-2009 9:45 AM
Hi Todd,
Looks like an entry is already present in table 'OBJK' (which is being updated here) for the OBKNR(Object list number) & OBZAE(Object list counters) combination for the serial numbers that are being added.
Please check if the data being added is already present in that table.
Hope it helps.
08-25-2009 10:14 AM
Hi,
If you are calling the function module in the loop then Check if you are clearing all the variables after each iteration of loop before passing to WS_DELIVERY_UPDATE. You can use function modules like LE_DELIVERY_REFRESH_BUFFER to clear buffer areas.
KR Jaideep,
08-25-2009 11:29 PM
Dhanya - Thanks for your reply but that is the whole problem. Im not putting anything in that table the SAP standard FM's are.
Jaideep - That's exactly what I thought, and I have tried the buffer refresh to no avail.
Really stuck on this. Anyone?
08-26-2009 6:17 AM
I've found a way around it.
Called the WS_DELIVERY_UPDATE in a seperate program via a SUBMIT call.
Not the best solution - but it works.
05-27-2011 12:45 PM
I had the same problem. I solved it by calling SERIAL_INTTAB_REFRESH before WS_DELIVERY_UPDATE.
I found the solution by looking the the IDoc handler for DELVRY : Function module IDOC_INPUT_DELVRY
09-09-2015 1:01 PM
11-28-2019 2:13 PM
When a Delivery is created using Bapi and if updating Serial numbers , use the FM
CALL FUNCTION 'SERIAL_INTTAB_REFRESH'
EXPORTING objects_status_refresh = 'C'. This resolves the issue while doing PGI.
Or else call fm WS_DELIVERY_UPDATE2 using DESTINATION 'NONE'
PS: For reference I am updating this thread.
03-31-2020 8:13 AM