cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot extend MDGC with custom field

former_member283411
Participant
0 Kudos

Hi Experts,

I am trying to extend MDGC 7  in my demo system with the help of this guide: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0375d58-2161-2f10-e285-c6078fcb8..., but I cannot find the required field in the UI configuration.

I've extended the KNVV table:

Extended the BP data model:

Activated it, then Generated Selected Structures

Then I did the SMT mapping steps where the options seemed to be a bit different than the ones in the document:

Then I adjusted staging area of linked change requests.

Then I displayed the page in customizing mode and selected a UIBB, clicked on "Add elements", but I cannot find the relevant field anywhere.

Could you pleae help me?

Many thanks in advance,

Tamas

Accepted Solutions (1)

Accepted Solutions (1)

former_member283411
Participant
0 Kudos

Hi Everyone,

many thanks Sudhir, Abdullah, Avinash, Peter and Sanjay for the answers. The solution we found is that

  1. we have incorrectly appended and hence couldn't properly activate the append in KNVV table, beacuse for database fields, custom namespace is not Z* or Y*, but ZZ* or YY*. That's why even the initial append was not correct.
  2. manually appended the mapping structures which didn't contain our field (we wanted, but couldn't select our fields from the drop-down during the mapping steps descrbed here: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0375d58-2161-2f10-e285-c6078fcb8.... I don't know if it was good or bad, but it works now.

All in all, what we did was the following:

  1. Apended KNVV with 2 new fields: mind the naming convection !! (ZVAT not correct ZZVAT is correct)
  2. Added the new fields to the BP_SALES entity type of BP data model (as attributes)
  3. Activated the data model
  4. Generated data model sprecific structures (here we only selected BP_SALES)
  5. Did the SMT mapping correction steps listed in the above document (both API and STA), but for that we have appended the relevant structures whereever we had a missing field
  6. Then 'ADjust staging area of linked Change Requests" in 'Edit data model' IMG option
  7. Then we opened the sales area data UI screen in customizing mode and added the new elements (fields). It works fine.


Thanks,

David and Tamas

Former Member
0 Kudos

Thanks for sharing the solution. It will help other tremendously. This is great.

Answers (8)

Answers (8)

former_member591879
Participant
0 Kudos

Hello Tamas and all,

thanks for your valuable summary and for the post in this thread regarding the experiences you made trying to extend MDG data model and MDG UI with a custom field. It helped us to overcome similar issues and progress with our similar requirement.

I would like to share the experiences we made: Our requirement is to add a custom fields to the MDG data model in entity BP_CENTRL and in the MDG UI to the UIBB Business Partner Details/General Data (BS_BP_Details_CU). The field including a corresponding check table already existed within an Append Structure to the BUT000 table. So, we needed to add this field to the MDG data model and MDG UI using the reuse option

For the configuration we used the following two How-To Guides: “SAP How-To Guide_ Extend MDG-S Data Model by a New Field (Reuse Option)” https://archive.sap.com/documents/docs/DOC-31885, mainly this guide but also the guide “SAP How to Guide Extend MDG-M data model by a new entity type erp table reuse option” https://archive.sap.com/documents/docs/DOC-47988 .

After adding the field to the MDG data model we activated the data model and then tried to generate selected data model specific structures for entity BP_CENTRL. Doing so we were prompted to enter a patch for a package. At this point of time from my point of view it would have been important to specify an existing custom package like e.g. Z_MDG. However we entered the corresponding standard package when prompted (/MDGBP/MDG_BS_BP_STRUCTURES). Doing so we experienced following generation error “TADIR entry for CI_MDG_S_BP_BP_CENTRL could not be created”, “Delivered structures in namespace /MDG* are not generated” (s. screenshot 1). Following the recommendations in this thread using SE11 as good as we could we manually activated corresponding customizing includes CI* in corresponding structures of BP_CENTRL: *PDF_BP_CENTRL, * PP_BP_CENTRL, * ES_BP_CENTRL, *FC_BP_CENTRL, *FP_BP_CENTRL, *KY_BP_CENTRL, *EX_BP_CENTRL. This thread is also recommending to add the corresponding customizing includes CI* to the structures in case they were missing because of the generation errors. We only activated the customizing includes and did not add them to the structures where they were missing because our impression was that they were existing in the most important structures. Most important structure for our requirement seemed to be PP_BP_CENTRL (Mapping of Reuse Active Area).

