Update terminate on commit Bapi_network_comp_add
Hi experts
I write a form to add comp to Network.If the networks are not released the form can add components for these network and once commit and wait. if the network is released the form can add components one network and once commit and wait, If do that for more than two network and one network by one commit and wait the update terminat will appear.I read the system log ,It told me insert duplicate.the form code is follow, Anybody can give me a solution to solve this issue.Thanks
FORM FRM_TREAT_COMPANT TABLES PT_ITAB TYPE TY_T_ITAB USING P_PSPID P_PLANT.
DATA: WI_LINES TYPE I,
WS_LINES TYPE STRING,
WS_CURRLINE TYPE STRING,
WI_PERCENT TYPE I.
DATA: WS_MSG TYPE STRING.
DATA: WA_ITAB_WORK TYPE TY_ITAB,
WA_ITAB_MAT TYPE TY_ITAB.
DATA WT_ITAB TYPE STANDARD TABLE OF TY_ITAB.
DATA WT_MATNR TYPE STANDARD TABLE OF TY_ITAB.
DATA W_ERROR TYPE C VALUE SPACE.
DATA WT_MESSAGE TYPE STANDARD TABLE OF TY_MESSAGE.
DATA W_EQUNR(24) TYPE C.
DATA WA_MESSAGE TYPE TY_MESSAGE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
LOOP AT PT_ITAB INTO WA_ITAB_WORK WHERE EQUNR NA '-F' AND AUFNR IS NOT INITIAL.
APPEND WA_ITAB_WORK TO WT_ITAB.
ENDLOOP.
CHECK WT_ITAB[] IS NOT INITIAL.
DESCRIBE TABLE WT_ITAB LINES WI_LINES.
WS_LINES = WI_LINES.
LOOP AT WT_ITAB INTO WA_ITAB_WORK.
WS_CURRLINE = SY-TABIX.
CONCATENATE '?y?úu2032|àíu03BCú' WS_CURRLINE 'ì?£?12' WS_LINES 'ì?' INTO WS_CURRLINE.
WI_PERCENT = SY-TABIX * 100 / WI_LINES.
PERFORM FRM_DISPLAY_PROCESS USING WI_PERCENT WS_CURRLINE .
*--Begin Create Matnr
REFRESH WT_MATNR.
LOOP AT PT_ITAB INTO WA_ITAB_MAT
WHERE ( PARENT EQ WA_ITAB_WORK-EQUNR
AND UPMAT EQ CNS_X
AND CSTYP NE 'A' AND FLCOM NE CNS_X ) OR ( EQUNR EQ WA_ITAB_WORK-EQUNR AND UPMAT EQ CNS_X AND FLCOM NE CNS_X ).
APPEND WA_ITAB_MAT TO WT_MATNR.
ENDLOOP.
CHECK WT_MATNR[] IS NOT INITIAL.
PERFORM FRM_CREATE_MAT TABLES PT_ITAB
WT_MATNR
WT_MESSAGE
USING P_PLANT
WA_ITAB_WORK.
ENDLOOP.
LOOP AT WT_MESSAGE INTO WA_MESSAGE WHERE TYPE CA 'EA'.
W_ERROR = CNS_X.
EXIT.
ENDLOOP.
PERFORM FRM_UPDATE_ZTPS014 TABLES PT_ITAB.
MESSAGE I000 WITH '×é?té?1ò3é1|'.
ENDIF.
ENDFORM. "FRM_CREATE_COMPANT
FORM FRM_CREATE_MAT TABLES PT_ITAB TYPE TY_T_ITAB
PT_MATNR TYPE TY_T_ITAB
PT_MESSAGE TYPE TY_T_MESSAGE
USING P_PLANT
P_ITAB TYPE TY_ITAB.
DATA:
WA_ITAB_TMP TYPE TY_ITAB,
WA_ITAB_MAT TYPE TY_ITAB,
WA_MESSAGE TYPE TY_MESSAGE.
DATA WT_COMPONENTS_ADD TYPE STANDARD TABLE OF BAPI_NETWORK_COMP_ADD WITH HEADER LINE.
DATA WT_MESSAGE_TABLE TYPE STANDARD TABLE OF BAPI_METH_MESSAGE WITH HEADER LINE.
DATA W_RETURN LIKE BAPIRET2.
REFRESH WT_COMPONENTS_ADD.
LOOP AT PT_MATNR INTO WA_ITAB_MAT .
WT_COMPONENTS_ADD-ACTIVITY = '0010'. " ???ˉ
PERFORM FRM_CONV_VALUE USING WA_ITAB_MAT-MATNR CHANGING WT_COMPONENTS_ADD-MATERIAL.
WT_COMPONENTS_ADD-PLANT = P_PLANT.
WT_COMPONENTS_ADD-ITEM_CAT = CNS_ITEMCAT. " ????àà±e
WT_COMPONENTS_ADD-ENTRY_QUANTITY = WA_ITAB_MAT-BDMNG. " êyá?
WT_COMPONENTS_ADD-PUR_GROUP = WA_ITAB_MAT-EKGRP.
WT_COMPONENTS_ADD-PURCH_ORG = WA_ITAB_MAT-EKORG.
WT_COMPONENTS_ADD-PRICE = WA_ITAB_MAT-PRICE.
WT_COMPONENTS_ADD-MRP_RELEVANT = '2'. " 2é1oéê??éú3é·?ê? 1 u2032ó2? 2??u2032?oó 3á¢?u2032
WT_COMPONENTS_ADD-TYPE_OF_PUR_RESV = '5'. " 2é1oDè?ó + WBS ?a??u03BC?±£á?
WT_COMPONENTS_ADD-TRACKINGNO = WA_ITAB_MAT-XQGZH. " Dè?ó?ú×ùo?
APPEND WT_COMPONENTS_ADD.
ENDLOOP.
CHECK WT_COMPONENTS_ADD[] IS NOT INITIAL.
CALL FUNCTION 'BAPI_NETWORK_COMP_ADD'
EXPORTING
NUMBER = P_ITAB-AUFNR
IMPORTING
RETURN = W_RETURN
TABLES
I_COMPONENTS_ADD = WT_COMPONENTS_ADD
E_MESSAGE_TABLE = WT_MESSAGE_TABLE.
*--Du2032è??????t
LOOP AT WT_MESSAGE_TABLE.
MOVE P_ITAB-EQUNR TO WA_MESSAGE-EQUNR.
MOVE WT_MESSAGE_TABLE-MESSAGE_TYPE TO WA_MESSAGE-TYPE.
MOVE WT_MESSAGE_TABLE-MESSAGE_TEXT TO WA_MESSAGE-MESSAGE.
APPEND WA_MESSAGE TO PT_MESSAGE.
CLEAR WA_MESSAGE.
ENDLOOP.
ENDFORM. "FRM_CREATE_MAT
FORM FRM_UPDATE_ZTPS014 TABLES PT_ITAB TYPE TY_T_ITAB.
MODIFY ZTPS_014 FROM TABLE PT_ITAB.
COMMIT WORK AND WAIT.
ENDFORM.
Hi Amit,
ME_UPDATE_REQUISITION is giving the dump as it is tryingto insert a PR that is already there in EBAN..
But i dont know why this is happening as a COMMIT WORK is also there after the first execution
of BAPI_NETWRK_COMP_ADD that too with a WAIT statement
It should insert a new PR .It should not take the previous one.
The problem is coming only if the activity is released...if the activity is not released everything is fine
Regards,
Nishant Rana
Similar Messages
-
Update terminate during return sales order creation (Delivery processing)
Hi,
I have having issues with a scenario while creating delivery in a 4.7 system. When creating a return order (using FM SD_SALESDOCUMENT_CREATE) our system is configured to automatically generate deliveries for the return SO.
The scenario we are facing an issue in is, during data processing, a delivery is created using FM W_FRM_DELIVERY_CREATE_GENERAL, delivery is then processed for picking and PGI using FM WS_DELIVERY_UPDATE.
For the next record, a return order is created using FM SD_SALESDOCUMENT_CREATE, which also automatically tries to create the delivery. At this point we get an update terminate upon COMMIT and dump says SAPSQL_ARRAY_INSERT_DUPREC pointing towards form VBFA_BEARBEITEN.
Based on my analysis, while updating table VBFA the internal table DA_XVBFAI also has document flow for the previously processed regular sales order for which the system tries to insert a record in VBFA. This is a duplicate record and the update is terminated. The buffer nees to be refreshed and I tried using FM SHP_DELIVERY_BUFFER_REFRESH and LE_DELIVERY_REFRESH_BUFFER. None of these seem to refresh the VBFA buffer.
I would appreciate if anyone can share their experience with this issue. Thanks for your help!
-RogerHi,
Try using one of these function modules BUTX_FRG0010_CLEAR_BUFFER or CK_F_SHARED_BUFFER_DELETE or COM_IL_DB_RESET_BUFFER or SNC_USER_FLUSH_BUFFER .
KR Jaideep, -
Express document update terminate received from author
We are getting the error message as "express document update terminate received from author" in co11n transaction.
We checked the details in sm13 and found the below Function module update failed.
2 MCF_STATISTICS_UPD_V2 V2 Initial
Error in V2 Part
Frequently we are getting this error in co02 and afs/md04 also
Any one can help me to resolve this issue.
Regards,
surenIn such a case I would create an OSS message.
-
Update terminate error in va02 Z print program
Hi All,
I have an update terminate error in va02 Z print program when it encounters information message statement while printing the sales order.
I have changed it to status message then no error
This is happening only in precessing status 4(send immediately) in edit message in va02
Regards,
VenkatHi venkat,
Go to SM13 . there it gives the line no. where the termination has occured. You can debug the program from there and make relavent changes.
Amar -
Update terminate error in MIGO
Dear PM experts ,
I am doing the MIgo goods issue from the PM order the following update terminate is being reported.
What could be the possibility , did anyone face this error before.
System ID.... MRD
Client....... 100
User..... PWC
Transaction.. MIGO
Update key... 777ED2DDC578F187AA93001635B0CD06
Generated.... 25.12.2008, 17:51:20
Completed.... 25.12.2008, 17:51:20
Error Info... TD 427: Element KOPF
regards,
A STalk to your ABAP team, they should be able to help.
PeteA -
Update/Terminate Issue on Goods Move?
Not sure how to resolve this issue. I perform one particular material movement in an interface that updates/terminates. However, when I run the transaction by itself in the interface it is OK?
Errors in the Update/Terminate are:
CL 587: Delete data in table AUSP terminated
00 671: ABAP/4 processor: IMPORT_UNEXPECTED_END_OF_DATA
How can I resolve this issue?
Any suggestions are welcomed.
Thank-You.Some time error message will misleading; I feel you are trying to insert key field by duplicating
-
Oracle 10G AS, Batch Update doesn't commit.
Hello,
We are using Batch uptdate to commit a set of records, but to our surprise one of the batches commits in DB and the other doesnt.
The below pseudo code explains our scenario :
String str1="INSERT INTO TBL1 (COL1,COL2) VALUES (?,?) ";
String str2="UPDATE TBL2 SET COL1=? WHERE COL2=?";
PreparedStatement pstmt1=conn.prepareStatement(str1);
PreparedStatement pstmt2=conn.prepareStatement(str2);
for(500 recs)
pstmt1.addbatch();
pstmt2.addbatch();
On 500 Recs
//This batch updates the DB and commits too
pstmt1.executeBatch();
pstmt1.clearBatch();
con.commit();
//The Batch executes successfully, but updates are not reflected in DB,
//which may mean that it must not be committing in DB
pstmt2.executeBatch();
pstmt2.clearBatch();
con.commit();
- In the above, pstmt1 is an INSERT and pstmt2 is an UPDATE.
- It so happens that at the end, DB reflects Inserts done by pstmt1, but it doesnt reflect the Updates of pstmt2.
- We have also fired a SELECT stmt immediately after pstmt2 Execute Batch, but the updated values are not reflected.
- Also the above scenario works absolutely fine if we use a STATEMENT instead of a PREPAREDSTATEMENT for pstmt2.
Set up Details:
App Server :: Oracle 10G AS for Linux 2.1,
Database Driver :: Oracle 10G Driver which is bundled with Oracle 10G AS
Database :: Oracle 9i
Any ideas in this regards would be highly appreciated.
Thanks !
- Khyati
Message was edited by:
user473157I think this is not the right forum for this question; probably a JDBC forum or one of the Oracle AS forums.
Kuassi -
HT201270 Can I find out the version of an update before I commit to a click?
I need to put an update on my i phone 3G but before I commit to the update I want to know what version it is. If I click download and update is it too late to know the version or will there be something that tells me and asks if I want to proceed.
HelenLook up the app in the iTunes Store before you update. The app's page should tell you version, system requirements, and if the developer is at all reponsible what's changed.
Regards. -
Hello everyone,
i'm begginner in ADFand using jdev 11.1.2.4
I have table , there is attribute called "flag" I want when update in this table and press "commit" after pressing ....update this "flag" with '1"
ex. After pressing commit "update table set flag = 1 "
anyone can help me plz.
ThanxDear I try to write this code
protected void doDML(int operation, TransactionEvent e) {
super.doDML(operation, e);
if (operation == DML_UPDATE) {
setCallStat("1"); // this is the flag
try {
getDBTransaction().commit();
catch (JboException ex) {
getDBTransaction().rollback();
throw ex;
but After run application and press commit appear this Error
java.lang.StackOverflowError
cannot be cast to java.lang.Exception -
JSP sql:update how to commit.
Can any body tell me how to do a commit in JSP. I am using the book JavaServer Pages book of O'relly
as a frame work for a web page using JSP. Everything works great for select etc. However when I try to use examples with <sql:update Employee etc.... it seems that it works but when I look at the data base
or do a <c:redirect> statement it doesn't seem to update the table. I am guessing that I need to do a commit before leaving my jsp page. Does any body know what can I do?
Thanks
Frank.what database are you using, Access?
Try closing the statement and connection when your update is done. -
Hi all,
I am using the functional module BAPI_PROCORDCONF_CANCEL for cancelling the confirmation order.After that if it is successfull i am comminting using
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
after this immediately checking in AFWL table for the cancelled confiramtion order. Select statement is returning sy-subrc - 4.since entry is not found in the table.suppose if use wait up to 5 seconds after callling bapi_transaction commit.entry is found in the table AFWL.By this it is understood its taking time to update in the table.I want to avoid this wait statement is there any alternate way ( Avoiding DO and ENDDO ).Can any body guide me on this.
Thanks in advance.
SivaHi Siva,
In your case it makes sense to use the wait flag as 'X', as this marks it as a synchronous update(while a blank signifies an asynchronous update - read the documentation on this).
I guess you can try to set the update task as local using statement "SET UPDATE TASK LOCAL" before the FM call, so that the update is done by the same work process.
Also i don't see a table AFWL in my system, is the table name correct - anyways check if the table is buffered by any chance(i am sure that it is not).
In case if there is any other pending tasks in your programs flow, which can be executed between "COMMIT" and "SELECT" i would suggest that you do this here.
Failing all of the above, you might have to go with a DO ENDO.
Regards,
Chen
Edited by: Chen K V on Apr 14, 2011 11:07 AM -
OSS Note for MIGO "Update terminate (SAPSQL_ARRAY_INSERT_DUPREC)"
Dear all
I am facing problem during MIGO GR reference Others, MVT 561.
Upon clicing Button: Save, I face 2 types of errors intermittently
1. Material document is saved and generated but when comes to displayed, it will say "Document 4900496xxx does not exist in calendar year 2009" And I check in Table: MKPF and it does not exist at all
2. I am not able to save it and face this termination error:
The ABAP/4 Open SQL array insert results in duplicate database record
What happened?
Error in ABAP application program.
The current ABAP program "SAPLGLIU" had to be terminated because one
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and adminis
termination messages, especially those beyond their normal deletion"
I have done my investigation and the number range uder FBN1 for this MVT 561 under this Company Code and Year has been maintained.
Can anyone advise me the OSS note to solve it? I cannot find a direct OSS note on it to solve this.
Thanks.
Edited by: Daimos on Oct 26, 2009 7:58 AMSorry Jurgen
I have posted so many material documents using MIGO to test it out and try to update my OMBT there so many times until I lost track what is the current number range when I wrote my question here.
I have read that thread you posted regarding the ST22 analysis [Solution from Jurgen|Document does not exist after creation of PO; . I exported them to HTML and did a detail checking, and I find out it is FI GL there did not update the number range properly which in turns cause my GR to have problems.
Below is my analysis and learning to share with others:
1. Ask the ABAPER to find out which record value the system trying to insert. Copy down this number.
2. Check the OMBT value of Current Number.
3. Then use the MFPK Table to search the latest Number Range.
4. Try to check if the record value trying to insert already exists in Current Number. Normally, it will exist and that is why
system prompt "insert duplication".
5. Then check if the record value trying to insert already exists in MFPK Number. Normally, it will exists it will exist and that is
why system prompt "insert duplication". (There can be situation that the Current Number is lower than the MFPK Number,
but it rarely happen).
6. Replace the Current Number to be the Next Number of MKPF largest Number. Save and it should work.
7. If it is not work, please create a material which is non valuated and perform GR, if GR can be done and we can display
material doc, it means the error is caused by the FI GL number range error.
8. There can be other issues such as activation of user exits and other.
Jurgen, I got one more question to ask you. I have tried to replace the current number with the largest number of MKPF without + 1. It can solve my problem.
But I wonder why SAP Notes and you suggest us to replace Current Number with largest MKPF value PLUS 1?
Please advise.
Thanks.
Edited by: Daimos on Nov 2, 2009 8:41 AM -
In SM13 updates terminates for transaction MIR7 only
Greetings,
Updates for transaction MIR7 are terminating. The tablespace is not full and other updates are successful.
I just want to explore the number range issue. I want to understand which number range might be used-up (i.e. update [OMRJ] or the invoive specific [SM56]). Please provide detailed informations in your response.
All fails at step/module:
"5 MRM_INVOICE_DOCUMENT_POST V1 Error"
Error: M8 185: Invoice document 5105640270
Also advise who is repsonsible extending which number ranges (functional or basis)
ThanksThe problem is that the functional team says they have extended the number ranges, but the updates are still terminating. We even reset the No Range buffer in SM56 for all the application servers to no avail. There are no dumps in ST22. SM21 Log listed below:
Time Type Nr Clt User TCode Priority Grp N Text
13:01:02 UP1 036 400 2488394 D0 1 Transaction Canceled M8 185 ( 5105640496 2010 )
13:01:03 UP1 036 400 2488394 R6 5 Update terminated
13:01:03 UP1 036 400 2488394 R6 6 > Update key: 4B42ED19C648010DE10080000A031C2B
13:01:03 UP1 036 400 2488394 R6 7 > Update module: MRM_INVOICE_DOCUMENT_POST
13:05:21 UP1 035 400 90015390 D0 1 Transaction Canceled M8 185 ( 5105640499 2010 )
13:05:21 UP1 035 400 90015390 R6 5 Update terminated
13:05:21 UP1 035 400 90015390 R6 6 > Update key: 4B445D6E931800AAE10080000A031C2B
13:05:21 UP1 035 400 90015390 R6 7 > Update module: MRM_INVOICE_DOCUMENT_POST
13:36:30 UP1 035 400 40002061 D0 1 Transaction Canceled M8 185 ( 5105640608 2010 )
13:36:30 UP1 035 400 40002061 R6 5 Update terminated
13:36:30 UP1 035 400 40002061 R6 6 > Update key: 4B45D676A7CB0093E10080000A031C29
13:36:30 UP1 035 400 40002061 R6 7 > Update module: MRM_INVOICE_DOCUMENT_POST
13:57:24 UP1 036 400 40002061 D0 1 Transaction Canceled M8 185 ( 5105640671 2010 )
13:57:24 UP1 036 400 40002061 R6 5 Update terminated
13:57:24 UP1 036 400 40002061 R6 6 > Update key: 4B44C5D7957E00A5E10080000A031C29
13:57:24 UP1 036 400 40002061 R6 7 > Update module: MRM_INVOICE_DOCUMENT_POST
14:04:08 UP1 035 400 90004221 D0 1 Transaction Canceled M8 185 ( 5105640675 2010 )
14:04:08 UP1 035 400 90004221 R6 5 Update terminated
14:04:08 UP1 035 400 90004221 R6 6 > Update key: 4B425375581E0096E10080000A031C29
14:04:08 UP1 035 400 90004221 R6 7 > Update module: MRM_INVOICE_DOCUMENT_POST
I just want to identify the root cause of this problem. If it is number ranges, table buffering or what else? If there is no proof, it always becomes a basis problem. -
Dataguard - logical standby - need help - not updating data at commit
Hi
Need help ?
We have logical standby setup where data is not updated at standby when committed at Primary. It only updates when alter system swith logfile.
On Primary:
log_archive_dest_2='service=xxStandby LGWR ASYNC valid_for=(online_logfiles,primary_role) db_unique_name=xxStandby'
On Standby:
we have already created standby redo logs ( 1+ # redo logs)
we used ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE NODELAY;
The data only ships when we do the ALTER SYSTEM SWITCH LOGFILE whereas it should so when data is commited on the primary.
Is there anything we are missing or need attention.
Please help
Thanks you so muchYes, I have standby redo logs = ( 1 + # redo logs on the primary) and are of same size.
I also changed the log_archive_dest_2 setting for valid_for to ALL_LOGFILES, but the performance is still very slow... we are now overr 9 hrs behind the primary.
log_archive_dest_2='service=xxStandby LGWR ASYNC valid_for=(ALL_LOGFILES,primary_role) db_unique_name=xxStandby'
The Logical standby performance reallly not good at all. trying to increase sga/pga more ... hoping this will speed up some
Paul -
Urgent: Update terminate:
Dear SAP GURU's
In the Sales billing screen VF01:
While trying to process billing the documents the follwoing error comes :
"UPDATE WAS TERMINATED"
In the inbox the follwoing message appears:
Update was terminated
System ID.... MRD
Client....... 100
User..... PWC
Transaction.. VF04
Update key... 4F46AE0224EB4A85B7C0B3B55E4C961A
Generated.... 19.01.2008, 16:22:24
Completed.... 19.01.2008, 16:22:26
Error Info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
Please reply if you can help me in solving the problemhi,
it seems the process you are doing is resulting in generation of a duplicate record trying insert into the same place which is already filled with a similar one.
SAPSQL_ARRAY_INSERT_DUPREC , means that.
also check with your abaper by debugging to confirm where this insert is taking place and make the necessary correction.
regards
sadhu kishore
Maybe you are looking for
-
E30 - Rescue & Recovery "Rejuvenate" still at 0% after 20 hours
Dear Sirs, How long can R&R "Rejuvenate" stay at "System restore in progress... 0%" before I should begin to worry? I started a Rejuvenate on my E30 about 20 hours ago, and for at least 19 of those hours it's been sitting at 0%. (And yes, I'm
-
Hello - I am receiving this error code on all my Apple computers (iMac and MacBook) which have the most current Mac OS X 10.6.7. I'm a photographer and burn CDs frequently and out of the blue began having issues two days ago: The disc can't be burned
-
I am geting this error when I enter the "java" command: "Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'" I have configured the PATH variable (Windows 2000) and "javac" works. I cannot, however, get my programs to run beca
-
Posting photo album and slideshows.
Hi I am having issues viewing my slideshow once my site is published. I have used Cute FTP to upload to my domain name. Anybody know why the slideshow isn't working? Any help would be great!!!
-
Do I understand this correctly: that if a linked Excel file is placed in InDesign and I style that content.. then update the original content, I can't hold the formatting I did in InDesign?!