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

Calling the custom badi from executable program

Hello Friends,

I have created a custom Badi definition ,interface, methods,class in the Enhancement Spot,

i need to call the custom badi in the executable program.

my problem is: while getting the instance of the interface by using

CALL METHOD cl_exithandler=>get_instance

here it goes to dump since there ie no entry in the table sxs_attr what can i do for that.

Thanks in advance.

Arun.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2008 at 06:09 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi ,

      Actually the problem is if we create a classic BADI the SXS_ATTR will contain the BADI name

      and so cl_exit_handler might have created the instance.

      But since i have went with new BADI i.e creating enhancement spot we should not use the cl_exit_handler insted we have to use get badi and call badi, as said by soumya.

      Thanks and Regards.

      Arun.

  • Posted on Aug 04, 2008 at 08:38 AM

    Hi Arun,

    The BADIs created in enhancement spot cannot be called through call method cl_exithandler. It needs to be called using GET BADI and CALL BADI.

    You have to use like below:

    data: handle type ref to (ur badi name).

    GET BADI handle.

    CALL BADI handle->(the method of ur badi)

    EXPORTING.....

    Hope it helps.

    Regards,

    Soumya.

    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.