Skip to Content
author's profile photo Former Member
Former Member

function module

hi...

What are the exceptions for function module???????

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2007 at 05:34 AM

    Hi Pavan,

    Exceptions are used for Error handling.

    When some unexpected things happen then exceptions are raised.

    In some particualr operations some unusual conditions are met then exceptions are raised.

    Hope its helpful.

    Regards,

    Nikhil Moghe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2007 at 05:36 AM

    Hi Pavan,

    EXCEPTION is nothing but to catch error occured in FM.

    like,

    Call Function .....

    importing ..

    exporting ...

    tables ....

    EXCEPTIONS

    FILE_WRITE_ERROR = 1.

    And then check sy-subrc.

    Reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2007 at 05:37 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Exceptions in function modules or classes denote those situations where the function module or class has failed to perform the task for which it is intended.In such cases we fill the exception tab in function or class with all possible exception cases that can be anticipated.

      These exceptions can be caught in the program by using the system variable sy-

      subrc.
      if sy-subrc eq 0.
      *success.
      else.
      *exception.
      endif.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 29, 2007 at 05:40 AM

    Hi,

    When the function module is being excecuted if an unexpected error happens an error is raised..

    this happens by the sy-subrc system variable value becoming non-0.

    the value of the variable will determine which exception error has taken place..

    you can now take a corrective action based on the value of sy-subrc. say display an error message that there was such n such eror//

    to see the exception raised corresponding to the sy-subrc non-0 value goto se37 type function module name and see the exceptions tab

    Regards,

    Aparna

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.