In parallel we received the recommendation that mentioned TADIR generation error can be resolved by specifying a custom package for customer include in the BP data model customizing (as described in the MM reuse fields extension guide on pages 23ff). In addition the custom package should be entered in the “package” column of generate selected structures. We did not want to add the package in the “package” column of generate selected structures because that was not mentioned anywhere in the MM guide. Instead we entered it in the data model customizing as the MM guide was suggesting. When trying to activate the BP data model afterwards we received a message saying that a custom Prefix/Namespace needs to be set as well in the same customizing (s. screenshot 2). We choose namespace /ZMDGBP/. Note: This custom namespace is not existing in the system. It would have been time consuming and difficult to request (key request and approval of end client needed) and also not needed to set it really up for this project. When we activated data model BP again with those two settings we received a high number of TADIR activation errors (s. screenshot 3). In addition we found that in generation of data model specific structures a high number of structures are now showing namespace “/ZMDGBP/” (s. screenshot 4, e.g. FC_BP_CENTRL). Afterwards generation of selected structures for BP_CENTRL terminated with an error regarding not existing namespace /ZMDGBP/. We researched and found that there are quite many MDG Community discussions of people which are also affected by those issues and even customer OSS messages. Some of those people have also did follow corresponding steps in the MM guide. Those people had not-existing Namespace namespace "/ZMM/" appearing in their generated structures afterwards. We have now opened a SAP OSS message and asked for a cleanup report since we are currently not able to activate our data model BP nor can we generate the BP_CENTRL specific structures. Furthermore we heared that the structures which got not-existing namespace /ZMDGBP/ assigned are unused structures. Anyone able to confirm this ? And what will happen if we will start using them and they remain in the custom namespace ? In parallel to the SAP OSS message we received the information we would need to “remove” the structures which now show not-existing prefix/namespace “ZMDGBP” from the “nodes” to be able to activate the MDG data model and selected BP_CENTRL structures again. Anyone able to tell what is meant by “removing the nodes from the structures” and where and how this can be done ?

Coming back to the requirement to add the custom field since we initially could add the field to the MDG BP data model and generate the selected BP_CENTRL structures even with errors and manual corrections, before things got worse with the namespace errors, we could do the SMT mapping for the field and we were also able to add the fields to the corresponding MDG UIBB. Key to have the field available for the SMT mapping and in the MDG UI customizing add elements drop down seems to be to make sure that the field is included in structures CI_EEW_BUT000 and CI_EEW_BUT000_X. In our particular case we did not need to include the field in the TCODE: genil_model_browser as some people in this thread were suggesting. It already appeared included there. After adding the field to the MDG UI we experienced the issue that selected values from the fields check table were disappearing. In our case this was caused by another field in structures CI_EEW_BUT000 and CI_EEW_BUT000_X having the same data element. We received the solution hint from the following own separate blog for discussing reasons for disappearing data in MDG custom fields https://blogs.sap.com/2013/11/07/mdg-some-reasons-why-data-disappears/

From my point of view there should be a troubleshooting chapter added to those two SAP How to guides mentioning all those issues and potential issues which the people in this thread were running into.

c-workscreenshot1.png

c-workscreenshot2.png

c-workscreenshot3.png

c-workscreenshot4.png

former_member283411
Participant
0 Kudos

Hi Everyone,

first of all, thank you for the responses and valuable comments.

Hi Abdullah,

I think we have generated all the necessary structures, at least for sure we did all the activities listed in the mentioned How-to guide.

Hi Sanjay,

I think that the document that you have suggested is not applicable here, we don't want to make a new node in the data model, just to add a new field/attribute.

Hi Avinash,

yes, it is missing from the genil model.

Hi Peter and Sudhir,

appending structures sounds like a good idea, but before I do that I would really like to understand why am I doing a certain append. (It is a demo system aimed to understand the hows and whys, and this activity has never been part of the mentioned how-to guide).

