05-24-2011 11:24 AM
Hiee..
While creating sales order in va01,i am getting the error "express document update terminated....".
After exectuing transaction st22,
Name of runtime error: DBIF_RSQL_SQL_ERROR
Exception:CX_SY_OPEN_SQL_DB
iN SM13,
Error in functional module rv_sales_document_add
In the include LV45UF0V,
181. UPDATE VBAP FROM TABLE DA_XVBAPU.
Throwing an error Database error text........: "ORA-00947: not enough values".
Checked for ranges and disk space bt there is no problem with either of them.
Can you plzz tell me the solution for the same.
Thanks in advance.
05-24-2011 11:55 AM
Hi
This error is due to some of the values passed in creation of sales order.
You can check any code irrelevant in 'FORM SAVE_DOCUMENT' with sales order data.
The problem can even be due to number range at config. Check throughly the data passed while creating SO, which may be conflict.
Hope this will be helpful.
05-25-2011 4:55 AM
I did check for ranges and there is no problem in ranges..
I degugged the FORM USEREXIT_SAVE_DOCUMENT and didnt find any error in that. Infact the structure defined is getting updated for the given set of values.
The main problem according to me is the table is not getting updated for the given set of data.
Can you give me a solution for the same..
Thanks in advance.
05-25-2011 5:06 AM
As Rob mentioned, have you checked the error description/reason for error by searching in google ?
Regards, Vinod
05-25-2011 5:08 AM
HI Neha,
Using this exit which table you are updating.
Regards,
Madhu.
05-25-2011 7:18 AM
yes rob i have googled and have got this:
ORA-00947: Occur when the input values are not equal to the column of the table in which we are trying to enter the values
05-25-2011 7:19 AM
05-25-2011 7:42 AM
05-25-2011 10:37 AM
hi madhu,
code for updating:
DATA:
BEGIN OF DA_XVBAPI OCCURS 10,
STRU LIKE VBAP,
END OF DA_XVBAPI.
DATA:
BEGIN OF DA_XVBAPU OCCURS 5,
STRU LIKE VBAP,
END OF DA_XVBAPU.
DATA: VBAP_KEY(19) TYPE N.
DATA: DA_FLAG_APODELTA.
CONSTANTS: C_CAVE_APODELTA_APPEND LIKE RS38L-NAME
VALUE 'CAVE_APODELTA_APPEND'.
CONSTANTS: C_CAVE_APODELTA_INSERT LIKE RS38L-NAME
VALUE 'CAVE_APODELTA_INSERT'.
IF VORGANG = 'V'.
Sätze löschen
LOOP AT FYVBAP.
VBAPVB = FYVBAP.
IF VBAPVB-UPDKZ = UPDKZ_DELETE.
DELETE FROM VBLB WHERE VBELN = VBAPVB-VBELN
AND POSNR = VBAPVB-POSNR
AND ABRLI <> '0000'.
DA_XVBAPU = FYVBAP.
APPEND DA_XVBAPU.
DELETE FROM VBEH WHERE VBELN = VBAPVB-VBELN
AND POSNR = VBAPVB-POSNR.
IF NOT VBAPVB-OBJNR IS INITIAL.
Objektnummer löschen
CALL FUNCTION 'OBJECT_NUMBER_DELETE' wird jetzt in Form
EXPORTING CO_OBJEKT_ANLEGEN
OBJNR = VBAPVB-OBJNR. bei Bedarf gelöscht
Statusobjekt löschen
CALL FUNCTION 'STATUS_DELETE'
EXPORTING
CLIENT = SY-MANDT
OBJNR = VBAPVB-OBJNR.
ENDIF.
ENDIF.
ENDLOOP.
DELETE VBAP FROM TABLE DA_XVBAPU.
IF SY-SUBRC > 0.
MESSAGE A102 WITH 'VBAP' SY-SUBRC DA_XVBAPU-STRU-VBELN.
ENDIF.
REFRESH DA_XVBAPU.
ENDIF.
Sätze anlegen oder ändern
LOOP AT FXVBAP.
ENHANCEMENT-POINT VBAP_BEARBEITEN_10 SPOTS ES_SAPLV45U.
$$-Start: VBAP_BEARBEITEN_10----
-
$$
ENHANCEMENT 8 OI0_COMMON_SAPLV45U. "active version
if VBAK-VBTYP = 'C'. "call only if necessary SP2 KH
PERFORM OID_ADD_SHIP-TO USING VORGANG. "SO3K113536 AWH
endif. "better readabl + performance SP2 KH
ENDENHANCEMENT.
$$-End: VBAP_BEARBEITEN_10----
-
$$
VBAPVB = FXVBAP.
CASE VBAPVB-UPDKZ.
WHEN UPDKZ_NEW.
FXVBAP-MANDT = VBAK-MANDT.
FXVBAP-VBELN = VBAK-VBELN.
IF NOT FXVBAP-POSNV IS INITIAL AND
FXVBAP-VBELV IS INITIAL.
FXVBAP-VBELV = VBAK-VBELN.
ENDIF.
DA_XVBAPI = FXVBAP.
APPEND DA_XVBAPI.
Ist das SOURCING und die APO-Verfügbarkeitsprüfung durchgeführt worden
und liegt eine Strecke vor?
IF FXVBAP-SRCPS EQ SRCPS_SUBITEM
AND NOT FXVBAP-POSGUID IS INITIAL
AND FXVBAP-VWPOS EQ 'APO3'.
CALL FUNCTION C_CAVE_APODELTA_APPEND
EXPORTING
IV_DOC_NUMBER = FXVBAP-VBELN
IV_ITM_NUMBER = FXVBAP-POSNR
IV_POSGUID = FXVBAP-POSGUID
IV_WERKS_E = FXVBAP-WERKS_EXT.
DA_FLAG_APODELTA = CHARX.
ENDIF.
WHEN UPDKZ_UPDATE.
Statusobjekt muß geändert werden, wenn sich der Positionstyp
ändert
MOVE SY-MANDT TO VBAP_KEY.
MOVE FXVBAP-VBELN TO VBAP_KEY+3(10).
MOVE FXVBAP-POSNR TO VBAP_KEY+13(6).
READ TABLE FYVBAP WITH KEY VBAP_KEY.
IF SY-SUBRC = 0.
IF FXVBAP-PSTYV NE FYVBAP-PSTYV OR "Änderung Positionstyp
FXVBAP-KZVBR NE FYVBAP-KZVBR. "Änderung in Einzelfert.
READ TABLE FYVBAP INDEX SY-TABIX.
IF NOT FYVBAP-OBJNR IS INITIAL.
Objektnummer löschen
CALL FUNCTION 'OBJECT_NUMBER_DELETE' wird jetzt in Form
EXPORTING CO_OBJEKT_ANLEGEN
OBJNR = FYVBAP-OBJNR. bei Bedarf gelöscht
Statusobjekt löschen
CALL FUNCTION 'STATUS_DELETE'
EXPORTING
CLIENT = SY-MANDT
OBJNR = FYVBAP-OBJNR.
ENDIF.
ENDIF.
ENDIF.
DA_XVBAPU = FXVBAP.
APPEND DA_XVBAPU.
ENDCASE.
ENDLOOP.
UPDATE VBAP FROM TABLE DA_XVBAPU.
IF SY-SUBRC > 0.
MESSAGE A101 WITH 'VBAP' SY-SUBRC DA_XVBAPU-STRU-VBELN.
ENDIF.
INSERT VBAP FROM TABLE DA_XVBAPI.
IF SY-SUBRC > 0.
MESSAGE A100 WITH 'VBAP' SY-SUBRC DA_XVBAPI-STRU-VBELN.
ENDIF.
Tabelle APODELTA füllen
IF DA_FLAG_APODELTA = CHARX.
CALL FUNCTION C_CAVE_APODELTA_INSERT
EXCEPTIONS
NO_INSERT = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE A100 WITH 'APODELTA' SY-SUBRC DA_XVBAPI-STRU-VBELN.
ENDIF.
ENDIF.
ENDFORM.
05-25-2011 2:00 PM
DA_XVBAPU does not have the same structure as VBAP. Press F1 on UPDATE.
Rob
05-24-2011 2:46 PM