MDG: Some Reasons Why Data Disappears
In
discussion I asked for the reason why data disappears after navigating to another screen. In the meantime I found out that there are several possible reasons. If you know further reasons feel free to add them to the comments.UI Configuration: Wire must reflect hierarchy of GenIL model
Both the GenIL model and the OVP page are build in a hierarchical way. The relations in GenIL are reflected in the wire schema of the OVP. A mismatch between wiring and GenIL can lead to disappearing values or to a dump.
For example you have enhanced KNVV by several z-fields and these attributes should be displayed in an own UIBB on Sales Area level. In the GenIL model the fields are added to dependent object CU_SalesArea.
The new UIBB has Feeder Class CL_BS_CU_GUIBB_SALES_AREA with Component = BUPA and Object Name = CU_SalesArea.
In the wire schema the configuration of the new UIBB must be linked to the configuration of the Sales Area List as ‘Source Configuration’.
BRF+ Derivations not updated after model change
Transaction USMD_RULE generates BRF+ structures based on the data model which then are used in the signature of the functions. If the data model is changed the generated structures in BRF+ are not updated automatically. If a derivation exists for the changed Entity Type it can happen that attribute values disappear. The solution would be to run report USMD_ADAPT_BRF to adapt the generated structures according the model. Alternatively you can start transaction USMD_RULE. The transaction checks whether the generated structures still fit to the data model. If not the structures are regenerated.
Usage of same data element for different attributes
We had two quantity fields where we assigned the same data element in the data model. This is not allowed and leads to disappearing values. The solution is to copy the data element and assign the new one.
Markus, This is really helpful. Thanks for posting.
I would like add a point to your second point above
BRF+ Derivations not updated after model change-
Alternatively report USMD_ADAPT_BRF refreshes the BRF functions after there is any changes in Data model..like field added or removed.
Regards
Praveen
Hi Praveen,
thanks for mentioning the report. I added this information to the blog.
Regards,
Markus
In MDG-M, this week I had the same problem with values disappearing in Flex fields. I simply added three new Flex fields to my existing Flex field UIBB. I've added fields to this same UIBB many times in the past without having this problem; so it was two days of frustration trying to solve the issue.
I tried running both USMD_ADAPT_BRF and USMD_ADJUST_STAGING with no results. I also had opened USMD_RULE transaction to view my existing validations and derivations and still the problem persisted.
HOWEVER, today I again opened USMD_RULE and when prompted for a transport, I entered a new transport number rather than choosing "Local" - and it fixed the problem. When specifying an actual transport, it clocked for a few seconds, so obviously it was now regenerating the structures.
Therefore, it seems that unless you have an open transport, running program USMD_ADAPT_BRF may not actually do the required regeneration.
Rob
Hi Markus,
We found another reason for the disappearing values for the enhanced entity modeled as a flex.
The root cause was the Active Area being left blank on the new flex entity in MDG Data Model. It should have the value MDG for the new flex entity otherwise the values would disappear.
Example screenshot is shown below.
Regards
Uday