SAPSQL_ARRAY_INSERT_DUPREC on table OBJK - after WS_DELIVERY_UPDATE (FM)

用户在使用SAP BAPI_OUTB_DELIVERY_CHANGE进行交付单批量拆分并添加序列号时遇到重复记录错误,调用WS_DELIVERY_UPDATE时出现短倾倒。讨论了可能的原因和解决方案,包括清除缓冲区和使用SERIAL_INTTAB_REFRESH。

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

Former Member

September 09, 2015 at 14:01 PM

0 Likes

Helpful Answer

by

Not what you were looking for? View more on this topic or

6 replies

Former Member replied

August 25, 2009 at 10: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.

0 likes

Helpful Answer

Jaideep Sharma replied

August 25, 2009 at 11: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,

0 likes

Former Member replied

August 26, 2009 at 00:29 AM

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?

0 likes

Former Member replied

August 26, 2009 at 07: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.

0 likes

Former Member replied

May 27, 2011 at 13: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

4 likes

Sérgio Fraga replied

September 09, 2015 at 14:01 PM

Thanks Kim.

You solved my issue!!

0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值