‎2005 Oct 20 11:43 AM
Hi,
Can anyone tell me the importance of NULL_INSTANCE_ACCEPTED paramter in the method
cl_exithandler=>get_instance?
‎2005 Oct 20 12:15 PM
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
‎2005 Oct 20 12:15 PM
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
‎2005 Oct 25 10:07 AM
Hi sri,
So if that parameter is not set as 'X', what will happen if there are no active or default implementations?
‎2005 Oct 25 10:18 AM
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
‎2005 Oct 25 11:42 AM