Application Development 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: 

error:update termination in va01

Former Member
0 Kudos

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.

10 REPLIES 10

former_member361845
Participant
0 Kudos

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.

0 Kudos

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.

0 Kudos

As Rob mentioned, have you checked the error description/reason for error by searching in google ?

Regards, Vinod

0 Kudos

HI Neha,

Using this exit which table you are updating.

Regards,

Madhu.

0 Kudos

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

0 Kudos

I ma updating the table vbap.

0 Kudos

HI Neha,

Post the code how you are updating.

Regards,

Madhu.

0 Kudos

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.

0 Kudos

DA_XVBAPU does not have the same structure as VBAP. Press F1 on UPDATE.

Rob

Former Member
0 Kudos

Have you Googled ORA-00947?

Rob