ā2015 Nov 09 12:36 PM
Hi all,
I am using BAPI_CONTRACT_CHANGE to change conditions of contract items.
It works well if I do not change the condition validity in parameter ITEM_COND_VALIDITY/ITEM_COND_VALIDITYX.
But if I want to create a new condition validity, the update request dumps with SAPSQL_ARRAY_INSERT_DUPREC.
Strangely enough, if I use the same data (that creates a dump in my program) in a test sequence in SE37 (BAPI_CONTRACT_CHANGE & BAPI_TRANSACTION_COMMIT), there is no update error and the contract is changed as wanted.
Can anybody help?
Thank you, Kathrin.
ā2015 Nov 09 12:47 PM
Hi Kathrin,
Please check may be duplicate records exist in file or date related field length that you uploding.
OR
Similar Problem might be due to BALDAT/BALHDR tables as well,
these hold application/system logs.
Could you check some SAP Notes, for e.g. -
Note 656967 - Application log: SAPSQL_ARRAY_INSERT_DUPREC, BALDAT
Note 196113 - SAPSQL_ARRAY_INSERT_DUPREC, BALHDR.
Thank You
Best of luck
ā2015 Nov 09 12:59 PM
Hi Arindam,
thanks for your answer.
Currently, I am testing only with just one contract item, so the data I provide does not contain any duplicates.
The dumps occurs during in the update for table A016, function RV_KONDITION_SICHERN_V13A. I had already checked several OSS notes. There are some describing similiar Problems with BAPI_CONTRACT_CHANGE, but none of them is relevant for our release / patch level š
Any more suggestions?
Thank you! Regards, Kathrin!
ā2015 Nov 09 1:04 PM
ā2015 Nov 09 1:24 PM
Hi Fabio,
Thanks for your answer, but, I do not quite get it.
I need to change an existing contract, so using a different contract number will not do.
Are you referring to the serial id of the condition?
In a test sequence SE37 the update is working with whatever serial id I am providing in parameters ITEM_COND_VALIDITY and ITEM_CONDITION - the BAPI always creates a new serial ID here.
I have tried the following:
'old' serial ID (the number determined with BAPI_CONTRACT_GETDETAIL)
new serial ID '0000000001'
temporary serial ids '$000000001'
All of these work fine in SE37, but as soon as I call the BAPI in my program instead of just in SE37, I receive the update error.
Any ideas?
regards, Kathrin.
ā2015 Nov 09 2:21 PM
ā2015 Nov 10 8:59 AM
Hi Runda,
I am attaching the dump.
Thanks for your advice, Kathrin!
ā2015 Nov 10 11:02 AM
Hi Kathrin,
Thanks.
From the dump it is clear we are trying to insert duplicate records in table A016 which in turn gets populated from ITEM_COND_VALIDITY.
Now since you are saying it works from SE37, I wonder if there is any issue in your program. Note A016 has got Valid-To-Date as Primary key. And Valid From date as a non primary field.
So there is no solution at this moment other than debugging your code. Check if the table ITEM_COND_VALIDITY has got any duplicate entry or blank entry or not.
R