Application Development and Automation 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: 
Read only

Update Termiante Problem in the VF02

Former Member
0 Likes
1,253

Dear SAP Technical Guru's,

I am facing Update termiante problem in the VF02 Screen .

MESSAGE

Update was terminated

*System ID.... MRD

Client....... 100

User..... PWC

Transaction.. VF01

Update key... BE944DDDC5AEF1338261001635B0CD06

Generated.... 09.07.2008, 14:25:50

Completed.... 09.07.2008, 14:25:50

Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC*

Also When I scroll through the Condition records in the billing screen the conditions are disapperaing.

I have a Userexit attached to it RV60AFZC

Please suggest the solutions of the problem.

regards,

Amlan Sarkar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,132

I am attaching the code of the userexits:

***INCLUDE RV60AFZC.

************************************************************************

  • *

  • This include is reserved for user modifications *

  • Forms for invoicing *

  • The name of modification modules should begin with 'ZZ'. *

  • *

************************************************************************

  • USEREXIT_NUMBER_RANGE_INV_DATE *

  • USEREXIT_FILL_VBRK_VBRP *

************************************************************************

----


  • FORM USEREXIT_NUMBER_RANGE_INV_DATE *

----


  • This userexit can be used to determine the numberranges for *

  • the internal document number. This userexit can be used when *

  • the number_ranger should impact the invoice date via table *

  • TVFKD. *

  • If this userexit is active the USEREXIT_NUMBER_RANGE is not *

  • processed anymore, that means this userexit has priority. *

  • US_RANGE_INTERN - internal number range *

  • This form is called from form LV60AU02 and LV60AU11 *

----


FORM USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN.

  • Example: Number range from TVFK like in standard

  • US_RANGE_INTERN = TVFK-NUMKI.

ENDFORM.

----


  • FORM USEREXIT_FILL_VBRK_VBRP *

----


  • This userexit can be used to fill fields in VBRK and VBRP *

  • Be aware, that at this time the work areas KUAGV KURGV *

  • KUWEV and KUREV are not filled. *

  • This form is called from FORM VBRK_VBRP_FUELLEN. *

----


FORM USEREXIT_FILL_VBRK_VBRP.

  • Example: change Tax country

  • VBRK-LANDTX = T001-LAND1.

*{ INSERT MRDK900206 1

*if sy-tcode = 'VF01'.

  • read table xkomv with key kschl = 'ZTOD'.

  • if sy-subrc <> 0.

  • clear xkomv.

  • xkomv-kschl = 'ZTOD'.

  • append xkomv.

  • endif.

*endif.

*----Commented

  • READ TABLE XKOMV WITH KEY KSCHL = 'ZTOD'.

  • IF SY-SUBRC <> 0.

  • CLEAR XKOMV.

  • XKOMV-KSCHL = 'ZTOD'.

  • APPEND XKOMV.

  • ENDIF.

*----End of comment

*} INSERT

ENDFORM.

*eject

regards,

Amlan Sarkar

Dear SAP Technical Guru's,

I am facing Update termiante problem in the VF02 Screen .

MESSAGE

Update was terminated

*System ID.... MRD

Client....... 100

User..... PWC

Transaction.. VF01

Update key... BE944DDDC5AEF1338261001635B0CD06

Generated.... 09.07.2008, 14:25:50

Completed.... 09.07.2008, 14:25:50

Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC*

Also When I scroll through the Condition records in the billing screen the conditions are disapperaing.

I have a Userexit attached to it RV60AFZC

Please suggest the solutions of the problem.

regards,

Amlan Sarkar

6 REPLIES 6
Read only

Former Member
0 Likes
1,133

I am attaching the code of the userexits:

***INCLUDE RV60AFZC.

************************************************************************

  • *

  • This include is reserved for user modifications *

  • Forms for invoicing *

  • The name of modification modules should begin with 'ZZ'. *

  • *

************************************************************************

  • USEREXIT_NUMBER_RANGE_INV_DATE *

  • USEREXIT_FILL_VBRK_VBRP *

************************************************************************

----


  • FORM USEREXIT_NUMBER_RANGE_INV_DATE *

----


  • This userexit can be used to determine the numberranges for *

  • the internal document number. This userexit can be used when *

  • the number_ranger should impact the invoice date via table *

  • TVFKD. *

  • If this userexit is active the USEREXIT_NUMBER_RANGE is not *

  • processed anymore, that means this userexit has priority. *

  • US_RANGE_INTERN - internal number range *

  • This form is called from form LV60AU02 and LV60AU11 *

----


FORM USEREXIT_NUMBER_RANGE_INV_DATE USING US_RANGE_INTERN.

  • Example: Number range from TVFK like in standard

  • US_RANGE_INTERN = TVFK-NUMKI.

ENDFORM.

----


  • FORM USEREXIT_FILL_VBRK_VBRP *

----


  • This userexit can be used to fill fields in VBRK and VBRP *

  • Be aware, that at this time the work areas KUAGV KURGV *

  • KUWEV and KUREV are not filled. *

  • This form is called from FORM VBRK_VBRP_FUELLEN. *

----


FORM USEREXIT_FILL_VBRK_VBRP.

  • Example: change Tax country

  • VBRK-LANDTX = T001-LAND1.

*{ INSERT MRDK900206 1

*if sy-tcode = 'VF01'.

  • read table xkomv with key kschl = 'ZTOD'.

  • if sy-subrc <> 0.

  • clear xkomv.

  • xkomv-kschl = 'ZTOD'.

  • append xkomv.

  • endif.

*endif.

*----Commented

  • READ TABLE XKOMV WITH KEY KSCHL = 'ZTOD'.

  • IF SY-SUBRC <> 0.

  • CLEAR XKOMV.

  • XKOMV-KSCHL = 'ZTOD'.

  • APPEND XKOMV.

  • ENDIF.

*----End of comment

*} INSERT

ENDFORM.

*eject

regards,

Amlan Sarkar

Read only

0 Likes
1,132

I guess the code is not correct. What is the requirement of the code?


read table xkomv with key kschl = 'ZTOD'. 
if sy-subrc 0. 
clear xkomv. 
xkomv-kschl = 'ZTOD'. 
append xkomv. 
endif. 

Based on the code few Questions:

Why are you clearing the whole XKOMV structure?

- Ideally you should just clear the particular field where you want to modify.

Why are you adding a new record in XKOMV when the same is already present?

- It should be modifying it using the MODIFY statement.

Read only

former_member226999
Contributor
0 Likes
1,132

Is this problem in production or test / development systems?

This seems to be duplicate record posting error. Is your number range internal or external?

Check if the number ranges are being duplicated. If that is the case then set the correct incremental value for the number ranges.

Hope this helps.

Fran

Read only

0 Likes
1,132

Dear Franc,

I have checked the number Range It is getting incremented regularly .Here I am Using the internal Number Range.

following is the number Range:

19 0090000000 to 0094999999 90001458 is the Current number.

But the Document getting saved and but when I am seeing the documents it is getting Update terminate.

regards,

Amlan

Read only

Former Member
0 Likes
1,132

Hi,

The error is b'coz the program tried to insert the record which is alredy existing the data base table ( duplicate record) .

SAPSQL_ARRAY_INSERT_DUPREC

So check with in the user exit, where INSERT statment is used and replace that with MODIFY if logic permits.

Revert back if any issues.

Regards,

Naveen

Read only

Former Member
0 Likes
1,132

how to solve this problem? I meet this problem like yours, SAP bugs? how to correct it?