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: 

NULL_INSTANCE_ACCEPTED parameter

Yamuna_Mathew
Employee
Employee
0 Kudos

Hi,

Can anyone tell me the importance of NULL_INSTANCE_ACCEPTED paramter in the method

cl_exithandler=>get_instance?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If NULL_INSTANCE_ACCEPTED is set to 'X' then system will not try to create an instance for the BADI Class (CL_EX_<BADI Name) if there are no Active Implementations (based on filter if applicable) or Default implementation.

A comment inside the method says it is for performance reasons..

Hope this helps..

Sri

4 REPLIES 4

Former Member
0 Kudos

Hi,

If NULL_INSTANCE_ACCEPTED is set to 'X' then system will not try to create an instance for the BADI Class (CL_EX_<BADI Name) if there are no Active Implementations (based on filter if applicable) or Default implementation.

A comment inside the method says it is for performance reasons..

Hope this helps..

Sri

Yamuna_Mathew
Employee
Employee
0 Kudos

Hi sri,

So if that parameter is not set as 'X', what will happen if there are no active or default implementations?

0 Kudos

Hi Yamuna,

System will still create instance for the BADI class,

CL_EX_<BADI Name> and then in the code as we always check whether instance is initial or not and call the methods, it will unnecessarily call badi methods as the instance will not be empty.

If the parameter is set to 'X' then instance will not be created and will come back empty. So the IF condition we normally have after the get_instance method call for "IF NOT instance IS INITIAL." will make sure that the methods are not called unnecessarily..

Hope this helps..

Please close the post and award points if this answers your question..

Sri

Message was edited by: Srikanth Pinnamaneni

Yamuna_Mathew
Employee
Employee
0 Kudos

Hi Sri,

Thanks for the clarification