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

SAPSQL_ARRAY_INSERT_DUPREC error in BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
673

Hi Friends

I am creating sales order using function module BAPI_SALESORDER_CREATEFROMDAT2 in two different programs.

1. First program will be used to create orders in foreground.

2.Second program will be used to create orders in background/Foreground.

When I tried to create sales order via second program its creating DUMP

"

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was

neither

caught nor passed along using a RAISING clause, in the procedure

"SD_PARTNER_UPDATE" "(FUNCTION)""

But the program was able to create sales order without any issues in both the cases.before calling this function module I checked the value from boh the palces, I don't find any differences.

Anyone faced similar kind of issues? Anyone have clue for this issue.

Thanks

Gowrishankar

3 REPLIES 3
Read only

Former Member
0 Likes
591

Hi

You should check the partenrs data transfered to the BAPI

Where the data are from?

Max

Read only

0 Likes
591

I am passing AG, WE, ZE, KB, Z1 partner details to BAPI, I dont find any difference in the data in both the programs. But if I execute from program 2, its throwing this DUMP( I put a debug point in program ZXCSVU05 ), its getting called two times, when I execute from First program.

Same code I used in both the program, same data is coming till BAPI but its giving dump in one program not in other program.

Thanks

Gowrishankar

Read only

Former Member
0 Likes
591

This Error may occur with one of the following reasons.

1.Dead Locks.

2.Inserting record and updating the same record in the loop.

3.Table Locks.

4.Not using COMMIT WORK AND WAIT after the INSERT and the UPDATE statements.

5.ROLLBACK WORK if INSERT or UPDATE fails.

Suggestion is to use 'Lock Objects' and 'Commit' after successful insertion/updation and rollback when fails.