However we have added the new field to the genil model, and then I was able to add the relevant field to the UI, but its content gets deleted after each roundtrip.

My question would be the following:

Can anyone please help me to understand the system architecture here? Because I have a feeling that the genil model extension only helped us to force the system to make my developed field available during the UI config, but there is no correct mapping behind it, that's why the content of the field disappears after each roundtrip.

For example it should be clear for us what is

  • the relationship between the database table (KNVV) and the BP data model (how the system knows that my developed field in the BP data model is from the KNVV table, not from another database table)
  • the relationship between the data model and the mapping steps (ok, this can be found in the "Generate Data Model Specific structures" IMG activity)
  • and the connection between the mapping and the UI config. (e.g. there is no clue on the UI config screen about mappings, data models, anything, I can simply choose from a list of fields to add to my UI - but what defines the available fields that I can add to the UI??).

I think answers for the above questions cannot be found anywhere on the internet, or SAP help, please correct me if I'm wrong. (I've also checked the SAP Help of "Mappings for Enterprise Services", but I found it too high-level.)

Thank you!

Tamas

Former Member
0 Kudos

Hi Tamas,

Its like BP Data model works on different architecture and MM and other works on different architecture.

The Genil layer is involved only in case of BP Data Model, when you do any extension in MM Data Model you dont have to enhance Genil Layer but you have to in case of BP Data Model.

In Case of BP Data Model, its like Data Model (BP) -> Genil Layer -> UI.

There could be different reason for data disappear. (Please check my previous reply ).

Regarding your 1st point :

Relationship between KNVV and BP Data Model : Suppose if you have enhance KNVV Table then that field must be depend on Sales Area thats why when you came to Data Model, you have to enhance Sales Area Entity, you can not add appended field in KNVV to general data entity.

System will know that developed field is from KNVV  table not from other table based on SMT Mapping, when you are adding custom field to standard entity, you also need to enhance SMT Mapping to store data in Staging Area and then transfer to Active Area after activation of CR. so, if you have enhanced KNVV table that mean you want to store data in KNVV for that developed field after activation of CR thats why you have to enhance SMT Mapping of Sales Area for Staging Area and Active Area because then only you will be able to map you newly added attribute on entity to your developed field in KNVV.

Regarding 2nd and 3rd point :

When you goto UI Configuration and when you will enhance it you will find 'Relationship' Name, these relationship name exist in Genil Layer which is linked to Dependent Object of Genil Layer, in this way your UI and Genil will get linked.

Relationship of Dependent object of Genil Layer to the Entity of Data Model BP you can see in view cluster 'VC_MDG_BS_GENIL_C', in this way your Genil Layer and Data Model will get linked.

All field on UI will come from Dependent Object of Genil Layer in case of BP Data Model, it will  not come from Data Model Entites directly.

I hope these answers your query.

Regards,

Sudhir Wakodikar

Former Member
0 Kudos

Hi Sudhir,

We have checked it with Tamás and we still have some question and facing with some issue. My fisrt question is:

- when we extend the BP data model, entity type BP_SALES, the structure/Table field should be filled by us or it should be generated automatically? (marked with red on the picture what i mean)

- we are trying to do SMT mapping in CUST_BP_SALES_2API but in mapping steps CMDS_EI_SALES_DATE we got stucked. Our custom field does not represent in the list during field selection:

Can you provide any help in both above mentioned question/issue ?

Many thanks in advance,

Br David

former_member283411
Participant
0 Kudos

Hi Sudhir,

I have a feeling why our structures are missing. After the activation of the data model, we wanted to generate structures for the new field that we added to the data model in IMG activity "Generate Data Model-Specific Structures". However, after we select the entity types that we have extended and click on "Generate Selected Structures" we get the below message:

According to this structures in the /MDG* namespace are not generated.

Then I went back to the beginning of the "Generate Data Model-Specific Structures" activity and here I saw that our structure is in the /MDG* namespace:

Does anyone have an idea how can I change it?

Many thanks,

Tamas

Former Member
0 Kudos

You should not change the namespace in the table. When you add a new field to an existing structure, a customer include is added to the standard (hence the structures are called CI_<something>). What you can do is display the different structures in SE11 using the prefix and the structure name and see if your field is there or not (type /MDGBPX/*PP_BP_SALES* in the structure field to find those structures). If your field is not there, open the CI_<structure> by double clicking it. You can then open it in change mode (because it is a customer include) to see if it is active or not. Sometimes, the tool can't activate those structures for one reason or another. You can handle that in SE11 directly if needed. However, do NOT add fields there directly; only fix whatever errors you find if any. You need to open it in change mode to see if there is any inactive version. Display mode will only show you the active version.

former_member283411
Participant
0 Kudos

Hi Abdullah,

thank you for your help, I've managed to find all the customer includes and have generated them (so, *PP_BP_SALES, *ES_BP_SALES and *FP_BP_SALES are done, however, in *KY_BP_SALES I couldn't find the include - I don't know if that matters).

Unfortunately the problems listed by David still not solved. There are no structures next to our custom field in the data model (I don't know if there is supposed to be), and neither can we select our custom field in the mapping step as a FIELD (however we can select it as a SOURCE FIELD). Is that could be because we selected a wrong package when we were trying to do the mapping?

All in all, the problem is still unsolved, we have the same issues that David wrote about.

Many thanks again,

Tamas

Former Member
0 Kudos

Hi Tamas,

You have extended KNVV Table but you added in BP_CENTRL entity which is for general data. If you want your field at sales area level you have to extend sales area entity BP_SALES.

Also you have to extend BP_SALES SMT Mapping.

After these you have to it in Genil Layer then only it will appear on screen.

For Genil Layer, goto genil_model_editor, select component as 'BUPA' with all enhancement, goto 'Dependent Object' and select CU_SalesArea and enhance the attribute structure 'BSS_CUIL_SALES_AREA'. then you will be able to see your field in customization for sales area and you can add on UI from there.

Regards,

Sudhir Wakodikar

Former Member
0 Kudos

Hi Sudhir,

I am working with Tamas and we are trying to extend MDGC with custom field. So we have extended KNVV table with field ZVAT and added this field to BP_CENTRL, done the SMTP mapping and all the necessarry steps as above screen shoots attached by Tamas.

After we followed your advice and went to genil_model_editor to add the mentioned field (ZVAT) to BSS_CUIL_GENERAL.

The field has been added succesfully:

After all these steps we were able to see the mentioned  field in the Web Dynpro field Repository and it was added to the UI but we are facing with an other issue now.


The custom field represents on the UI and even data can be chosen (2 option yes (X) or no(blank)  )as you can see under:



For example i chosed Yes (X) and after clicked on Done button. After when i have finished with everything turned back to check all the data what was entered is correct or not and found out YES (X) data is disappeared from the custom field.


I have tried several times to re-enter data in the custom field but it got disappeared every times.


Can you advice anything what can be the issue ???


Many thanks,


Br David

Former Member
0 Kudos

Hi David,

Check the below thread.

Regards,

Sudhir Wakodikar

bavinash1
Explorer
0 Kudos

Hello Tamas,

Before coming to the UI layer, may be you could also check if your field is reflected in genil model first?

Go to genil_model_browser ->Give Component set as BUPA_SET or Enhanacment as BUPA_CUSP-> Display and check the attribute/key structure for your entity. The new attribute has to there here first.

BR,

Avinash

Former Member
0 Kudos

Hi Tamas,

Please check the structure CI_EEW_BUT000 and see if the field has been included/appended. If it is not, create an append structure to add the field. After activating the structure, the field should be visible in the Web Dynpro field Repository. The structure CI_EEW_BUT000_X should also be appended with the field.

Edit: You shouldn't have to, but just in case you might want to regenerate the BP structures after this.

Hope this helps.

Thanks,

Former Member
0 Kudos

One other comment; sometimes if you have the FPM editor already open before you added the fields, you need to close it and open it again for the new fields to show up.

Former Member
0 Kudos

Did you generate the new structures or extend existing structures? There are a few different scenarios where you create a structure or enhance an existing one. Find the exact scenario you are working on and make sure all the structures have those new fields.

Former Member
0 Kudos