Skip to Content
avatar image
Former Member

Background job

when i executed a job in background got the error message as "ABAP/4 processor: BCD_ZERODIVIDE".This error is occured for only one of the given selection criteria,for other cases its getting executed.How to correct it.?What ar the reasons for it?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 29, 2008 at 07:02 AM

    Hi,

    Given your selection criteria, at some point you should be getting a situation where some value is divided by zero.

    Try debugging it online if possible.

    The value which is becoming 0 for division, put a catchable exception there.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 06:45 AM

    Hi,

    Your dividing component is zero. because of that BCD_ZERODIVIDE error is occured. make sure your dividing component is not sure.

    Please refer this link.....

    http://help.sap.com/saphelp_nw04/Helpdata/EN/cf/f2bbce142c11d3b93a0000e8353423/content.htm

    Hope it will helps

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 06:50 AM

    Hi

    When ever your dividing, pls make sure the dividing component is not zero.

    When you try to divide by zero, you will get the error.

    Pls change the program accordingly

    Regads

    MD

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 07:15 AM

    Hi Hema,

    1) check the steps in your job using sm37

    2) one of your step may be throwing this error which has come across the statement dividing by zero for your specified selection criteria.

    3) debug that step i.e program which is added as a step by specifying your selection criteria

    3) modify the program by adding try and catch blocks to handle run time exceptions.

    Please refer to the link below which explains you how to handle run time exceptions

    http://help.sap.com/saphelp_nw70/helpdata/en/cf/f2bbce142c11d3b93a0000e8353423/content.htm

    Thanks,

    Naveen Kumar.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 08:35 AM

    Hi,

    Example Program....

    REPORT demo_catch_endcatch.
    
    DATA: result TYPE p DECIMALS 3,
          number TYPE i VALUE 11.
    
    CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 5.
      DO.
        number = number - 1.
        result = 1 / number.
        WRITE: / number, result.
      ENDDO.
    ENDCATCH.
    
    SKIP.
    
    IF sy-subrc = 5.
      WRITE / 'Division by zero!'.
    ENDIF.
    
    

    The program calculates the quotients tens time from 1 and number until the runtime error BCD_ZERODIVIDE occurs. This belongs to the exception group ARITHMETIC_ERRORS, and is caught in the example using this class.

    Hope it will helps

    Add comment
    10|10000 characters needed characters exceeded