cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate condition types cause dump in returns process

Former Member
0 Kudos

Hi,

I posted  this yesterday in the SD forum and it was rejected and moved to ABAP.

Then, the moderator in ABAP rejected as it was a functional question. He was correct , it is a functional question.

Can you please explain why it's ABAP, apart from the fact that I included std SAP code to show where it is being cleared.

Scenario is that we have duplicate condition types in an invoice. They could either i) both be active or ii) one active and other in-active.

Then we get an update dump when we create a Returns Order with ref to the invoice.

The pricing copy control is 'D'. And standard code clears ZAEHK value when the copy control is not E or F.

This happens in the function PRICING_COPY:

   if mode na 'EF'.

       xkomv-koupd = ' '.

       xkomv-kmxaw = ' '.

       xkomv-kmxwr = ' '.

       if xkomv-koaid ne 'D'.

         clear xkomv-mwsk1.

       endif.

       clear xkomv-zaehk.

     endif.

I changed it to 'E' and the dump disappears (all ZAEHK now have values and ZAEHK increments). But 'E' causes issues for us wrt pricing.

We can try to code our way around it but is there some option to allow duplicate conditions during returns?

Duplicate ZSOD condition:

help appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

What dump you are getting ?  Share that

G. Lakshmipathi

Former Member
0 Kudos

The original screenshot above has the location where it happens.

It's trying to insert two identical keys into KONV.

This is from the dump.

Category               ABAP Programming Error

Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC

Except.                CX_SY_OPEN_SQL_DB

ABAP Program           SAPLV45U

Termination occurred in the ABAP program "SAPLV45U" - in "KONV_BEARBEITEN".

The main program was "RSM13000 ".

In the source code you have the termination point in line 26

of the (Include) program "LV45UF0K".

The program "SAPLV45U" was started in the update system.

The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in

procedure "KONV_BEARBEITEN" "(FORM)", but it was neither handled locally nor

  declared

in the RAISING clause of its signature.

The procedure is in program "SAPLV45U "; its source code begins in line

11 of the (Include program "LV45UF0K ".

Thanks

former_member182378
Active Contributor
0 Kudos

Mulcahy,

What type of condition type is this? (discount or ...)

Could you paste the screenshot of the invoice, Tab conditions, also the RE order, Tab conditions?

TW

Former Member
0 Kudos

Thanks TW.

It's a discount condition. I didn't include a lot of info on the condition as this has happened on two other conditions too. One was a price, one was a discount with an access sequence and this one, ZSOD, is a manual condition with no access sequence.

This is relevant part of the conditions tab in the invoice. The return order dumps during update so is not saved. Hence, no conditions tab to display.