Skip to Content
avatar image
Former Member

Short Dump with duplicate key while activating the DSO

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

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

    Hi;

    Try add this code:

    SORT lt_ord_Scl BY DOC_NUMBER

    S_ORD_ITEM

    Add comment
    10|10000 characters needed characters exceeded

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

    Hi;

    Try add this code:

    SORT lt_ord_Scl BY DOC_NUMBER

    S_ORD_ITEM

    Add comment
    10|10000 characters needed 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

  • May 10, 2017 at 12:44 PM

    how did you define internal table lt_ord_Scl?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2017 at 01:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded