cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Enable Lead-selection between Parent and Child entites in SAP MDG-MM

xavier_abap
Explorer
0 Kudos
1,471

Hi Experts,

As per one of our business requirements, we have created two Custom entities under SAP MDG-MM data model. YBUPA01 for which the leading entity is MATERIAL, and another custom entity (YYPARTNER) which is a child of the custom entity YBUPA01,and both of these entities are list UIBB sections in the UI.

I have followed the below SAP How-to document for this requirement:

https://www.sap.com/documents/2015/07/aa24484d-5b7c-0010-82c7-eda71af511fa.html

Please find the below screen shots below for visualization of the Data model and the MDG UI.

As per the Data model design, Business partners section represents the entity YBUPA01, and BP systems represents the entity YYPARTNER.

As per the SAP How-to document, the Feeder class that I used for both List UIBB sections is CL_MDG_BS_MAT_FEEDER_LIST

The source config for the second section i.e BP system is ZMDG_YBUPA01 and Connector class is /PLMU/CL_FRW_W_CONN_DEFAULT, and refer the below screen shot for wiring, and also the the selection mode property s enabled for the parent UIBB.

Issue: on Change of lead selection in the Parent section(Business Partners), the corresponding entries were not getting pulled in the child entity section(BP systems). By default, the child entity section loads all the entries from the staging table of the entity YYPARTNER. The lead selection change in the parent UIBB has no impact on the child entity section.

Please help me to fix the issue, the child entity should only pull the records relevant to the record selected in the parent section.

Thanks,

Xavier

Accepted Solutions (0)

Answers (5)

Answers (5)

xavier_abap
Explorer
0 Kudos

Was able to resolve the issue by implementing the BADI related to SPI model

ptanvisap
Explorer
0 Kudos
Hello, Could you please tell me which BADI did you have to implement to solve this issue? I am facing similar issue for BP Data model.
xavier_abap
Explorer
0 Kudos

Yes Nilesh, Custom entity is available in filter criteria.

We have raised a ticket to SAP, and will be following up with SAP. I will keep you posted here once I get a response from SAP.

Thanks,

Xavier.P

xavier_abap
Explorer
0 Kudos

Hi Nilesh,

Based on the lead selection I would like to clear the existing records in the child entity, and repopulate the child entity based on the lead selection, but I observed today that the derivation BADI is not triggering for the lead selection. I am guessing SAP may have already addressed the lead selection through connector classes (or) some config.

Not sure, if the feeder class coding is the right approach to populate entities.

Thanks,

Xavier.P

Nilesh_Bundele
Participant
0 Kudos

Hi Xavier,

Not sure till now you got solution but did you check the filter of derivation BADI. Have you included your custom entities in it. Feeder class would be the last option in case other things do not work.

Thanks,

Nilesh

Nilesh_Bundele
Participant
0 Kudos

Hi Xavier,

Can you please elaborate why you need to clear the entity records? Based on selected record from parent entity, can't we read the specific/related record for child entity in READ method?. Can you debug the READ method once while loading the overview page or wherever these UIBBs are shown & see how all child records are getting displayed, can't we restrict them from READ method itself? Still if you need to clear some entity records please check if CLEAR_ENTITY_BUFFER or CLEAR_OBJECT_LIST_BUFFER methods of CL_USMD_GOV_API can be utilized here.

Thanks,

Nilesh

Nilesh_Bundele
Participant
0 Kudos

Hi Xavier,

Document which you have followed is for extension of supplier using flex option in BP data model. Can you please tell me while creating custom entities which mode(reuse/flex) have you used?.

As per my understanding in case of FLEX mode, by default all the active records(active flag = true(1)) from MDG table will be loaded in 'BP Systems' UIBB. Instead if you use REUSE mode, you will have the option to load records from actual database table(custom table for custom entity-BP Systems) by using Extension API BADI- READ method. I think in this method you can write your custom code to display entry based on parent selection from UIBB 'Business Partners'.

I would suggest you to follow below standard document.

https://www.sap.com/documents/2015/07/aa24484d-5b7c-0010-82c7-eda71af511fa.html

Please reward if useful.

Thanks,

Nilesh

xavier_abap
Explorer
0 Kudos

thanks Nikesh for your message.

I have wrongly pasted the link, and I was referring the link that you shared only.yes we can read the data using READ method,but is there any API method to clear/invalidate the entity, instead of DELETE?


thanks,

Xavier