The ABAP/4 Open SQL array insert results in duplic
Hi All,
During monitoring of our SAP SRM system in SM58 transaction we have received the below error. Please advise on this.
The ABAP/4 Open SQL array insert results in duplic
SM58 for Wf-BATCH user
SRM/MM: FM SPPF_PROCESS
thanks and regards
mohammed
What action did you performed?
Similar Messages
-
Error: The ABAP/4 Open SQL array insert results in duplic in EWM
Hi Friends,
During outbound process in EWM, my completed EWM delivery gets stuck in SMQ1 with error "The ABAP/4 Open SQL array insert results in duplic". I performed following checks and found all the ok. Please help me with your insights.
- Checked the Master data Products, Business Partners,are CIFed properly. Yes they are done properly.
- Checked if inbound is stuck in same way. But its not.
- Checked if there is any enhancement stopping in ECC. There is some enhancement in Document_save in ECC outbound delivery which I got it commented. Still the problem is same.
Please suggest what could be the root cause.
Thanks
TrivediHi Rushikesh,
I checked all Number ranges (O/D in EWM and ECC, HU and Batches). All are ok. I tried taking help of ABAPer to see if any Run time errors occuring but no use.
Regards,
Trivedi -
The ABAP/4 Open SQL array insert results in duplicate database records
Hi,
Iam getting following error :
The ABAP/4 Open SQL array insert results in duplicate database records.
Error in ABAP application program.
The current ABAP program "SAPLV60U" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
" Information on where terminated
The termination occurred in the ABAP program "SAPLV60U" in "VBUK_BEARBEITEN".
The main program was "SAPMSSY4 ".
The termination occurred in line 503 of the source code of the (Include)
program "LV60UF0V"
of the source code of program "LV60UF0V" (when calling the editor 5030).
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the
procedure "VBUK_BEARBEITEN" "(FORM)" but was not handled locally, not declared
in the
RAISING clause of the procedure.
The procedure is in the program "SAPLV60U ". Its source code starts in line 469
of the (Include) program "LV60UF0V "."
Please assist how to proceed further ..
Many thanks
Mujeeb.Sorry, THe correct note is 402221.
Description from the note
<< Please do not post SAP notes - they are copyrighed material >>
Edited by: Rob Burbank on Feb 22, 2009 3:46 PM -
The ABAP/4 Open SQL array insert results in duplicate Record in database
Hi All,
I am trying to transfer 4 plants from R/3 to APO. The IM contains only these 4 plants. However a queue gets generated in APO saying 'The ABAP/4 Open SQL array insert results in duplicate record in database'. I checked for table /SAPAPO/LOC, /SAPAPO/LOCMAP & /SAPAPO/LOCT for duplicate entry but the entry is not found.
Can anybody guide me how to resolve this issue?
Thanks in advance
Sandeep PatilHi Sandeep,
Now try to delete ur location before activating the IM again.
Use the program /SAPAPO/DELETE_LOCATIONS to delete locations.
Note :
1. Set the deletion flag (in /SAPAPO/LOC : Location -> Deletion Flag)
2. Remove all the dependencies (like transportation lane, Model ........ )
Check now and let me know.
Regards,
Siva.
null -
He ABAP/4 Open SQL array insert results in duplicate database records
Dear Gurus,
II am getting a dump when I run MD02/ MD03. (t- code to run MRP)
Below is the message system is showing:
Please help
Thanks in Advance
Best Regards
Adhish
Short text
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLM61U" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "INSERT_MDSBI_IN_MDSB" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
1 *----
2 * ARRAY-INSERT auf MDSB
3 *----
4 FORM INSERT_MDSBI_IN_MDSB.
INSERT MDSB6 FROM TABLE MDSBI.
7 ADD SY-DBCNT TO STATS-RESBI. "statistics
8 ENDFORM.Hi,
There must be inconsistency in the number range. This happens when the current number in the number range for dependent requirements is lower than the highest number in the database table of the dependent requirements RESB.
Please check the current number in transaction OMI2. Here in the interval you can see the current number. Then please check the highest number in table RESB. If the current number in OMI2 is lower than the highest number in table RESB then this should be the reason for the dump.
Check and revert. If that's not the case we'll look into other possibilities.
In mean time check for SAP Note 138108. -
ABAP/4 Open SQL array insert results in duplicate database records in SM58
Hi Everyone,
I am testing a file to idoc scenario in my Quality system. When I passed the input file, the mapping executed successfully and there are no entries in SMQ2 but still the idoc wasn't created in the ECC system. When I have checked in TRFC, I am getting the error ABAP/4 Open SQL array insert results in duplicate database records for IDOC_INBOUND_AYNCHRONOUS function module. I thought this is a data issue and I have tested with a fresh data which was never used for testing in Quality but even then I am getting the same error.Kindly advise.
Thanks,
Laawanyause FM idoc_status_write_to_database to change the IDoc status from 03 to 30 and then run WE14 or RSEOUT00 to change the status back to 03
resending idoc from status 03 ...is a data duplicatino issue on receiving side...why do u need to do that ?
Use WE19 tcode to debug
In we19
1)U can choose your Idoc number in existing Idoc textbox
2)Press execute
3)u will display ur Idoc struct
4)Dbl click on any field then u can modify its content
5)PressStd Outbound Processing Btn to process modified Idoc
Thats it -
ABAP/4 Open SQL array insert results in duplicate databaserecordsfor pk13
Hi Experts, when I am working with pk13n tranaction iam getting an error message stating that update was terminated by user. when i am checking with st22 it gives the following message. please give the solution , iam sending the code as well.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "SAVE_DATA" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.) please find the below code please give the solution for this error message.
1 *eject
2 *----
3 * Verbuchen der Daten *
4 *----
5 FORM SAVE_DATA.
6
7 DATA: lf_menge LIKE ekpo-menge VALUE 0, "717464
8 lf_netwr LIKE ekpo-netwr VALUE 0.
9
10 * Einteilungen löschen --> Array Delete aus Tabelle DEKET
11 DESCRIBE TABLE DEKET LINES SY-TFILL.
12 IF SY-TFILL GT 0.
13 DELETE EKET FROM TABLE DEKET.
14 IF SY-SUBRC NE 0.
15 MESSAGE A865.
16 ENDIF.
17 EKET_DELETE = EKET_DELETE + SY-DBCNT.
18 REFRESH: DEKET.
19 CLEAR : DEKET.
20 ENDIF.
21
22 * Einteilungen hinzufügen --> Array Insert aus Tabelle IEKET
23 DESCRIBE TABLE IEKET LINES SY-TFILL.
24 IF SY-TFILL GT 0.
>> INSERT EKET FROM TABLE IEKET.
26 IF SY-SUBRC NE 0.
27 MESSAGE A864.
28 ENDIF.
29 EKET_INSERT = EKET_INSERT + SY-DBCNT.
30 REFRESH: IEKET.
31 CLEAR : IEKET.
32 ENDIF.
33
34 * Check whether the qty in EKPO-MENGE is correct: note 717464
35 SELECT SUM( menge ) FROM eket INTO lf_menge
36 WHERE ebeln = ekpo-ebeln
37 AND ebelp = ekpo-ebelp.
38 IF sy-subrc = 0 AND ekpo-menge <> lf_menge.
39 IF ekpo-ktmng <> 0.
40 refe1 = ekpo-zwert * lf_menge / ekpo-ktmng.
41 ELSE.
42 refe1 = ekpo-zwert * lf_menge / 1000.
43 ENDIF.
44 IF refe1 > maxwert.Hi,
Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
Kr,
Manu. -
ABAP/4 open SQL array results in dupl
Hi All,
The contract in SRM is not transferred to ECC. When checked the outbound queue through smq1, it says 'ABAP/4 open SQL array results in dupl ' for the program name given as SAPMSSY1. I learnt that this occurs when trying to insert a record in
the database and that record already exists with the same key. Debug didn't help and also searching for the relevant notes. Please suggest.
Thanks.
Regards,
AnuradhaHi Anuradha,
please implement the note 1092012 into the backend system, and retest.
Eventually if you have a BAdI (e.g. the BBP_CTR) deactviate it also temporary to check the infulence.
Regards,
Peter -
The column name "PERNR" has two meanings. ABAP/4 Open SQL statement.
Hi All,
Could anyone advise on what are the error I encountered at below code.
I get the error in " The column name "PERNR" has two meanings. ABAP/4 Open SQL statement." . This errors happen to all the key fields I have selected in below code (eg: pernr, subty, objps, sprps, begda, endda, seqnr).
The field zeih also encountered error in "Unknown column name "ZEIH". not determined until runtime, you cannot specify a field list."
SELECT pernr
subty
objps
sprps
begda
endda
seqnr
zlsch
ZEIH
SELECT * INTO CORRESPONDING FIELDS
OF TABLE i_pa0009
FROM pa0001 INNER JOIN pa0009
ON pa0001pernr = pa0009pernr
WHERE bukrs IN s_code AND
banks NE space.Hi,
In this query
SELECT pernr
subty
objps
sprps
begda
endda
seqnr
zlsch
ZEIH
if you have used joins and if both the database pa0001, pa0009 has the above mentioned fields you will get the error message as the control gets confused as to which table of the field you are referring to..., instead use them in this way
SELECT pa0001~pernr
for each field mention to which table it belongs and ~ before the field name in the above fashion, this will remove the error
Regards,
Siddarth -
RE: (forte-users) SQL Array Insert
Unfortunately that carries a tremendous overhead. Each request is a seperate
message and forte generates alot of behind the scenes prepares for the sql.
---------------------- Forwarded by Amos G. Radford on 10/27/2000 02:34 PM
"Amin, Kamran" <kamran.aminlendware.com> on 10/27/2000 02:33:07 PM
To: Amos G. RadfordBankofAmerica
cc:
Class: Internal Use Only
Subject: RE: (forte-users) SQL Array Insert
User a for loop and call update for each row in the array.
For Loop
Update
set
1=test[1]
end for
ka
-----Original Message-----
From: Amos.G.Radfordbankofamerica.com
[mailto:Amos.G.Radfordbankofamerica.com]
Sent: Friday, October 27, 2000 12:07 PM
To: forte-userslists.xpedior.com
Subject: (forte-users) SQL Array Insert
I have run into a strange problem that I never really run into
before. If I want to save an array of items into a table in TOOL
SQL, how can I do it if the column names in the table are different
than the column names in the class. In the past we always had
the luxury of the column names being the same.
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comMadhu,
Do the following:
1. create prepare statement
e.g
stmHnd : DBStatementHandle;
inputData : DBDataset = new;
stmType : integer;
stmHnd = DBSesObj.prepare('insert into
table_name myCOl1, myCol2, myCol3
values(:myCol1Value, :myCol2Value, :myCol3Value)',
inputData,stmType);
2. Populate the input DBDataset.
e.g
// assign the maximum value
inputData = myArrObj.items;
// assign the values
for i in 1 to myArrObj.items do
inputdata.currentRow = i;
inputdata.setvalue(':myCol1Value',
myArrObj.attr1);
inputdata.setvalue(':myCol2Value',
myArrObj[i].attr2);
inputdata.setvalue(':myCol3Value',
myArrObj[i].attr3);
end for;
3. execute the statement:
e.g .
DBSesObj.execute(stmHnd, inputData);
4. release the handle
DBSesObj.RemoveStatement(stmHnd);
Hope this helps,
Babu
--- "Epari, Madhusudhan" <meparioxhp.com> wrote:
Babu,
I'm not clear on how dynamic sql statement would
access the database only
one time for inserting an array of records in to the
table. Could you tell
how's it done?
thanks in advance,
Madhu
-----Original Message-----
From: Babu Raj [mailto:ibcsmartboyyahoo.com]
Sent: Friday, October 27, 2000 8:02 PM
To: Amos.G.Radfordbankofamerica.com;
forte-userslists.xpedior.com
Subject: RE: (forte-users) SQL Array Insert
Amos,
Why don't you use, Dyanmic SQL statement,
where
you need to prepare only one SQL Statement, and
populate input place holder, which is much simpler
and
you need to access the database only one time(which
is
efficient operation). This is useful, especially,
when
you want to update. But for your inforamtion, Forte
internally inserts, one by one row, even if u call
Static SQl statement, with array of record. Os its
advisable to use Dyanmic SQL statement.
Hope this helps,
Babu
--- Amos.G.Radfordbankofamerica.com wrote:
Unfortunately that carries a tremendous overhead.
Each request is a seperate
message and forte generates alot of behind the
scenes prepares for the sql.
---------------------- Forwarded by Amos G.Radford
on 10/27/2000 02:34 PM
"Amin, Kamran" <kamran.aminlendware.com> on
10/27/2000 02:33:07 PM
To: Amos G. RadfordBankofAmerica
cc:
Class: Internal Use Only
Subject: RE: (forte-users) SQL Array Insert
User a for loop and call update for each row inthe
array.
For Loop
Update
set
1=test[1]
end for
ka
-----Original Message-----
From: Amos.G.Radfordbankofamerica.com
[mailto:Amos.G.Radfordbankofamerica.com]
Sent: Friday, October 27, 2000 12:07 PM
To: forte-userslists.xpedior.com
Subject: (forte-users) SQL Array Insert
I have run into a strange problem that I never
really run into
before. If I want to save an array of items intoa
table in TOOL
SQL, how can I do it if the column names in the
table are different
than the column names in the class. In the pastwe
always had
the luxury of the column names being the same.
For the archives, go to:
http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com
For the archives, go to:
http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com
For the archives, go to:
http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:forte-users-requestlists.xpedior.com -
ABAP/4 Open SQL statement with WHERE ... LIKE and pattern too long
Dear All,
I am getting an error "ABAP/4 Open SQL statement with WHERE ... LIKE and pattern too long" while executing the following statement:
CLEAR LS_RANGE.
LS_RANGE-SIGN = 'I'
+LS_RANGE-OPTION = 'CP' +
LS_RANGE-LOW = 'S_ADMI_FCD'
LS_RANGE-HIGH = 'S_ADMI_FCD'
COLLECT LS_RANGE INTO LT_RANGE.
SELECT *
FROM UST12
INTO CORRESPONDING FIELDS OF TABLE LT_OBJECT_VALUES
WHERE FIELD IN LT_RANGE
AND AKTPS = 'A'.
For options like BT(Between), EQ(Equal) in range table, this above query is executing without dump. But for option CP, it simply dumps & in dump what i found is, it is concatenating the value in low & high.
Does anyone have any idea regarding open sql using range tables.
Thanks,
BhupinderHi,
I commented as follows:
If LS_RANGE-HIGH is empty, you can use EQ, NE, GT, LE, LT,CP, and NP. These operators are the same as those that are used for logical expressions. Yet operators CP and NP do not have the full functional scope they have in normal logical expressions. They are only allowed if wildcards ( '*' or '+' ) are used in the input fields. If wildcards are entered on the selection screen, the system automatically uses the operator CP.
If LS_RANGE-HIGH is filled, you can use BT (BeTween) and NB (Not Between). These operators correspond to BETWEEN and NOT BETWEEN that you use when you check if a field belongs to a range. You cannot use wildcard characters.
You can try:
CLEAR LS_RANGE.
LS_RANGE-SIGN = 'I'.
+LS_RANGE-OPTION = 'CP' +
LS_RANGE-LOW = 'S_ADMI_FCD'.
LS_RANGE-HIGH = 'S_ADMI_FCD'.
FIND '*' IN LS_RANGE.
IF sy-subrc = 0.
LS_RANGE-OPTION = 'CP'.
ELSE.
LS_RANGE-OPTION = 'EQ'.
ENDIF.
COLLECT LS_RANGE INTO LT_RANGE.
SELECT *
FROM UST12
INTO CORRESPONDING FIELDS OF TABLE LT_OBJECT_VALUES
WHERE FIELD IN LT_RANGE
AND AKTPS = 'A'.
If you use wildcards the LS_RANGE length should not exceed 10 characters.
Hope this information is help to you.
Regards,
José -
How to see the abap code in sql language.
hello gurus,
very simply put,i dont know sql,but have to write some basic select queries to talk to oracle db...
i would like to see the SQL transaltion of the ABAP code which i cant write.
for eg: SELECT SINGLE * FROM MARA WHERE MATNR = 'XXXX'.
How wud u write this on ORACLE.
i would also like to see for all entries etc...
NOW,i have tries st05..it doesnt give meaningful sql..
pls helphai
i wrote this in se38
report zdsd.
data wmatnr type mara.
select single * from mara into wmatnr where matnr = '0001'.
write wmatnr.
_from st05_
41 PROGDIR REOPEN 0 0 SELECT WHERE "NAME" = 'ZTEST123' AND "STATE" = 'A'
1,182 PROGDIR FETCH 1 0
4 DWINACTIV REOPEN 0 0 SELECT WHERE "OBJECT" = 'REPS' AND "OBJ_NAME" = 'ZTEST123'
592 DWINACTIV FETCH 0 1403
8 MARA REOPEN 0 0 SELECT WHERE "MANDT" = '001' AND "MATNR" = '0001'
9,388 MARA FETCH 1 0
i would like
select matnr
into :vi_matnr
from PPS_SUB_BDZ.lm1_lagerpl
where matnr = '0001'
basicaly i need to work on new database (NON SAP) by making connections..
i write the code in FM's in ABAP.
I write Select queries between EXEC SQL. and
ENDEXEC.
I have to use SELECT SINGLE...FOR ALL ENTRIES ...counterparts now... -
To fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL
Hi Experts,
My basis team wants me to write a OPEN sql statement in DB2 . T
The Open SQL statement for reading data from database tables is:
SELECT <result>
INTO <target>
FROM <source>
[WHERE <condition>]
[GROUP BY <fields>]
[HAVING <cond>]
[ORDER BY <fields>].
I want to fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL in report RSORADJV in PI .
As per PI basis comment : To use u201CRSORADJVu201D you need write the code in open SQL. If the code had been written in open SQL in the first place you wouldnu2019t be having to translate this from MS SQL.
Can you pls help in writing open sql with above syntax .
Initially when I wrote as
QL statement : select * from SAPDBSR3.XI_AF_MSG, I got the error messege as
Error : insufficient priviliage to access specified table.
Again basis suggested to write this code in OPen SQL statement .
Please suggest., I dont know open SQL for the same.
Regards,
Arnab.Hi,
Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
Kr,
Manu. -
Hi friends,
I'm going to read and process data in an interface coded in ABAP and OPEN SQL. To improve efficiency and reliability I'm processing the data in packets of a fixed size of rows - reading rows up to a predetermined numer into an internal table which then is processed and then finaly written back to database followed by "commit work". Then the process will continue with reading the next fixed number of rows, process them, and so on ...
The general question is, which is the most efficient way to implement this scenario?
I think of two basic approaches:
1.1) Loop over results from a cursor using FETCH NEXT CURSOR inside a LOOP appending the lines to the internal table.
2.1) Execute SELECT ... INTO TABLE <itab> FROM <table> UP TO <data packet size> ROWS.
My assumtion is that approach 2 would be the more effecient, is that correct?
The processed data will be written back to the database in one single statement:
2.2) INSERT <table> FROM TABLE <itab>
Which I assume is more efficient than doing the same using multiple inserts within a loop?
Regards,
ChristianIn native SQL you can also use the packet options.
SELECT <Fields name> appending corresponding fields of table <Internal table>
<b>package size 20000</b>
FROM <Database table name>
WHERE <Condition>.
ENDSELECT.
By using this the system will fetch the records from database table in packets [20000 records per package]
Regards
Aman -
How to get the number of records of a streaming result set
Hi guys.
So if it wasn't a streaming result set, I would have done this:
{noformat}myResultSet<code class="jive-code jive-java">.last();
{color:navy}*int*{color} numResults = </code>myResultSet<code class="jive-code jive-java">.getRow();
</code>myResultSet<code class="jive-code jive-java">.beforeFirst();
</code>{noformat}
but being a streaming result set, beforeFirst() throws an exception...
So how do you get the number of records in that result set? I wanna avoid an extra count(*) query, so I would appreciate other solutions than that.JoachimSauer wrote:
vanwil wrote:
you see, for now I just use a count(*) query to get the number of records, but that's adding a lot of extra waiting time...Iterating over the result twice will surely be slower then doing the count(*).great! so what I got now is actually the fastest way there is... awesome...
If you get an exception, then you surely have a stack trace. That should tell you what happens, or at least where.com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:2066)
Why do you need to know the number of elements beforehand, anyway?I need to know the number of elements because the incoming data goes into a table. Now of course, I could use ArrayList<String[]> or something, but wouldn't that require more memory resources than Object[][] ?
No one can tell you that, at least not without more information (say, the stack trace for example).Here's the exception message:
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@10c0ef2 is still active. Only one streaming result set may be open and in use per-connection. Ensure that you have called .close() on any active result sets before attempting more queries.
Maybe you are looking for
-
AutoDiscover is a new feature in Exchange 2007, to provide access to Microsoft Exchange features (OAB, Availability service, UM) for Outlook 2007 clients or later. We can determine whether problems related to AutoDiscover via OWA. For example: OOF is
-
Thinking of making the PC to Mac Move, questions about Photos App
Helped my mother on her Mac a little bit and got the Photos App working for her. Now my turn, I have been a die hard Windows user, but I will never use a Windows phone. (Can never give up my iPhone) I have been taking on a huge family project of scan
-
Deskjet 9800 prints incorrectly
Printed 8 1/2 x 11 on 11 x 17 print jobs....printed 8 1/2 x 11 jobs at 90 degrees from desired ( landscape instead of portrait). Installed driver from another model and it worked OK Wouldn't print - "out of paper"....not true, black ink had leaked
-
My itunes is crashing when i connect my ipod
my itunes is crashing when i connect my ipod
-
Why can I not turn my phone on?
Why can I not get my phone to come on?