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: 

FM QPBU_LOT_INSERT is not seeing MY implementation of the SAP BADI

Former Member
0 Kudos

In function group

QPBU

there is a function module

QPBU_LOT_INSERT

with the following code:

*****************************************************************************

  • BAdI

  • Factory method for BAdI inspectionlot_update

if g_exit_il_up is initial.

call method cl_exithandler=>get_instance

exporting

exit_name = 'INSPECTIONLOT_UPDATE'

changing

instance = g_exit_il_up.

endif.

call method g_exit_il_up->create_in_update

exporting insplot = qals_new.

ENDFUNCTION.

So in SE19 I created and activated an implemntation of the interface IF_EX_INSPECTIONLOT_UPDATE and the name of my implementing class is:

ZCL_IM_MSEGQALS

Then I watch this code fire inside the FM QPBU_LOT_INSERT in the (update) debugger:

**********************************************************

call method cl_exithandler=>get_instance

exporting

exit_name = 'INSPECTIONLOT_UPDATE'

changing

instance = g_exit_il_up.

endif.

************************************************************

and it correctly fires this code inside cl_exithandler=>get_instance:

**************************************************************************

CALL METHOD cl_exithandler=>get_class_name_by_inter

EXPORTING

instance = instance

IMPORTING

class_name = class_name

CHANGING

exit_name = exit_name

EXCEPTIONS

no_reference = 1

no_interface_reference = 2

no_exit_interface = 3

data_incons_in_exit_managem = 4

class_not_implement_interface = 5

OTHERS = 6.

CASE sy-subrc.

WHEN 1.

RAISE no_reference.

WHEN 2.

RAISE no_interface_reference.

WHEN 3.

RAISE no_exit_interface.

WHEN 4.

RAISE data_incons_in_exit_managem.

WHEN 5.

RAISE class_not_implement_interface.

ENDCASE.

******************************************************

But this method is returning the class_name:

CL_EX_INSPECTIONLOT_UPDATE

instead of MY implementing class:

ZCL_IM_MSEGQALS.

So I'm clearly doing something stupid because I'm not understanding something I've neglected to do.

Please tell me what it is.

Thanks very much

djh

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

David,

This BAdI is mutiple-use , so invariably all the active impelmentations (will) have to be triggered, albeit in an arbitrary sequence.. put a hard break-point in your implementation & execute the Trx..

~Suresh

5 REPLIES 5

suresh_datti
Active Contributor
0 Kudos

David,

This BAdI is mutiple-use , so invariably all the active impelmentations (will) have to be triggered, albeit in an arbitrary sequence.. put a hard break-point in your implementation & execute the Trx..

~Suresh

0 Kudos

Suresh - thanks for the tip - but I have a question before I try it.

To see the "top" FM fire (QPBU_LOT_INSERT) I have to be in an "F8" update debugging session on MIGO, not a regular debugging session (Naren already clued me into this last week or the week before.)

If I put a hard break point in my method, will the flow stop there even in an update debugging session ?

Please be assured I will return to award points as soon as we get this resolved satisfactorily.

And thanks very much for your prompt response.

djh

0 Kudos

If during execution that break point falls in the step, execution will stop there.

Regards,

Amit

0 Kudos

David,

I am not familiar with the MIGO stuff.. so, I can't anwser your follow-up question..my repsonse was purely out of my experience with the multiple-use BAdIs.. & don't worry about the points ( I am with you on this aspect..)..

hope your issue gets resolved with(/out) the help from others here...

~Suresh

former_member181923
Active Participant
0 Kudos

Suresh/Amit -

Yes! I do see the hard breakpoint in my method. (But only when the update debugger is turned on and I've started an "F8" session ...)

Thanks very much to both of you for helping me past this. I'm glad it turned out to be a "non-problem" - I thought I had done something wrong in my implemenation of the BAdI.

Regards

dj