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: 

Calling the custom badi from executable program

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

0 Kudos

Thanks for your reply.

hi i went through the slides ,

but my proble is that while using cl_exit_handler its not generating instance .

i need how to make entry in the table SXS_ATTR.

Thanks,

Arun.

0 Kudos

Hi,

Even I have a similar problem when it throws a dump while trying to create an instance of the BADI implementation. The problem is that SXS_ATTR does not contain any entry with the name of the BADI I have created.

Can anybody help please?

0 Kudos

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.

soumya_jose3
Active Contributor
0 Kudos

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.