cancel
Showing results for 
Search instead for 
Did you mean: 

The ABAP/4 Open SQL array insert results in duplicate Record in database

Former Member
0 Kudos

Hi All,

I am trying to transfer 4 plants from R/3 to APO. The IM contains only these 4 plants. However a queue gets generated in APO saying 'The ABAP/4 Open SQL array insert results in duplicate record in database'. I checked for table /SAPAPO/LOC, /SAPAPO/LOCMAP & /SAPAPO/LOCT for duplicate entry but the entry is not found.

Can anybody guide me how to resolve this issue?

Thanks in advance

Sandeep Patil

Accepted Solutions (0)

Answers (10)

Answers (10)

Former Member
0 Kudos

Hi Shibu,

Thanks for the suggestion. Sorry for late reply as I was away for 2 days. I tried creating the location in APO but it does not allow me to create the location saying that 'Supply Chain Unit with this name already exists'. When I try to display the same it says that 'Location Does not exists'.

This means that somewhere the entry exists. How do I detect the same?

Thanks & Regards

Sandeep Patil

Former Member
0 Kudos

Hi Siva and Harish,

Thanks for the reply. I tried both the transactions. WUF does not produce any results (No Values Found) & Transaction /SAPAPO/LOC_DEPEND does not exists.

Can you further guide me ?

Thanks & Regards

Sandeep Patil

Former Member
0 Kudos

Most likely some corrupted entry exists somewhere. Can you create your locations manaully in APO, save, and see any error occurs ?

-Shibu

Thanks for rewarding points if this is helpful

Former Member
0 Kudos

Hi Sandeep,

Goto the transacation /SAPAPO/LOC_DEPEND and give the location number. Let us know if you get something in the output.

Regards,

Siva.

Former Member
0 Kudos

if you go to transaction WUF and key in the location, do you get anything at all?

Former Member
0 Kudos

Hi Shiva,

As written in my 1st post, these locations does not exists in SAP APO system (before transfering , I deleted the locations from APO). Hence I cannot apply the deletion flag nor can I execute the program suggested by you.

Thanks & Regards

Sandeep Patil

Former Member
0 Kudos

Hi Sandeep,

Now try to delete ur location before activating the IM again.

Use the program /SAPAPO/DELETE_LOCATIONS to delete locations.

Note :

1. Set the deletion flag (in /SAPAPO/LOC : Location -> Deletion Flag)

2. Remove all the dependencies (like transportation lane, Model ........ )

Check now and let me know.

Regards,

Siva.

null

Former Member
0 Kudos

Hi Siva,

As per your suggestion, I have tried the IM without specifying the plants. But it still gives the same error.

Can you guide me further ?

Thanks & Regards

Sandeep Patil

Former Member
0 Kudos

Hi Sandeep,

If the entry is already in the /SAPAPO/LOC, /SAPAPO/LOCMAP & /SAPAPO/LOCT tables then create a integration model without the value of Plnt and activate it. Let me know if u get the same error again.

Regards,

Siva.

Former Member
0 Kudos

Hi Naveen,

Thanks for the input. I tried to delete the location using the suggested BAPI. But it says that 'No valid location found' for the given plant name. That means the plant does not exists in APO system. Also the documentation of this BAPI says that it will only apply the deletion flag to the location but will not remove the location physically.

Further inputs on this is highly appreciated.

Thanks & Regards

Sandeep Patil

Former Member
0 Kudos

Dear Sandeep Patil,

It appears that the few or all of the locations that you want to transfer have already been created in APO and were not deleted properly.

You would need to delete the Locations using BAPI:

BAPI_LOCSRVAPS_DELMULTI2

You should be able to transfer the data after you delete them.

Hope this will help.

Regards,

Naveen.