05-13-2008 5:12 PM
Few doubts on BADIs
take an example of BADI call
call method cl_exithandler=>get_instance
EXPORTING exit_name = 'MB_MIGO_BADI'
null_instance_accepted = x
changing
instance = if_badi.
Q1) What happens when exit_name is intial ??
Q2) In case of a single use BADI a class is already defined which implements the interface of that BADI .
Now if supposing there are 2 implementations then only one should be active at a time but system is allowing to activate many at a time with a message .
and another this in single use badi two implementations are getting called one is the default class which is created by the standard SAP and one is the user created implementation ,how come this is possible .
Q3) the call is like this
CALL METHOD cl_exithandler=>get_instance
CHANGING
instance = exit_trip_post_fi.
where is the "exporting exit name parameter" ?
Q4) if we have a BADI definition in a standard program and that BADI has say 15 methods but in the standard program calls only 5 methods out of those 15 ,then in a way it means that only 5 methods out of those 15 can be used in customer badi implementations ?? right ??
the question is that there maybe n implementations of a BADI in a prog but the method calls are fixed programmmed in the standard SAP program and we cant use any methods which are not written in the code ...????
Edited by: cool abaper on May 15, 2008 1:41 PM
05-15-2008 10:36 AM
Q1) What happens when exit_name is intial ??
internal exception return and no exporting value from the BADI
Q2) In case of a single use BADI a class is already defined which implements the interface of that BADI .
Now if supposing there are 2 implementations then only one should be active at a time but system is allowing to activate many at a time with a message .
and another this in single use badi two implementations are getting called one is the default class which is created by the standard SAP and one is the user created implementation ,how come this is possible .
In any case when there are multiple implementation for a single use BADI and when the trasaction is exectued for the BADI call the transaction will go for a dump at runtime.
Q3) the call is like this
CALL METHOD cl_exithandler=>get_instance
CHANGING
instance = exit_trip_post_fi.
where is the "exporting exit name parameter" ?
creates a reference (object) in this case
Q4) if we have a BADI definition in a standard program and that BADI has say 15 methods but in the standard program calls only 5 methods out of those 15 ,then in a way it means that only 5 methods out of those 15 can be used in customer badi implementations ?? right ??
the question is that there maybe n implementations of a BADI in a prog but the method calls are fixed programmmed in the standard SAP program and we cant use any methods which are not written in the code ...????
irrespective of the number of methods used by the std program u can use it for ur purpose any methods of that class. purely not dependant on the number of methods called of the std program
05-15-2008 12:26 PM
Q1) What happens when exit_name is intial ??
internal exception return and no exporting value from the BADI
no exception is raised here .
Q2) In case of a single use BADI a class is already defined which implements the interface of that BADI .
Now if supposing there are 2 implementations then only one should be active at a time but system is allowing to activate many at a time with a message .
and another this in single use badi two implementations are getting called one is the default class which is created by the standard SAP and one is the user created implementation ,how come this is possible .
In any case when there are multiple implementation for a single use BADI and when the trasaction is exectued for the BADI call the transaction will go for a dump at runtime.
NO ,the program does,nt go for a Dump..
Q3) the call is like this
CALL METHOD cl_exithandler=>get_instance
CHANGING
instance = exit_trip_post_fi.
where is the "exporting exit name parameter" ?
creates a reference (object) in this case
Q4) if we have a BADI definition in a standard program and that BADI has say 15 methods but in the standard program calls only 5 methods out of those 15 ,then in a way it means that only 5 methods out of those 15 can be used in customer badi implementations ?? right ??
the question is that there maybe n implementations of a BADI in a prog but the method calls are fixed programmmed in the standard SAP program and we cant use any methods which are not written in the code ...????
irrespective of the number of methods used by the std program u can use it for ur purpose any methods of that class. purely not dependant on the number of methods called of the std program
Nope again i think it DEPENDS on the methods that are coded in the program