cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging MPC Extenstion Class in GateWay Service Project

sathis21
Discoverer
0 Kudos

Hi,

Am trying to debug the MPC Extension class of the GW Project but the controls are not stopping. I tried with external Break points and Hard coded break points as well.

When i keep the break point in DPC_EXT it is working. but not for MPC Extension.

Can we able to Debug MPC Extension ? is it possible ?

Accepted Solutions (0)

Answers (6)

Answers (6)

ThorstenHoefer
Active Contributor
0 Kudos

Hi,

The metadata cache can be deleted with Transaction /IWBEP/CACHE_CLEANUP or /IWFND/CACHE_CLEANUP.

The ...MPC_EXT Class should redefine the method define from the base class ..._MPC.

Set an external breakpoint here and try to retrieve the matadata.

goncalvesp
Explorer
0 Kudos

Since some of the answers are not technically correct, because they suggest regenerating the SEGW project (which cannot be done for SAP standard projects), here's an actual answer that works without SEGW:

  • Open the MPC_EXT class you wish to trigger, select "Utilities" from the menu at the top and then select "Regenerate sections" (this may require a repair task);
  • After that is done, activate the MPC_EXT class;
  • If you wish to debug, set up a debug point in whatever method you need (in my case, I needed to debug the DEFINE method);
  • Call your service's metadata via an external browser or force a reload via /IWFND/MAINT_SERVICE.
Note:
  • changes on a given SAP standard object almost always means no support from SAP in the future;
  • all these steps appear to be needed every time you want to trigger a fresh debug, so use each debug window wisely 🙂
Andy1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Great, thanks.

RaminS
Participant
0 Kudos

Is there a solution to this problem? I also cannot get my breakpoint to work in MPC_EXT Define( ) method.

I need to add an annotation in DEFINE method to change a date format in my List Report. But Define method doesn't get triggered. (I can't put the annotation in cds view because I don't have access to backend).

Any ideas?

Thanks

goncalvesp
Explorer
0 Kudos

You probably don't need it anymore, but if you do please check my answer below.

Andy1
Product and Topic Expert
Product and Topic Expert
0 Kudos

It sounds the buffer issue, closed all the abap session, then try above the debugging is triggered.

Andy1
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mahesh,

Thank you for your detail information, I set external breakpoint in the method define of MPC_EXT class, and tried below according to your suggestion, but breakpoint is still not triggered.

1: regenerate the segw project, breakpoint is not triggered.

2: add the service in /n/iwfnd/maint_service, breakpoint is still not triggered.

3: after service register in /n/iwfnd/maint_service, try to click the load metadata button, breakpoint still not triggered.

Did I miss something or my method are not the right way to trigger the debugging? Any input will be very appreciated, thank you!

maheshpalavalli
Active Contributor
0 Kudos

Dpc_ext class will be called everytime you send a request to the odata service..

Mpc_ext doesn't provide the data it just provides metadata and we know for a fact that metadata will be fetched only once when u instantiate the odata service from ui5 or everytime you send the query option $metadata

But again here also the break point will not trigger.. the reason is metadata will be cached and so everytimw u request for it, it will fetch from cache..

So how to trigger the break point now..?

1. You can regenerate the odata service.

2. Else in /n/iwfnd/maint_service tcode, refresh metadata for that odata service.

BR

Mahesh