Skip to Content
0

Short Dump with duplicate key while activating the DSO

May 09, 2017 at 07:34 AM

115

avatar image
Former Member

Hi All,

I am getting the following error in ST22 when the DSO is activated.

"An attempt was made to insert an entry into table "\PROGRAM=GP00O2TPT0076DMQT7K0Z74W1SQ\CLASS=LCL_TRANSFORM\METHOD=END_ROUTINE\D ATA=LT_ORD_SCL". Updating unique table key "PRIMARY_KEY" resulted in a duplicate entry however. The key in question could be either the primary key or a secondary key. The key components of the duplicate entry have the values "{0052343027;000010}" " " " ".

What i am trying to do is am loading data from Data Acquisition DSO of Sales Order Item to DPL DSO, while loading, in the transformation there is a look up on Sales order schedule line. The dump is causing due to duplicate keys, the key for my Sales order Item DSO is Doc_Num and Doc Item. However the key for Schedule line the key is Doc_Num, Doc Item and Schedule Line.

The end routine code is as follows.

SELECT * FROM /bic/adsad2500
INTO TABLE lt_ord_Scl
FOR ALL ENTRIES IN RESULT_PACKAGE
WHERE DOC_NUMBER EQ RESULT_PACKAGE-doc_num
AND S_ORD_ITEM EQ RESULT_PACKAGE-S_ORD_ITEM.

When i checked the Active table of DSO adsad2500 i could see the following records.

Doc Numb Item Schedule Line

000000111 10 1

000000111 10 2

So in the end routine in my code i have only doc number and Item, but there are duplicates in the source DSO.

Can someone please guide me how to correct this?.

Regards

NB

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member May 09, 2017 at 08:00 AM
0

Hi;

Try add this code:

SORT lt_ord_Scl BY DOC_NUMBER

S_ORD_ITEM

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 09, 2017 at 08:00 AM
0

Hi;

Try add this code:

SORT lt_ord_Scl BY DOC_NUMBER

S_ORD_ITEM

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Sorry...

Hi;

Try add this code:

SORT lt_ord_Scl BY DOC_NUMBER S_ORD_ITEM.

DELETE ADJACENT DUPLICATES FROM lt_ord_Scl

COMPARING DOC_NUMBER S_ORD_ITEM.

Hope it helps

0
Mario Tibollo May 10, 2017 at 12:44 PM
0

how did you define internal table lt_ord_Scl?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
May 11, 2017 at 01:09 PM
0

Hi Naveen,

it looks like LT_ORD_SCL is described as a table with a unique key(hashed or sorted).

Please used standard table with non-unique key or sorted with non-unique key

Kind regards,

Andrey

Share
10 |10000 characters needed characters left characters exceeded