DBIF_RSQL_SQL_ERROR

Question:
Hi
I have a report ,that is updating table( s695 BOP PLANNING STATUS )
This giving me runtime error DBIF_RSQL_SQL_ERROR and giving short dump. To avoid this can I use CATCH and endcatch or anything else.
If I use CATCH what is error class.This is not coming all the time ,it is occuring only few times .
This message also givnen n short dump
------------------------
How to correct the error
------------------------
Database error text........: "INF-1226: Decimal or money value exceeds maximum precision."
Giving sql code for the reference
LOOP AT RESULT.
005010 SELECT SINGLE * FROM S695 WHERE SSOUR = GC_SSOUR
005020 AND VRSIO = S_VRSIO
005030 AND SPMON = RESULT-MONAT
005040 AND SPTAG = GC_SPTAG
005050 AND SPWOC = GC_SPWOC
005060 AND SPBUP = GC_SPBUP
005070 AND KLART = GC_KLART
005080 AND WERKS = H_WERKS
005090 AND MATNR = H_MATNR
005100 AND ATINN = H_ATINN
005110 AND ATWRT = H_ATWRT.
005120 IF SY-SUBRC EQ 0.
005130 MOVE: RESULT-CVAUTO TO S695-ZZPCTAUTO,
005140 RESULT-ZROFLAG TO S695-ZZZROAUTO.
-----> UPDATE S695.
005160 ELSE. PERFORM FILL_TAB. MODIFY S695. ENDIF.
005170 ENDLOOP.
Answer:
Hi,
...
Database error text:
"INF-1226: Decimal or money value exceeds maximum precision."
...
This error states, that one or more fields with the UPDATE command are not type compatible, or are not of the same length (numbers only), or contain values that cause an overflow of the datatype.
You'll need to chach that.
Further would i program your detail somewhat different.
  LOOP AT RESULT.
*   Use select if you do not provide the full
*   primary key values and use EXIT to leave the loop
    SELECT *
      FROM S695
     WHERE SSOUR = GC_SSOUR
       AND VRSIO = S_VRSIO
       AND SPMON = RESULT-MONAT
       AND SPTAG = GC_SPTAG
       AND SPWOC = GC_SPWOC
       AND SPBUP = GC_SPBUP
       AND KLART = GC_KLART
       AND WERKS = H_WERKS
       AND MATNR = H_MATNR
       AND ATINN = H_ATINN
       AND ATWRT = H_ATWRT.
*     Record modification
*     Make sure that the fields have matching types
*     Make sure that the field sizes are correct
      S695-ZZPCTAUTO = RESULT-CVAUTO.
      S695-ZZZROAUTO = RESULT-ZROFLAG.
      MODIFY S695.
      IF SY-SUBRC NE 0.
*       Error handling comes here
      ENDIF.
*     Leave (only one to be processed)
      EXIT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      CLEAR: SY-SUBRC.
      PERFORM FILL_TAB.
      MODIFY S695.
*     Result
      IF SY-SUBRC NE 0.
*       Error handling comes here
      ENDIF.
    ENDIF.
  ENDLOOP.
Regards,
mrJ.
Answer:
No need to catch the error.
Instead, change the definition of your ZZ* fields.

More Articles:

F4 help?
SAP Inbox managing?
Reports-selection sereer?
Counting in a structure?
Sales User Exit?
Condition Texts?