cancel
Showing results for 
Search instead for 
Did you mean: 

MDG_BS_MAT_API_SEGMENTS_EXT not triggering

benjamin_allsopp
Active Participant
0 Kudos

Hi All,

I have extended the MDGM data model (version 7) by a new entity type (Reuse Option) but the BADI is not  getting triggered (BAdI: Extension of the API with Customer-Specific Segments - MDG_BS_MAT_API_SEGMENTS_EXT).

I followed the http://scn.sap.com/docs/DOC-27859 guide in order to try to achieve this.

The data is stored in the staging table....but then never gets moved to my new database table when it is deleted from the staging table at approval. As a breakpoint will not work in the check and save method because it's a WF-BATCH job...I put a breakpoint in the read method and it never stopped so I'm assuming the whole BADI is not getting called.

I'm thinking that maybe my filter is wrong!?

What does MAT_API_SEGMENT_EXT_FILTER refer to?

Or is there any other reason the BADI would not be getting called?

Appreciate any help on this.

Ben

Accepted Solutions (0)

Answers (2)

Answers (2)

bavinash1
Explorer
0 Kudos

Hello Benjamin,

We could get to know that only by debugging.

As Ingo has already suggested, the only way to debug something which is getting triggered as a part of activation step is to go via BUS2250 and execute ACTIVATE_2 method.

Activation is set as background process for the standard delivered workflow in BRF+ decision tables.

BR,

Avinash

d024348
Employee
Employee
0 Kudos

Hi, some comments:

* CHECK is also called when you press the check (or submit/...) button in the UI

* You can also trigger the activation by loading the BUS2250 into transaction SWO1, instantiate with the CR number and execute methode ACTIVATE_2 - basically the same happens during activation

* You could put a break-point into the places in CL_MDG_BS_MAT_API where the BAdI is called and check whether maybe the filter values are not correct

Regards, Ingo Bruß

benjamin_allsopp
Active Participant
0 Kudos

I've started debugging CL_MDG_BS_MAT_API and have found that the importedparameter IT_MAT_SEGMENTS_EXT is empty. This is the reason it's not calling my BADI.

Why would IT_MAT_SEGMENTS_EXT not have any values? Is there something I've missed?

The document might not be entirely helpful as we're running MDG 7 and not 6. But there isn't an updated document so I'm stuck for clues!

d024348
Employee
Employee
0 Kudos

Well, many reasons for an empty IT_MAT_SEGMENTS_EXT: Some error in

  • SMT mapping of your extension entities
  • Registration of the entity's SMT mapping in IMG activity "Generate Data Model-Specific Structures"
  • I think (but am not sure) that an incorrect append to structure MDG_BS_MAT_S_MAT_DATA might also result in sonething like this
  • ...

The guide wasn't updated because there was no change to the process.


Did you already implement the guide 1:1 in a sandbox system (same example)?

Was there any issue?