doe data modeling - best practices
TRANSCRIPT
SAP How-to Guide
SAP Mobility
[SAP NetWeaver Mobile 7.1]
Applicable Releases:
SAP NetWeaver 7.1 SP SP13+
Version 1.0
June 2012
DOE Data Modeling - Best Practices
A Branded Service provided by SAP Customer Solution Adoption
© Copyright 2012 SAP AG. All rights reserved. No part of this publication may be reproduced or tran smitt ed in any form or for any purpose wi thout the express p ermission of SAP AG. Th e information cont ained herein may b e changed wi thout prior notice.
Some softw are products market ed by SAP AG and its dist ributors contain propri et ary softw are component s of other software vendors. Microsoft, Windows , Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM , DB2, D B2 Universal Datab ase, Syst em i, System i5, System p, Syst em p5, Syst em x, Syst em z, System z 10, Syst em z9, z 10, z 9, iSeries, pSeri es, xSeri es, z Series , eServer, z/VM, z /O S, i5/O S, S/390 , OS/390, O S/4 00, AS/400, S/390 Parall el Enterp rise Server, Po werVM, Pow er Archit ecture, POWE R6+, PO WER6 , PO WER5 +, PO WE R5, PO WER, OpenPow er, PowerPC, Bat chPipes, Bl adeC enter, System Storage, G PFS, H ACMP, RET AIN, D B2 Connect, RACF, Redbooks, O S/2 , Parall el Sysplex, MVS/E SA, AIX,
Intelligent Miner, WebSph ere, N etfinity, Tivoli and Informix are trademarks or regist ered trad emarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are eith er trademarks or regist ered t rad emarks of Adobe Systems In corporated in the United Stat es and /or other countries. Oracl e is a regist ered trad emark of Oracle Corporation.
UNIX, X/Op en, OSF /1, and Motif are regist ered trademarks of the Open Group.
Citrix, ICA, Program N eighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trad emarks or regist ered trad emarks of Citrix Systems, Inc.
HTML, XML, XH TML and W3C are t rad emarks or registered trademarks of W3C®, World Wid e Web Consortium, M ass achus etts Institut e of Technology.
Jav a is a registered trademark of Sun Micro syst ems, Inc. Jav aScript is a registered trademark of Sun Microsyst ems, Inc., used under licen se for technology invented and i mplement ed by N etscape.
SAP, R/3, SAP N etWeaver, Duet, Partn erEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, and other SAP product s and se rvices mentioned herein as w ell as thei r respective logos are trademarks or regist ered trad emarks of SAP AG in Germany and other co untries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other
Business Objects products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Business
Objects Software Ltd. Business Objects is an SAP company. Sybase and Adapti ve Serv er, iAnywh er e, Sybas e 365, SQL Anywhere, and other Sybas e products and services mentioned herein as well as thei r respective logos are tr ademarks or regist ered t rad emarks of Sybase, Inc. Sybase is an SAP comp any.
All other product and service names mentioned are the trademarks of their resp ectiv e co mpani es. Dat a cont ained in this document serves information al purposes only. N ational product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may b e rep roduced, co pied, or trans mitted in an y form or for any purpos e without the express prior writ ten permis sion of SAP AG.
This document is a preli minary v ersion and not subject to your licens e agreement or any other agreement with SAP. This document contains only int ended strat egies, d evelop ments , and functionalities of the SAP® product and is not intended to be binding upon SAP to an y parti cular course of business , product strategy, and /or dev elopment. Pl eas e note that this docu ment is subject to ch ange and may be ch anged by SAP at any ti me without notice.
SAP assu mes no responsibility for errors or omissions in this document. SAP does not w arrant the accuracy or compl et eness of the information, text, graphics, links , or other items contained with in this mat erial . This document is provided without a warrant y of any kind, either express or i mplied, including but not limited to the i mplied w arranties of merchant ability, fitness for a particular purpose, or non -infringement.
SAP sh all hav e no liability for damages of any kind including without limit ation direct , special, indirect , or consequ ential d amages that may result from the us e of these materi als. Thi s limit ation shall not apply in cases of intent or gross negligence. The statutory liability for p ersonal injury and defectiv e products is not affected. SAP has no control over the information t hat you may access th rough the use of hot links contained in thes e materials and does not endors e your use of third-party Web pag es nor provide an y warranty whatso ever rel ating to third-part y Web pages .
SAP ‚How-to‛ Guides are intended to simplify the product implement-
tation. While specific product features and procedures typically are
explained in a practical business context, it is not implied that those
features and procedures are the only approach in solving a specific
business problem using SAP NetWeaver. Should you wish to receive
additional information, clarification or support, please refer to SAP
Consulting.
Any software coding and/or code lines / strings (‚Code‛) included in this
documentation are only examples and are not intended to be used in a
productive system environment. The Code is only intended better explain
and visualize the syntax and phrasing rules of certain coding. SAP does
not warrant the correctness and completeness of the Code given herein,
and SAP shall not be liable for errors or damages caused by the usage of
the Code, except if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java™. Any code change
in these components may cause unpredictable and severe malfunctions
and is therefore expressively prohibited, as is any decompilation of these
components.
Any Java™ Source Code delivered with this product is only to be used by
SAP’s Support Services and may not be modified or altered in any way.
Document History
Document Version Description
1.00 First official release of this guide
Typographic Conventions
Type Style Description
Example Text Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Cross-references to other
documentation
Example text Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text File and directory names and
their paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text User entry texts. These are
words or characters that you
enter in the system exactly
as they appear in the
documentation.
<Example
text>
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT Keys on the keyboard, for
example, F2 or ENTER.
Icons
Icon Description
Caution
Note or Important
Example
Recommendation or Tip
Table of Contents
1. Overview/Use Case ...............................................................................................................1
2. Best Practices ....................................................................................................................... 2
2.1 Do and Don’t ..................................................................................................................... 2
2.2 General Rules .................................................................................................................... 2
2.3 Best Practices ................................................................................................................... 3
2.3.1 Design Time in SAP NetWeaver Mobile 7.1 ...................................................... 3
2.3.2 Runtime in Production System .......................................................................... 7
3. Sample Scenario/Solution – Data Model ............................................................................ 9
4. Sample Scenario/Solution – Distribution Model ............................................................... 11
5. Related Links ....................................................................................................................... 15
6. Appendix ............................................................................................................................. 18
DOE Data Modeling - Best Practices
June 2012 1
1. Overview/Use Case
Overview
Mobile clients usually do not require the entire data from a back-end system. Distribution rules are
used to filter the required data; this data is replicated by the Consolidated Data Store (CDS), a
component of the Data Orchestration Engine (DOE).
In this document, we will focus on best practices for data modeling, including performance aspects
related to distribution models.
The creation of a data model from scratch and the creation of a custom application are out of scope.
Use Case
There are two ways in which a customer can enhance the data model, both of which require
implementation in the DOE workbench.
Note that enhancements using code free extension do not require a data model and thus are
omitted in this document.
Scenario 1: Enhancing Distribution Model
The customer evaluates the shipped model and realizes that the shipped model’s distribution rule
does not suit his requirement.
In this case, he creates his own distribution rule within a new Distribution Model Software
Component Version (DMSWCV).
Scenario 2: Enhancing Data Model
The customer wants to enhance the default shipped Data Model by adding new Data Objects, new
nodes to the existing Data Object and new fields to the existing Data Object node.
These types of changes cannot be achieved by using code free extensions, and a physical data
model change is required.
Then, after the enhancement, the customer has to enhance the backend adapter as well.
The generation of data object and backend adapter creates a new version of the objects.
DOE Data Modeling - Best Practices
June 2012 2
2. Best Practices
2.1 Do and Don’t Don’t: Avoid having too many distribution models per SWCV. This can cause performance
problems.
Don’t: Avoid having many levels of child nodes in a data object because it can cause a lot of
performance issues.
Do: Limit to two levels (i.e. a header and its children) for better performance.
Don’t: Avoid self dependent and cyclic dependencies for performance reason.
Don’t: Avoid parallel dependencies linking to the same two objects because they can lead to
problems in data distribution and performance issues due to multiple dependency checks
which has to be carried out.
Don’t: Do not use RAW 16 data type in a data object, because it is converted in LONG-text
field on client.
Do: Use CHAR 32 instead.
Do: Work with proper index in backend to avoid backend adapter performance issues in
backend.
Don’t: Do not put data objects, backend adapters, and distribution models in one transport
request while transporting from one system to another.
Do: Transport data objects and backend adapters in one request, and distribution models in
another request. Request of the data objects and backend adapters should be transported
first.
Don’t: Do not delete distribution model or object after changing them, unless those are not
used any longer. This may cause inconsistency and lead to generation or rule activation
failure.
Don’t: Do not start upgrade or transport of objects if DOE_MASS_ACTGEN queue in client
000 is still running. This may cause generation errors.
2.2 General Rules Determine which object instances are really necessary for each device, and distribute less
data as possible.
Avoid replication and synchronization of empty fields.
Leading object attribute can be either from header node or childe node, but the following
object attribute should be the header node attribute.
Associations can never be created between different types of objects (i.e. Receiver
Generation Objects, Standard Objects, Subscription Generation Objects).
There are ways to design a distribution rule.
。 Criteria field based rule - the value of a specific data object field(s) are evaluated
against static values or dynamic values.
。 Bulk rule - Data flows down irrespective of the content of the data object.
Bulk rule is simpler to implement but can lead to more data output than intelligent rule.
With Dependency Rule, Dependency and Rule are evaluated together, object will only be sent
if both conditions are satisfied. Standard rule on dependent object is Or-condition, and
Instances will be sent if they are either captured by the dependency OR by the rule.
DOE Data Modeling - Best Practices
June 2012 3
At any point of time, a device cannot have two DMSWCVs that distribute any data object in
common, which leads to conflicting DMSWCV.
2.3 Best Practices
2.3.1 Design Time in SAP NetWeaver Mobile 7.1
Segregation of Data Objects and Distribution Models
SAP recommends having Data Objects and Distribution Models in separate Software Component
versions (SWCV). The advantages of such approach is as follows:
Well organized, and easy to maintain the objects
When there is a data model that had been shipped by SAP, or ISV’s doesn’t meet the
customer requirements, the customer can create a new SWCV.
This will allow the customer to have complete flexibility over the distribution pattern and is
insulated from any model upgrades from SAP.
To have Data Objects and Distribution model in separate SWCV’s, a parent-child relationship has to
be defined between the 2 SWCV’s, and the Data Objects have to be inherited. Once this is done,
Distribution models can be easily created in the second SWCV.
Multiple DM SWCVs can be set up in parallel, having use-access to the same data Object SWCV.
Although the same Data Objects can be reused within different scenarios, for which different
Distribution Logic can be provided, too many parallel DM SWCV’s can cause performance problems.
If similar scenarios can be treated in within the same Distribution Model (e.g. by establishing
multiple rules in the same DM) this solution should be preferred.
Tip
To copy existing distribution model(s) to a new DMSWCV, implement the following note, then run the report SDOE_COPY_DISTRIBUTION from SE38.
DOE Data Modeling - Best Practices
June 2012 4
Note 1701609 – Copy functionality of Distribution model to another
Data Object
A Data Object represents a business object of the identified mobile application in the backend. The
design time may have multiple data objects based on the backend business objects.
If the backend application logic requires any association between two objects, then we can create
association between data objects. Association between data object ensures referential integrity
between related data objects in the consolidated data store (CDS).
Associations can be complete or partial. With complete associations, all the backend keys of the
associated data object are mapped to the corresponding fields in the modeling data object. This is a
1:1 association where in 1 instance of the modeling data object is associated with one instance of
the associated data object.
To define multiple associations for the same attributes of a data object, you can use a static filter.
(more information about static filters occurs later in this section.) Associations without a static
filter result in better performance however, because the static filter adds more WHERE clauses to
the queries.
Partial association means 1:N or M:N relation of the data object to the backend keys, which may
results in lower performance during distribution. Therefore, use this type of association only if it
cannot be defined using another association scheme.
Note
Mandatory Notes: 1721526 – Syntax error in Partial association Function Module (SPS07 – SPS14) 1691730 – No data in shadow node table when using Partial Association (SPS11 – SPS14) If inconsistencies have already been created, note 1669468 (SPS06 – SPS14) is provided as a correction.
Also to avoid performance problems:
Create your own Shadow-table (with the key-connections), which contains all potential
references, and use complete associations.
Or split the data objects (create more, each with one level of children, resulting in more and
smaller AT-tables)
Or a small table in front of the data object (to more selective specify the results) which
results in smaller AT-tables but bigger xml-size.
DOE Data Modeling - Best Practices
June 2012 5
Backend Adapter
A data object can have multiple backend adapters, but selectivity of data by backend adapter
influences the data volume, which may lead to a long response time.
There are options to improve performance if the data load from the backend to the DOE is very
large.
Use Bulk Select this option if subscriptions are to be provided without validation checks for
each record of data.
Use Mass Data Select this option if the data volume to be transferred from the back end is
high; it allows multiple instances of items to be retrieved in a single call to the back end. Key
idea here is reading data based on a block/package size. To use this, GetList Bapi Wrapper
needs to be extended by importing parameter MASS_REP. Also BACKEND_PACAGE_SIZE
configuration parameter must be maintained.
For more information, please refer to:
Developing and using "Get List" BAPI-Wrappers with 'Mass Data' in DOE
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50fa3a06-8bcb-2c10-1daf-c604a4880361
FAQ for NetWeaver Mobile 7.10 - Modeling, Deployment, Testing -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10de86e2-41d0-2c10-7e96-e9337967f7fe
Distribution Model
A Distribution Model contains distribution rules and distribution dependencies.
Dynamic distribution: information from backend can be used (like territories)
Static distribution: possible but not recommended
Distribution Rule
A Distribution Rule defines criteria for distribution of object instances, and can be selective or bulk.
This affects the amount of data of an object which leads to performance of the distribution rule.
With Bulk, all instances of the root object or nothing, can be dynamic by using subscription
generation (SubGen) or device search criteria.
With Intelligent, criteria can be set manually, dynamically via subscription generation object, or
date/time based.
Although bulk is simpler to implement, it can lead to more data output than intelligent.
If instance determination based on dynamic logic via subscription is used, there are some
performance related areas which you can take into consideration.
Operator ‚=‚ is more performant than‚ >‚ or "<‚.
If you cannot avoid the ‚OR‛, do not use two ‚OR‛ criteria in one rule. This will reduce
performance during runtime. If necessary, it is better to split two ‚OR‛ into two rules.
DOE Data Modeling - Best Practices
June 2012 6
The resulting database statements should be supported by a database index.
Further performance depends on:
Number of criteria in the rule (for instance the number of used fields).
Type of the fields, used in rules: NUM-field are faster processed than CHAR-fields.
The higher the number of rules per object is, the less performant the replication/realignment
is.
Mount of data: Rules on the root can be processed faster than on child.
Keep the number of subscriptions on a rule per device as low as possible.
Distribution dependencies
Dependency defines relationships between object instances by matching to attributes.
From runtime performance perspective it is recommended to avoid self-referential / cyclic
dependencies where-ever possible.
Completeness Groups
Completeness Groups can be used to enforce that within a hierarchy of dependencies download of
objects to devices takes place only if the root object and all its dependents are found on the server
and fully processed.
However, maintain Completeness Groups only if referential integrity is absolutely required for
performance reasons.
Note
Static filter versus intelligent dependencies
Static filter pertains to the Link Node content, and runtime static-filter-change scenarios are not supported. In case of condition change, intelligent dependency will be fully supported by realignment.
DOE Data Modeling - Best Practices
June 2012 7
Released for Shipment option
This option is in SWCV level and can be found in the tab Shipment Attributes of the SWCV. This
option is enabled only for SWCV which has a package attached to it.
For SWCV’s that are assigned to local objects, this option will not be enabled.
This option is used to finalize a data model. Basically, when a version of the data model becomes
productive, this option is checked. By doing this, a lot of restrictions come into place. The developer
will be able to do only compatible changes to the data model. Compatible changes include, adding
new Data Object, adding new node to an existing data object and adding new field to an existing
node in a Data Object. Incompatible changes include deletion of a Data Object, deletion of a node in
a data object or deletion of a field in a Data Object. The reason why incompatible changes are not
allowed after a data model becomes productive is that there will be data loss in the productive
system. That’s why it is very important to choose this option once a version of the data model
becomes productive.
2.3.2 Runtime in Production System
Rule Activation
The rule deactivation/activation will trigger the MMW_RR* queues, the data from the CDS will be
distributed to devices by calculation based on the rule. On deactivation, the AT table entries would
be removed and on activation it will be inserted again. This will correct AT tables in case the client
is not getting the expected data or getting unwanted data, but apply SP15 or note 1691026 before
doing rule deactivation/activation.
Initial Load
If there is Longtext- field in a data object, use COMPARE_MEMO parameter for Longtext-fields per
SWCV and data object in Data Orchestration Admin and Monitoring Portal. However, this may
DOE Data Modeling - Best Practices
June 2012 8
degrade performance, thus avoid using this setting if the backend logic can determine if the memo
is last changed or note before a load.
Realignment
Realignment is re-distribution to the subscribed devices, done by the DOE if distribution relevant
data have been changed in backend
By change of leading object receivers
Insert or delete of an instance
Change of distribution meta data
This can cause larger system usage depending how many data and receivers are affected.
DOE Data Modeling - Best Practices
June 2012 9
3. Sample Scenario/Solution – Data Model
Creating Dependency between Fields of Two Data Objects
Scenario:
Dependency cannot be created between fields.
Solution:
Dependency between the Data Objects which are not in the same SWCV is not allowed. Create a
SWCV that have both Data Objects and have dependency between them.
Migration from SAP Mobile Infrastructure 2.5 to SAP NetWeaver Mobile 7.10
Scenario:
Association from Two-way to Standard Data Object created because of Migration from MI 2.5 to
NW Mobile 7.10 and the custom application which was working with MI2.5 did not work after
migration.
Solution:
Avoid association between two-way data object to Standard data object or vice versa.
SMQ2 Error ‚Operation not supported for incompatible data object"
Scenario:
The objects are not getting regenerated even after triggering the regeneration of backend adapters
and data object. It is happening for a critical data object to push users customizing/master data.
Solution:
The distribution model was not regenerated when the data model was changed. Regenerate the
distribution model corresponding to this data object then execute the entry in the queue.
Regeneration of the DM should take care of generating the correct code in the method having the
error.
Performance Issue While Running SDOE_LOAD to Load Backend Data to DOE
Scenario:
There is a data object called ZPLANT which leads to TIME_OUT when loading backend data to DOE
even though the system is adjusted with the note (1155550) providing guideline for performance
tuning. This Data object has child nodes, MATERIAL_LIST, which refer to ZMATERIAL data object,
which has 1:1 map of the header node of ZMATERIAL.
Currently the load has 237114 material lists for a given plant which refer to unique 237114 material
in the header. The idea is the other plants refer to a different number of material list.
Solution:
With this data modeling, the problem arises from where the association is defined just to distribute
MATERIALS based on the plant, but the node MATERIAL_LIST has no plant relevant distribution.
Instead of having a dependency, a child node is recommended for better performance in case
where a dependency is created between two Data Objects just for distribution purpose.
DOE Data Modeling - Best Practices
June 2012 10
In the example above, remove the dependency and, instead, create a child node in ZMATERIAL
called PLANT_LIST which refer to all the plants the material is used. Then define a rule on this node
to distribute the materials to all the users who work for a given plant.
Excluding Binary Memo Content in Its Confirmation Message
Scenario:
An upload data object, which contains attachment defined as a binary memo, is uploaded from a
device, DOE returns its confirmation message including the attachment content. A customer has a
concern that this attachment can be very large and cause heavy network traffic.
Solution:
Attachment in the confirmation message can be avoided by creating a custom service. Implement
a method to clear the attachments in the MMW_FLOW_CLNT_OUTBND_WITH_CONF flow
definition method.
To create a custom service, refer to:
Using Custom Services in DOE (Data Orchestration Engine)
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0d258e4-3480-2c10-8ebc-
853c3e787d90
DOE Data Modeling - Best Practices
June 2012 11
4. Sample Scenario/Solution – Distribution Model
Generation Error of Distribution Model—Distribution Model Inconsistent
Scenario:
Distribution Model transported from a development system cannot be generated in QA system
throwing the error ‚Distribution model inconsistent‛.
Solution:
Whenever the design time objects are transported from DEV to QA system, generations of those
are triggered automatically in DOE_MASS_ACTGEN queue on client 000. Check the queue for
client 000 in SMQ2.
Duplicate DM within SWCV after Transport
Scenario:
A distribution model was modified in the development system then this model was transported to
the quality system. The model has been incorrectly replicated into the quality system, instead of
replacing the previous version by the new, two versions coexist.
Solution:
Initially in the development system, there has been a DM version 1 which has been transported to
the quality system and so quality system has version 1. DM version 1 was deleted and version 2 was
created in the development system. Above scenario happens when only version 2 is transported
without version 1 to the quality system. These both, the created and deleted, DMs have the same
DM name and have been created in the same DM SWCV. So, from table, SMMW_DM_HDR, we can
see that DM id is different but, versions are same and DM name is same.
Now, what is happening is that the quality system has a version 1 with the same name and same
version as the one created in Dev system with the same name and same version, but with different
DM id, because of which there is an inconsistency reported.
To fix this issue is that, you should transport the request where the Delete request of DM1 is locked
to your quality system.
Distribution Rule with Date Pattern
Scenario
Date pattern defined in the distribution rule does not update the date properly.
Solution
Do not manually modify the dates by deactivation and reactivating the rule. Scheduled Sliding
Window—Date jobs which run at midnight to evaluate the rule and will recalculate the data to be
sent to the device. If it doesn’t work, check scheduled jobs.
Keeping Data for ‘n’ Days Where ‘n’ Is Configured in Z Table
Scenario:
A requirement is to keep the data for 'n' days in DOE for a specific data object. This 'n' is configured
in Z table for each object. ‘n’ can be 3 days in Z table, and 2 days changing the Z table. How to write
DOE Data Modeling - Best Practices
June 2012 12
a dynamic distribution rule considering this Z table? The rule should not be changed even the value
in the z table changes.
Solution:
By using date pattern rule, above functionality can be achieved. This can be done from the rule
wizard itself, by going into the "None" mode for the Logic selection in the rule wizard. Then you will
be able to go to the next step where you can select the date pattern type rule.
Then you will go to next step where you can specify constant value or custom offset or custom date
pattern. Choose custom offset and give a class name which implements IF_MMW_DATE_OFFSET
interface in which it has a method GET_OFFSET_VALUE which you need to implement to get the
OFFSET_VALUE.
This OFFSET_VALUE you can maintain in a table of your choice and you can write the logic in this
method to get that number.
Rule for One of Data Objects Referring to the Same SubGen Does Not Work
Scenario:
A few data objects referring the same SubGen data object. A rule for one data object works, but a
similar rule for the other data object doesn’t work. Deactivation of this non-working rule doesn’t
trigger anything.
Solution:
Before importing a new version of rule, deactivate an old version of this rule in target client of the
target system. Otherwise the instances ruled by the old version stay. You can check in
SMMW_RULE_HDR table.
Multilevel Node Association
Scenario:
Data Object A has a distribution model by device user. Data Object B has a node association with
Data Object A, which works. Data Object C has a node association with Data Object B which
doesn’t work.
Solution:
Make sure that there is dependency between Data Object A (leading) and B (following), as well as B
(leading) and C (following). Important to know leading data object node can be either a header or a
child node, but following data object node must be a header node.
Normal Rule versus Dependency Rule
Scenario:
There are two Data Objects A and B, and each Data Object has a rule based on a User ID. Data
instance of B is distributed even if dependent object A instance is not distributed to the device.
Solution:
Create a dependency between Data Object A (leading) and Data Object B (following) and create an
association based on a User ID.
DOE Data Modeling - Best Practices
June 2012 13
Some Data Objects are not Getting into Outbound Queue
Scenario:
Some data objects are not flowing to outbound queue of device, even there are dependencies
defined from these data objects to leading data objects, and data is available in CDS.
Solution:
If a dependency rule in a distribution model is not active in runtime, dependency is not getting
calculated. If you want the data in AT tables for all the following data objects, do not have
dependency rules at all, or keep only the dependency rules and activate them.
If we have only dependency the dependency related records for the following data object will go to
the device, but if we have dependency and on dependency rule also the data which satisfies the
dependency also will not go if the dependency rule is in deactivation mode.
Newly Created Attribute Is Not Sent To a Device
Scenario:
A data object (category receiver-generation) has been added a new child node. ("code groups").
However, the code groups are not sent to the devices.
Solution:
This is because you have made the USER as Single Value Attribute, but it should be Multi Value
Attributes.
Refer to: Using Receiver Generation Data Objects in SAP NetWeaver Mobile
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60cb74ba-3480-2c10-
e383-9fefe665af60?QuickLink=index&overridelayout=true&44976897771935
Assigning Multi Value Attribute to Bapi
Scenario:
To generate mass devices, we have created a RMM Customizing Group with some single value
attributes and a multi value attribute, USER. A data object association which should be filled
automatically by bapi. However, multi value attribute could not be assigned with our bapi.
Solution:
To assign a multi value attribute using receiver generation, then there has to be an association as
well from the RMM to the receiver generation data object just like single value attributes. The only
difference is that for multi value attributes, you should create a child node to your receiver
generation Data object and then map is to the multi value RMM attribute. Without having
associations to the custom groups and receiver generation Data Object, the attributes will never be
filled.
Since above scenario has child node to hold multi value attributes, implementation of a GetDetail
BAPI wrapper to fetch the data from the backend is necessary. Ideally, in the backend, you should
have 2 tables, one each for the root node and child node. The root node can contain values for
single value attributes. The child node contains values for multi value attributes such as the users
(multi value attributes) of the device or DMSWCV's that you want to assign to the device. Also you
will have to maintain a foreign key relationship between the 2 backend tables just like any other
normal table.
DOE Data Modeling - Best Practices
June 2012 14
Data Is Not Sent To a Device Immediately
Scenario:
When a new organization is assigned to a user by adding entry in a data object, the dependent data
like customer are correctly added to the outbound queue and can be synchronized. However, the
data added to the entry is actually missing from the outbound queue. In the middleware tables
(CDS, shadow tables and RR-tables) everything is fine. If one triggers recovery on this data object,
all entries, including the newly added one, is correctly put into the outbound queue.
Solution:
The DO_SYNC_EXTRACT parameter was not set for this data object. From the Data Orchestration
Engine Admin and Monitoring Portal, go to Configuration DOE Configuration DO_SYNC_EXTRACT and specify this data object name with text value, X. You can also check it in
the table SMMWPARAMVALUE.
The Realignment of Data to Devices Does Dot Work Correctly
Scenario:
Correct cascading is defined in data model and all data is present in CDS, but missing in
realignment table for device.
Solution:
Issue came up by the time when the configuration DO_NOT_CHECK_PARENT was set for the data
objects. This configuration can be set only for those data objects for which cardinality is 1:1, and
header to header from parent to child data object while the data objects in the scenario have M:1
relation. Because of this misconfiguration, DOE will not be able to calculate if the dependent DO
instance which should be removed not. While removing the following DO instance from the device,
DOE first checks whether it has some relation with some other instance of parent DO. The same
check was not done as the configuration DO_NOT_CHECK_PARENT was switched on.
Performance Issue with Large RR*AT
Scenario:
With large RR*AT more than 20,000,000 entries, nothing works anymore, and database access is
too bad.
Solution:
Build dummy small header object, and perform test before running with full data and the max
numbers of devices.
DOE Data Modeling - Best Practices
June 2012 15
5. Related Links
General
Managing DOE models on a production server of NetWeaver Modile 7.10
http://scn.sap.com/people/ashwani.kumar/blog/2010/12/27/managing-doe-models-on-a-
production-server-of-netweaver-mobile-710
FAQ for NetWeaver Mobile 7.10 - Modeling, Deployment, Testing -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10de86e2-41d0-2c10-7e96-e9337967f7fe
Configuration Parameters in DOE (for optimal performance)-
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00428b89-aada-2d10-
93ab-b913cb57545c?QuickLink=index&overridelayout=true&49873160296172
Understanding the Transports of DOE Objects -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22717
Data Objects
Data Object Introduction - http://weblogs.sdn.sap.com/pub/wlg/13601
Extending the Mobile Application Data Model -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22587
BAPI Wrappers as Data Objects - http://weblogs.sdn.sap.com/pub/wlg/16958
Receiver Generation- Automatic Device Creation in NetWeaver Mobile 7.1 -
http://weblogs.sdn.sap.com/pub/wlg/16887
Data Object Introduction - http://weblogs.sdn.sap.com/pub/wlg/13601
Extending the Mobile Application Data Model -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22587
Multi Language Support using Extract Rule -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00cbb9d-9fcf-2c10-fbbb-dc66833e7ca0
How to use Conflict Detection Mechanism in DOE -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0f5c880-96d2-2c10-168c-8336f25189fe
Using Receiver Generation Data Objects in SAP NetWeaver Mobile -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60cb74ba-3480-2c10-e383-9fefe665af60
Creating Data Model using Bapiwrapper Wizard in DOE -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/309f0f26-ccc4-2d10-5099-e26050c47cf4
How to Guide CDS Deletion and Retrieval -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b08e22c7-4e00-2e10-2ab1-bb1c7c2d0909
Distribution Modeling
Distribution Rules: Steps for Creation/Types of Rules - http://weblogs.sdn.sap.com/pub/wlg/17024
Node Associations - In Data Objects and Dependency - http://weblogs.sdn.sap.com/pub/wlg/17163
Distribution Modeling in Data Orchestration Engine - 1 - http://weblogs.sdn.sap.com/pub/wlg/15697
Distribution Modeling in Data Orchestration Engine - 2 - http://weblogs.sdn.sap.com/pub/wlg/15886
Distribution Modeling in Data Orchestration Engine - 3 - http://weblogs.sdn.sap.com/pub/wlg/16900
Distribution Modeling in Data Orchestration Engine - 4 - http://weblogs.sdn.sap.com/pub/wlg/16925
Distribution Modeling in Data Orchestration Engine - 5 - http://weblogs.sdn.sap.com/pub/wlg/17132
DOE Data Modeling - Best Practices
June 2012 16
Distribution Modeling in Data Orchestration Engine - 6 -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17337
Distribution Modeling in Data Orchestration Engine - 7 -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17338
Distribution Modeling in Data Orchestration Engine - 8 (Node Level Filter Rules) -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22264
Performance aspect of Distribution Rule modeling in Data Orchestration Engine -
http://weblogs.sdn.sap.com/pub/wlg/16919
Distribution Modeling in Data Orchestration Engine: Conditional Dependency -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22157
Distribution Modeling in Data Orchestration Engine: Dependency with Dependency Rule -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22155
Distribution Modeling in Data Orchestration Engine: Dependency and Dependency with Static Filter
- http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22154
Usage of Contains Pattern(CP) Operator in Distribution Rule -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20853
Date Pattern Rules in SAP Netweaver Mobile -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d090377a-27e8-2d10-7886-d001a320497c
Dynamic Data Distribution in SAP Net Weaver Mobile 7.10(DOE) using Subscription Generation -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90709d81-23d5-2d10-958f-cd1cd9be976b
Extending Distribution Models in SAP Netweaver Mobile -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0442f1b-77ea-2d10-2a88-a3e43fba5142
How To: Field Services 2.0 Mobile Application – Change of Data Distributed to Clients -
http://scn.sap.com/docs/DOC-27527
Backend Adapter
BAPI Wrapper Options for Confirmation and Rejection - http://weblogs.sdn.sap.com/pub/wlg/16796
SAP NetWeaver Mobile 7.1 - Transfer of files using attachments -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14960
Developing and using "Get List" BAPI-Wrappers with 'Mass Data' in DOE -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50fa3a06-8bcb-2c10-1daf-c604a4880361
Association Pull feature of SAP NetWeaver Mobile-
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/202281e1-0fbf-2c10-d282-833e90c34d99
DOE's Attachment Capability - with a Sample Application -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f06f0dc5-f6a9-2c10-f691-821eccc1b198
Guide to use Instance Push - http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0bef031-a2a3-
2d10-bba4-cbb0834ff548
Using ‚Adjust Adapter and Dataobject‛ to Alter the Data Object Structure and Adapter Mapping -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40725b78-c0e5-2d10-158d-8da369af8986
Semantic Compression in NetWeaver Mobile 7.1 -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9017fbcf-77c9-2d10-8cbb-d2b63999fcb7
Using Default Values in Backend Adapter -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d009a3c8-9ecf-2d10-9fb6-d91d10c8670c
Create applications using Binary Memo and Text Memo in NetWeaver Mobile 7.1 -
DOE Data Modeling - Best Practices
June 2012 17
https://www.sdn.sap.com/irj/scn/wiki?path=/display/mobile/Create+applications+using+Binary
+Memo+and+Text+Memo+in+Netweaver+Mobile+7.1
DOE Data Modeling - Best Practices
June 2012 18
6. Appendix This section is only applicable for the application using DOE with Gateway 1.1 to NW Mobile (e.g.
SAP CRM Sales.)
With Enhanced Distribution Model
When a customer enhanced their distribution model by creating a new DMSWCV, assign this new
DMSWCV in Runtime Projection & Header within the ESDMA Modeler. In this case, the customer
need not download the bundle again nor need not deploy it again.
With Enhanced Data Model
When a customer enhanced their data model, for example adding a new data object, node, or field,
generation of data object and backend adapter creates a new version of the objects. After the
generation new version of data object shall be included in the ESDMA and also generate the ESDMA.
The generation of ESDMA creates a new version of ESDMA which is almost equivalent to a new
application. Download the new bundle for the newly changed ESDMA and deploy it again to use the
latest version.
Tips
Nodes within the data object are restricted to two levels for the application using DOE and
Gateway to NW Mobile.
Configure backend search RFC’s for ESDMAs that have backend search BAPIs configured.
Otherwise, the activation/generation of the ESDMA will fail.
If you assign a custom DMSWCV to ESDMA instead of standard distribution model, the
amount of data of an object may affect the performance of the distribution rule.
To pass a device attribute for distribution rule from SUP, create a data object in DOE with
device attributes. Then add a custom service in Flow Definition,
MMW_FLOW_INBOUND_CLIENT_BV for the data object. This custom service allows filling
the device attribute value based on the value sent by a device. Refer to ‚Using Custom
Service in DOE (Data Orchestration Engine)‛ -- http://scn.sap.com/docs/DOC-15196
Assigning ESDMA version to devices via a device profile is not supported. Attempting to do
so may cause ‚DUMP_IMCOMPATIBLE_OBJECTS‛ error at distribution model generation.
To assigning gateway related channel to the device or to assign ESDMA version in one of the
device attribute, ESDMA name and version must be provided in a receiver generation object.
Add a column to the receiver generation object node to assign ESDMA name and version
(CHAR57) concatenated by pipe (|). Change the value of the newly added column if ESDMA
needs to be changed for the device.
Child data will be sent even after removing a child node in a data object in an ESDMA runtime
projection per design, because ESDMA has two projections with a default which contains all
nodes and runtime projection with some of the nedes deleted. Currently application uses
runtime projection. In this case, at least SYNCKEY and PSYNCKEY should be part of the
message. These are key fields in DOE perspective. After some time, if the projection is
changed to Default projection then for the child items which are filtered previously using
runtime projection, it should be able to process the data in case of update or delete. If this
message would have not sent previously then application can't update the record with child
item details.
DOE Data Modeling - Best Practices
June 2012 19
[Specific to SAP CRM Sales enhancement] Without CUSTOMIZATION object, SAP CRM
Sales application status will not turn to "Initialized". To MAS_CUSTOMIZATION with only
‚Node Level Filter Rules‛ to work, create a bulk rule on the header node of
MAS_CUSTOMIZATION.
ESDMA Configurations
Runtime Projections and Headers
Runtime projections and headers are subset of design time projections and are client dependent.
Runtime projections can be defined for each client (mandt) of the system.
Overriding the assigned DMSWCV option is particularly useful when the customer decides to add a
new distribution pattern to the already shipped model. The scenario is that the customer first
evaluates the data model and distribution pattern shipped by SAP/vendor.
During evaluation, customer realizes that the default distribution pattern shipped does not suit
their needs. In this case, the customer creates their own distribution pattern by creating their own
SWCV and using the Data Objects shipped by SAP/vendor.
Since the Data Model itself is not changed, a new ESDMA does not need to be created to point to
this newly created DMSWCV. Instead, the old ESDMA can be changed to point to this newly created
DMSWCV using the Assign DMSWCVs option.
Device pre prepared functionality
When subscription happens from the device, it can be configured such that the logical device on the
DOE gets created automatically or an existing logical device be used. The latter explained scenario
is known as the device pre prepared functionality. This functionality works based on the
configuration as follows,
Parameter Key: DOE_CONNECTOR
Parameter name: CREATE_DEVICE
Validity area: ESDMA Trans id
Text value: ‘X’ – the device will be created automatically. If the value is not set, DOE will try to
search for an existing logical device for that user. If it finds a device, that device will be used else a
new logical device will be created.
DOE Data Modeling - Best Practices
June 2012 20
Device pre prepared scenario is useful in cases where in the customer would like to use receiver
generation Data Object to create the logical devices beforehand. Main advantage of this
functionality is that the initial data for each device (user) is prepared and kept ready. That is, the
rule evaluation in done and the data is available in the pending extracts. During subscription,
extract is triggered and the data is sent immediately to the device. This functionality can be used in
cases where the initial data volumes are huge and the time spent on rule evaluation can be saved.
Release ESDMA option
This option is used to freeze the version of the ESDMA. By freezing the ESDMA, no further changes
can be done to the ESDMA in terms of adding/removing Data Objects, DMSWCV’s and backend
search function modules. Again, similar to finalizing the data model, ESDMA should be finalized
when a version of the ESDMA becomes productive. If the ESDMA is not finalized after becoming
productive, intentional/accidental changes to ESDMA will cause runtime errors. Hence, it is always
a good practice to set this option as soon as a version becomes productive.
Related Links
FAQ on Mobile Gateway and DOE - http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/100e73bd-
b724-2f10-cbae-87475b60257f
Sybase Unwired Platform Version 2.1 -
http://www.sybase.com/files/White_Papers/SYBASE_SUP_2.1_Architecture_WP.pdf
Runtime Configuration in ESDMA Tool -
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22499
ESDMA Runtime Header - http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22507
ESDMA Design - http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22494
Backend Search Functionality - http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22495
MGW Configuration Parameters - http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d28375-
7cf2-2e10-f6b5-fec94a5509ce
How to use Prepared Device for Gateway to NW Mobile -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20055ce4-d09f-2e10-55a4-deb485cf9000
www.sap.com/contactsap
www.sdn.sap.com/irj/sdn/howtoguides