Skip to Content

SAP Java Data Dictionary & SAP MII MDO


With the SAP MII 12.2 release to the general market on 08/17/2011 a feature called Manufacturing Data Object (MDO) was introduced as an option for persisting data inside of your SAP MII composite applications.  This allows any MII content developer to create an object that maps to a table inside of the SAP MII NetWeaver database and does not require access to a separate database.  While it is perfectly acceptable for MII to access an external database and a common way to interface to an MES system, I usually push people to use the SAP Java Data Dictionary or SAP MII MDO.  The reason is that if you are going to create a database model or persist data for your composite applications, both of these products allow you to leverage NWDI managed process so they have a change management process.  The same NWDI track that the Data Dictionary is using can also be used for all of your MII content, including MDO definitions, and this will help to ensure your content matches the expected data model.  NWDI does add a layer of complexity that not everyone is ready for but the SAP Data Dictionary is something that most people don’t even know about plus it can save them from using an additional DB license at their plants.

Differences between SAP Data Dictionary & SAP MII MDO

The differences between the design of the SAP Data Dictionary and the SAP MII MDO feature is primarily that the Java Data Dictionary is part of the SAP NetWeaver Developer Studio (NWDS) and is designed to allow a user to define multiple related tables.  This is not only referring to primary and foreign key dependencies but it also is complete with support for triggers, sequences, and embedding of native SQL scripts across one or many database vendors.  This tool essentially allows you to define and manage a common database model and structure across any database vendor; pretty cool.  So with all of these features built out already why is there a need for SAP MII MDO?  The differentiator for MDO is that it’s tightly coupled with your MII content and it is even defined inside of the MII Workbench along with the rest of your MII content.  It also has a lifecycle tied to it which means that the definition for the management of its data is also part of the object definition which simplifies the complexity of the data management.  The MDO object still related one to one with a table in the NetWeaver database and will scale to whatever size the underlying NetWeaver database allows you to but it will not allow you to setup primary & foreign key dependencies, triggers, sequences, or anything else that Open SQL does not support.

Recommendations for when to SAP Data Dictionary or SAP MII MDO

The SAP Data Dictionary is typically good for defining relational data models that drive large scale MES or LIMS style applications where-as the MDO approach is designed to be more like a living cache of data that is periodically updated for driving performance visibility or data buffering type applications.  To reiterate my point earlier, the MDO objects will scale to whatever the NetWeaver database allows them to grow to just like the Data Dictionary tables do but the MDO objects have a lifecycle that is also defined along with them for easier management of this data.

Hope this helps to clarify and I am looking forward to hearing about your experiences and feedback.


You must be Logged on to comment or reply to a post.
  • Hi Salvatore Castro, this blog is some good and helpfull overview about SAP Java Data Dictionary & SAP MII MDO.

    I have already developed an application with MDO managed by NWDI with MII 12.2, now I have a new project with MII 14 and I have to decide about MDO or Java Dictionary.

    I prefer to use SAP MDO in order to take advantage of its lifecycle features and MII Workbench, but I afraid to face the same problems that I faced in the prior version.

    I know that in my application I will need database indexes in some fields that will not be primary key in the tables, so taking into account that I cannot create indexes in the MDO (just the MDO Keys have index), the better tool is SAP Java Data Dictionary ? Or is there any way to create index (not primary key) in my MDOs ?

    • Michel,

      Great question and I am curious if the only "problem" you are refferring to is around the generation of an index on a non-key column for your MDO or if there is something else on your mind.

      As for the generation of an index, this is not something that Open SQL can handle and as a result is something that the MDO definition will not handle either.  There was talk internally about allowing an MDO definition to include a "One-time Configuration" SQL script in native SQL for the NetWeaver database that would run when the MDO was first deployed.  This has however, not had a lot of customer interest (overlaps with the Dictionary capabilities) but we do understand it's power and potential for very robust applications.  If you are interested in supporting this feature please submit a ticket into CSS asking for support of no key indexes in MDO definitions and also make a reference to opening up and option for a native SQL configuration script.

      The issue and challenge with this approach, is that we can run into migration & deployment issue if you change the configuration script or the existing object defintions in a way that they cannot be easily migrated during transport.  We would probably further require you to write a one time migration SQL script as well in order to prepare the database for the new changes being deployed (Can get a little hairy).  This is main reason why if you need this functionality that I would push you towards the Data Dictionary tool because it handles this already and it can still fit in with the same NWDI track that your MII content is using.

      Hope this helps,


      • I created MDOs to work just like database tables, so I faced several issues when have to change something in the MDO, like add or delete a column and transport the changes with NWDI. I could not lost the content of the table (MDO).

        There was some times that I had to create a new MDO instead of change one existing, so I had to change all the queryes and manually transport the content, and after that, I should delete the original MDO and transport all the activities again.

        Another dificult task was to create queryes with datetime columns and convert the format that the user entered without use javascripts, I don´t remember exactly the error that I faced but remeber that I spent a lot of time just in this simple query.

        • Michel,

          Yes this is a common issue with MDO and it is one that early on releases of the feature struggled with.  A lot of the limitations are around limitations with fact taht MDO is based on an OpenSQL interface to the NetWeaver Database which allows it to work across the various database platforms that NetWeaver supports.  As you may know MII can be deployed on any database that NetWeaver supports and as a result MDO also has to support them.  However, I have yet to come across a database that allows you to shrink or change the datatype of a key field column defintion without jumping through a lot of hoops with staging tables as it will always drop the table data.  It just so happens that staging tables are not supported by OpenSQL so they are not an option for us with MDO. 

          However, in the MII 12.2 SP03 notes there is a comment about preserving MDO data when transporting: the object definition; provided that the object definition changes at design-time (warning appears when saving) doesn't require you to drop the data.  Other related notes on this topic are here:

          There is also a general recommendations note specifically for performance of MDO objects and the management of native SQL around the object here: MDO Performance

          Hope that this helps,