cancel
Showing results for 
Search instead for 
Did you mean: 

BADI not triggering

Former Member
0 Kudos

Hi All,

I have extended the MDGM data model (version 6.1) by two new entity types (Reuse Option) but the BADI is not  getting triggered even if I put a breakpoint in the BADI( MDG_BS_MAT_API_SEGMENTS_EXT). As far as the UI layer goes, I have copied the standard out of the box UIBB to a Z UIBB and incorporated the two new entity types. Here I am not enhancing instead just adding the newly created UIBB's (Z tables) to the copied UIBB's.

I see the values correctly populated to the internal structures while I debugging. Any idea why BADI is not triggering and why the data is not passed onto the Z tables?

Appreciate any help on this.

Ramesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

When I debug the above said BADI, I see the parameter IV_TEST_MODE = 'X' and it is read only. I am not able to set the parameter IV_TEST_MODE = ' '. Please also let me know what I should code with in CHECK_SAVE method so it updates the Z tables in the backend.

Any help will be highly appreciated.

Thanks.

Regards,

Ramesh

former_member196830
Active Participant
0 Kudos

Are you using this guide?: http://scn.sap.com/docs/DOC-29042

Or are you extending with a new entity type?: http://scn.sap.com/docs/DOC-27859

Those guides will help you in case you're in trouble.

Best regards,

Boris

Former Member
0 Kudos

Hi Boris,

I have been following the above guides and now I am able to set a breakpoint and it does stop in BADI. I have some more questions and have posted an other discussion. Here is the link

http://scn.sap.com/thread/3440895

Thanks.

Best Regards,

Ramesh

Former Member
0 Kudos

Hi Ramesh, what have you done in order to trigger the BAdI? I am not able to trigger it, I have set the filter and so on! I am able to trigger the READ method, but not the CHECK_AND_SAVE method.

Thanks a lot!

Best regards,

Thomas

former_member196830
Active Participant
0 Kudos

Hi Thomas,

It's simple... If you're trying to go to the Save and Check methods in Debug mode, you can't get there, because they are executed by the WF-BATCH user on the background. The Read method is executed with your credentials.

If you want to debug the Save method or the BADI for example, you'll have to make an infinite loop in the code. That would ensure the process stays active. You can go to transaction SM50 after that and find your process running. Click in the main menu to Administration -> Program -> Debugging. This would take you to the infinite loop that your code is executing in debug mode.

Once in debug mode, you can use Go to statement to get out of the loop and continue the execution of your code.

Hope that helps

Boris

Former Member
0 Kudos

Hi All,

Update. I am able to stop the BADI but wondering the coding part of it.

Thanks.

Regards,

Ramesh

former_member196830
Active Participant
0 Kudos

Hi Ramesh,

For the BADI you would possibly need to make your own implementation of it. Then you can setup a break point and see the values in debug mode. Depending on how familiar with ABAP and BADIs you are. Also, some of the BADIs are disabled in the MDG configuration and you may have to enable them there first.

Best regards,

Boris

benjamin_allsopp
Active Participant
0 Kudos

I know this is a really old thread but how were you able to stop the BADI? My BADI is not being called. What filter value should I use?