Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE termination in VA01 transaction.

Former Member
0 Kudos

Hello Experts,

I am stuck in one place. could you please help me for the same.

I am uploding data in ZVA01 transaction using batch input session.

while uploading 82-83 line items, and save it, i am getting the error. "SAPSQL_ARRAY_INSERT_DUPREC".

i checked the error. it is from the include :LV45UF0K and this is the standard code.

the code is given below :

FORM KONV_BEARBEITEN.

CHECK: FKONV_GEAENDERT NE SPACE OR

VORGANG = CHARH.

IF VORGANG NE 'H'.

DELETE FROM KONV WHERE KNUMV = VBAK-KNUMV.

ENDIF.

LOOP AT FXKOMV.

FXKOMV-MANDT = VBAK-MANDT.

FXKOMV-KNUMV = VBAK-KNUMV.

MODIFY FXKOMV.

ENDLOOP.

INSERT KONV FROM TABLE FXKOMV.

IF SY-SUBRC NE 0.

MESSAGE A100 WITH 'KONV' SY-SUBRC.

ENDIF.

ENDFORM.

. error is : it is try to insert the duplicate entry in the KONV table. i dont know why the error is comming and in which code the error is.

i splitted the line items into 2-3 parts and then uploaded, this time it is uploading properly.

i want to upload all line items in one time (82-83 line items).

could you please suggest, what is the error ?.

Thnaks in advance.

RH

8 REPLIES 8

former_member181995
Active Contributor
0 Kudos
INSERT KONV FROM TABLE FXKOMV.

code is seems to insert line in KONV which may already exsist.you need to check this.either use modufy of update instead.

0 Kudos

I think this line have an error: INSERT KONV FROM TABLE FXKOMV.

Yo can use Modify konv from table FXKOMV, or verify if the data exists. If yes, you can use the command UPDATE, else, INSERT.

Best regards,

Denis

Former Member
0 Kudos

As you said you are getting this short dump in standard code.. hence you canu2019t change code.

KONV stores condition types for item line.

Make sure in BDC code there are no duplicates in item numbers & conditions.

Some where you are trying to insert same condition type multiple times in single item line.

former_member182466
Contributor
0 Kudos

Hi,

the key for table KONV contains five fields:

MANDT

KNUMV

KPOSN

STUNR

ZAEHK

The code you included fills the first two and deletes the entries for these values first. So the problem is not in that value. The other three values are:

KPOSN Condition item number

STUNR Step number

ZAEHK Condition counter

Where the last one is added just to make the whole key unique. Chances are that this field is not filled correctly in some user exit making the transaction fail at the point you indicated. Check in the dump if you can find out what the values are in this table and which ones generate the duplicate key error. Also investigate if the FXKOMV table is changed in user exits or custom pricing routines and check that code for bugs. It will be pretty hard to debug it all since you get the problem in BDC processing...

Good luck,

Gert.

Jelena
Active Contributor
0 Kudos

According to your message, the error, in fact, does not occur in VA01 but in ZVA01 (your custom version of VA01, I guess). I don't think we'll be able to advise you on your own custom development objects.

I would recommend to use BAPI instead of BDC (and user exits, if necessary), but not sure how this would work with your ZVA01. If it's not too late, your company might reconsider and stay with the standard transaction. Otherwise it will be extremely difficult for you to get any support.

Former Member
0 Kudos

thanks for the reply. But my problem still active.

the problem is giving update termination but when i splitted the line items into 2-3 parts and then uploaded, this time it is uploading properly.

i dont know why this is the error. If the update termination happens from duplicate entry so it should be present also when i am splitted the line items into 2-3 parts.

Thanks & regards,

RH.

0 Kudos

if anybody have this issue, and if its not the document range problem,

its probably duplicate entry in fxkomv when inserting to konv. You should check in debugger

komv while creating order, If the pricing data are added there correctly. In my case i had duplicated

data for one of the positions (because of made enhancements). Pricing data are created

in include FV45CF0K (CALL FUNCTION 'PRICING_COPY').

Regards,

Kuba

Former Member
0 Kudos

Hi Ravindra hegde ,

Yesterday one of my team mate facing same problem and that to same include it is showing error

what he is doing is he write some code for pricing conditions because of that it is showing updating error while creating sales order

he commented that code and checked againg at that time no issue

so you please check if have done some coading for pricing conditions.

Thanks

Surendra