Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Mobile App
This document provides suggested naming conventions for objects created in
the Agentry Editor. Application developers and maintainers are strongly
encouraged to follow these conventions in pursuit of the goals listed below.
Applicable Releases:
Agentry 5.X and 6.X - which Includes all SAP based mobile
products running on Agentry
Version 1.0
TABLE OF CONTENTS
SECTION 1: AGENTRY NAMING CONVENTIONS ......................................................................................... 5
Goals ................................................................................................................................................................. 5
General Naming Conventions ........................................................................................................................ 5
SECTION 2: NAMING CONVENTIONS FOR BUSINESS OBJECTS & PROPERTIES ................................. 5
Objects .............................................................................................................................................................. 5
Properties ......................................................................................................................................................... 6
SECTION 3: NAMING CONVENTIONS FOR SCREEN SETS & SCREENS .................................................. 7
Screen Design .................................................................................................................................................. 7
Screen Sets ...................................................................................................................................................... 7
Naming .............................................................................................................................................................. 8
Screens .............................................................................................................................................................. 9
SECTION 4: NAMING CONVENTIONS FOR ACTIONS ............................................................................... 12
Naming ............................................................................................................................................................ 12
Transmit Actions .............................................................................................................................................. 15
Navigation Actions ........................................................................................................................................... 16
Navigation Actions ........................................................................................................................................... 16
Looping Actions ............................................................................................................................................... 16
Apply Steps ...................................................................................................................................................... 16
For Object ........................................................................................................................................................ 17
Grouping .......................................................................................................................................................... 17
SECTION 5: NAMING CONVENTIONS FOR RULES ................................................................................... 18
Naming ............................................................................................................................................................ 18
Groups ............................................................................................................................................................ 22
General Best Practices ................................................................................................................................. 22
SECTION 6: NAMING CONVENTIONS FOR TRANSACTIONS ................................................................... 25
Transactions .................................................................................................................................................. 25
Naming ............................................................................................................................................................ 25
Properties ........................................................................................................................................................ 26
Merging ............................................................................................................................................................ 26
SECTION 7: NAMING CONVENTIONS FOR FETCHES AND READSTEPS ............................................... 26
SECTION 8: NAMING CONVENTIONS FOR STEPS .................................................................................... 28
SECTION 9: NAMING CONVENTIONS FOR ACTION STEPS ..................................................................... 29
Globals ............................................................................................................................................................ 29
General ............................................................................................................................................................ 30
Naming ............................................................................................................................................................ 30
Groups ............................................................................................................................................................. 30
Usage .............................................................................................................................................................. 31
SECTION 10: NAMING CONVENTIONS FOR COMPLEX TABLES ............................................................ 32
Naming ............................................................................................................................................................ 32
Fields ............................................................................................................................................................... 32
Indexes ............................................................................................................................................................ 32
SECTION 11: NAMING CONVENTIONS FOR DATA TABLES .................................................................... 33
Data Tables ..................................................................................................................................................... 33
Naming ............................................................................................................................................................ 33
Images ............................................................................................................................................................. 33
General ........................................................................................................................................................... 33
SECTION 12: TAGGING ................................................................................................................................. 34
General ............................................................................................................................................................ 34
Styles .............................................................................................................................................................. 34
Naming ............................................................................................................................................................ 34
SECTION 13: NAMING CONVENTIONS FOR JAVA CLASSES .................................................................. 35
Naming ............................................................................................................................................................ 35
Extending Java Classes ................................................................................................................................ 35
SECTION 14: SAP DEVELOPMENT NAMING CONVENTIONS .................................................................. 37
Goals
There are several goals that can be achieved through the use of naming conventions. They include:
1. Program maintainability Whenever someone other than the original application author needs to
make changes to an Agentry application, the learning curve is reduced if they know how objects
relate to one another and how they are used.
2. Design Assistance An application developer can use naming conventions as a design aid to help
think abstractly. If a particular step or rule can be easily named, it is more likely to be designed well.
Conversely, any difficulty in naming an object might lead a developer to reconsider the design
approach.
3. Consistency Naming objects using predictable convention increases usability. Rules and actions
can be sorted on screen, which will group similar rules together. Similar named screens, transactions
and actions are recognizable as related entities. It makes it easier for someone other than the
original author to understand and familiarize themselves with the application at hand.
Where possible, use the name of the data source. For example, if the object maps to a database
table, use the database table name.
If the data source has an obfuscated name, use common sense and name it for what it is.
Example: MobileFM has a phase table called ae_p_phs_e which is certainly more clearly
understandable if the corresponding Agentry object is named Phase
Properties
Abbreviations should be avoided, but if necessary should be consistent across all objects and
other definitions.
If working on a particular group of objects that are related, Try to preface those object names
with the common group name. For instance, If working on a Stock component with many related
stock objects like TransferHeader, TransferItem, TransportOrderHeader then preface these with
the Stock component name:
o StockTransferHeader
o StockTransferItem
o StockTransportOrderHeader
o
o
o
o
o
o
o
Avoid property types that have no meaning at the object level. Choosing these types may cause
problems when trying to polymorph them into other types on transaction screens or auto (silent)
transactions. Rather these types should be assigned at the screen level:
o Complex Table Selection Choose String instead on Object
o Data Table Selection Choose String instead on Object
Do not hard-code minimum and maximum boundaries for numeric values or string lengths:
o Use Globals that can be overridden
Suggested names:
Lngth.WorkOrderDescriptionMin
Lngth.WorkOrderDescriptionMax
Lngth.ReadingMin
Lngth.ReadingMax
IsLocal
o It is typical for the local state of an object to be referenced and for other business logic in
the application or backend code to rely on this local state being accessible
o Local means that the object has been newly created on the client and has not yet been
transmitted to the backend system.
Acceptable approaches to this:
Key Preface and Evaluation Rule
o Preface the key property assignment with a constant string
stored in a global, like: LOCAL_
o Create an Evaluation rule for each object that compares the
start of the key property to the local global to see if they match,
and returns a True response if so
o Drawbacks of this approach:
Multiple Evaluate rules must be created if each object
uses a different key name
A backend method must be created to make a similar
comparison
IsLocal Boolean (Preferred)
o Create an IsLocal Boolean in each object
o Set this property to true in the Add transaction
o Create a single Evaluate rule that checks the IsLocal property
regardless of object type and returns True or False
o Drawbacks of this approach:
6
Fields
o
o
o
o
o
o
o
Type
All
Examples
WorkorderList
ItemDetail
ItemDetailForRotatingItem
ItemDetailForLotItem
Naming
Screen Sets should be named using Camel Case/Initial Capitalization and Object-Verb syntax
Screen Set Types
o Add
o
o
o
o
o
o
o
o
o
Fetch
WorkordersGet
ProjectsGet
UserInfoGet
Object
Collection
{ObjectName[plural]}{View}
WorkordersView
ProjectsView
WorkorderView
ProjectView
Transaction
{TransactionName}
WorkorderAdd
Row Tile
{ObjectName[plural]} {Tile}
WorkorderTile
StockTransferHeaderTile
Row Selected
Tile
{ObjectName[plural]} {TileSelected}
ServiceOrderItemsTileSelected
InstalledBaseProductTileSelected
Tile Edit
{ObjectName[plural]} {EditTile}
WorkOrderEditTile
Tile Display
{ObjectName[plural]} {DisplayTile}
WorkOrderDisplayTile
List Tile
Inline
Add/Edit
{TransactionName} {TileInline}
WorkOrderAddTileInline
NotificationEditTileInline
Screens
Screens within screen sets should follow the same convention, and also should include the
Platform abbreviation in the Screen name so it can be easily identified:
o NotificationDetails_Detail_PPC
o NotificationTasks_TileList_Win32
Screens that will be used generically regardless of Platform should be suffixed with All rather
than a Platform; e.g., AddressList_All
Type
Examples
List
WorkordersView_List_Win32
WorkorderDetailsView_Parts_List_PPC
Detail
ProjectView_Detail_Win32
UserInfoView_Address_All
Tile List
WorkOrderDetailView_Partners_TileList_PPC
Rows
o Rows per screen should be consistent by platform throughout the application when
possible to present a uniform look
Columns should be set to 100 regardless of platform. 100 units allow the field column
widths to be thought of as a percentage of the total screen available. This allows for
more precise manipulation of screen fields and makes modifications much easier than if
the screen only supported a small column width
Buttons
o Screen Button names should reflect the Action they are tied to, i.e., The Button tied to
the TaskAdd action should be called TaskAdd
o The Agentry Editor does not automatically change the name of a Button when a new
Action is chosen for it after the Button has already been saved. Keep this in mind and
remember to adjust the button name manually if editing a Buttons Action target
o A single Button Separator on a button list should be named Separator. Multiple Button
Separators should be named with an incrementing top down sequence, e.g.,
Seprarator1, Separator2. For example, if two separators exist on a Button list, the
first in position 2 and the second in position 5, the buttons should be named
Separator1 and Separator2, not Separator2 and Separator5. Button positions
tend to move around, so dont try to imbed the Button order position in the name of the
9
Fields
o
Label Width
Always set the Label Width on all fields. Do not rely on inheriting the width from
the field above. While easier to implement, this is bad practice. If the screen
field order changes, it is easy to mess field label widths up without even
realizing. It is best to always set them and leave nothing to chance
Using a global to set label width is also good practice. That way the width can
be changed by adjusting a single global, rather than having to hard-code
individual fields
Field Order
Make sure that fields are ordered from top to bottom in order of precedence if
there are references or relationships between the fields. For instance, if the
Equipment field cascades off the FunctionalLocation field, the
FunctionalLocation field should appear first in the field list order before
Equipment, even if their screen field positions reflect the opposite. If
Equipment is first in the list in this scenario, you run the risk of the screen fields
not populating themselves properly when the transaction screen is first
displayed for existing data. This happens because Agentry tries to figure screen
fields out in order from top to bottom. Since Equipment comes first and relies on
FunctionalLocation for its data, the Equipment field remains blank because
FunctionalLocation has not yet been initialized due to the incorrect field order
set up by the designer.
Tile Edit/Display Control
This control is used as a host to display/edit transaction data on a traditional
detail screen
These controls host a child Screen Set that actually displays the field data
This control is very useful for displaying details of a Parent Objects child or
related sibling on a Screen Set that targets the Parent, without having to write
convoluted targeting Rules or hard-code Object Browser paths to the desired
Object on multiple Screen Fields. This Control accepts a Target Path that points
to the Object it will be displaying. This way, Detail Screens can be imbedded in
a Parent Screen Set, each easily targeting different Objects if desired by using
Tile Edit/Display Controls
Keep in mind that this Control is initialized when the host Screen is displayed.
The Transaction (Tile Edit) or Object (Tile Display) gather their display data
immediately, and are not updated if outside Transactions modify the underlying
Object. Detail Screens normally update themselves when the Screen Sets
targeted Object is changed, but this is not the case with these Tile Controls.
This has been logged as Agentry Bug #31810 - Tile Edit control does not update
fields if underlying object is changed
The row height on the child tile can be optionally modified to shrink the rows if
more space is needed for PPC. Use a negative number to shrink the rows. For
example, use -2 to shrink the rows by a small margin
Use the SCREENFIELDVALUE Rule Function Term to reference other fields in
Complex Table/Update Rules on the actual child Tile Transaction Screen prior
to Agentry release 5.2.4.0. This is currently the only confirmed way to do this
prior to 5.2.4.0. References using the screen set or current screen do not work
properly. This has been corrected in: Details for #31049 - Tile Edit control
working inconsistently with cascading complex table fields in Agentry 5.2.4. It is
10
now possible to reference the Child Tile Screen Set/Screen/Field and properly
access the data stored in these fields. For example, a child Complex Table field
must reference another parent Field to build a parent string via a Rule. The
Screen Field is called PartCodeGroup. The following Rule can be used to build
the parent string. Notice that the PartCodeGroup Field is accessed using the
Screen Set and Current Detail Screen syntax, making this Rule compatible
with any Platform:
When this Control is in edit mode, you will see the Cancel and Save buttons
appear in the lower-right corner of the Tile. Notice also that any Action Buttons
on the Screen or Screen Menus become disabled by default. This is an option
on the parent Screen Set that hosts the Tile Edit Control called Transaction
Blocking. When toggled on, all other Actions are disabled while the
Transaction is being edited. If toggled off, Agentry does not restrict the use of
other Actions during the edit, possibly leading to conflicts. Turning this feature
off is not recommended unless careful design planning has been done to
prevent the same object being edited at the same time
This control will also automatically save a Transaction in edit mode if the parent
Screen is closed, or if the parent Object is changed via a Roll Button. This may
be confusing or undesired behavior, so leverage the use of this Control with that
functionality in mind. A bug has been logged to request that this auto-save
become optional: Details for #31054 - Tile Edit control saves the transaction
instead of canceling the edit during certain situations
11
Refer to the Product Style Guide document for more specific information on Tile related
controls, styles and best practices
o
o Sub-Action Steps
Type
Examples
All
PartAdd
Looping
Actions
{actionName} {Loop}
o Transaction Steps
Name these identically to the Transaction:
Used: to initiate one or a series of transactions
1. Use {Verb}{Object} syntax
2. Where possible, the Verb should correspond to the label of the UI interface element that initiates the
Action that calls the transaction (that lives in the house that Jack built)
3. Where possible, the Action name should be identical to the Transaction name that it calls.
Ex: If I have an Edit Button that calls the EditWorkorder Action, my transaction name should be
EditWorkorder as well.
Type
mapped to a
{Verb}{Object}
single transaction
mapped to a
series of
transaction
Type
Examples
EditWorkorder
DeletePart
UpdatePOLineItem
Examples
mapped to a
single
transaction
{Object}{Verb}
WorkorderEdit
PartDelete
mapped to a
series of
transaction
POLineItemUpdate
o Message Steps
Type
All
Examples
[Object]{Prompt}{Condition|Description} MaterialRequestPromptAlreadyLocked
ReservedItemPromptCannotEdit
PromptCannotProceed
TaskPromptConfirmDelete
NotificationPromptVerifyComplete
o Apply Steps
Type
All
Examples
Apply1
14
Type
Examples
Apply2
o
Type
Navigation Steps
These should be named simply with the Screen Set name to be navigated to:
Navigation Actions
viewXXX
Naming convention syntax
Examples
Exit App
ExitApplication
ExitApplication
Navigation
{Screenset|Screen}View
WorkorderDetailView
MainScreenView
TimeSheetListView
Type
All
Examples
PrintSalesReport
o Transmit Actions
Type
TransmitXXX
FetchXXX
Examples
Sending
[Silent|Background][{extra desc}]
information
Transmit
to the server
without a
search
criteria
screen
Transmit
MaterialRequestsTransmit
SilentTransmit
Sending
{ObjectCollection}Fetch|Get
information
to the server
with a search
criteria
screen
WorkordersFetch
PurchaseOrdersGet
Transmit Actions
Used: to initiate server communication
Type
Naming convention syntax
Sending
[Silent]Transmit[{extra desc}]
information to the
server without a
search criteria
screen
Examples
AddressMapGet
DirectorySaveFileMake
Examples
Transmit
TransmitMaterialRequests
SilentTransmit
15
Type
Sending
Fetch{ObjectCollection}
information to the
server with a
search criteria
screen
Examples
FetchWorkorders
FetchPurchaseOrders
Navigation Actions
Used: to go from one screen to another where the target screen does not have a single dedicated function.
Typically, this would be used when navigating to a main list screen or a read only detail screen.
Type
All
Examples
ViewPODetail
ViewWorkorderList
Navigation Actions
Used: to display a UI warning if a particular state exists or condition has been met.
Type
All
Examples
WarnMaterialRequestAlreadyLocked
WarnCannotEditReservedItem
Looping Actions
Used: to iterate over a group of objects
In most every case, a looping action will repeat a particular subaction, so name the looping action as the
plural of the subaction.
Type
All
Examples
AddParts would loop over AddPart
Apply Steps
A single Apply Step on an Action should be named Apply. Multiple Apply Steps should be
named with an incrementing top down sequence, e.g., Apply1, Apply2. For example, if two
Apply Steps exist on an Action, the first in position 2 and the second in position 5, the Steps
should be named Apply1 and Apply2, not Apply2 and Apply5 as would be the Agentry
default. Step positions tend to move around, so dont try to imbed the Steps order position in
the name of the Apply Step. It is also acceptable to always name the first Apply Step as simply
Apply without the 1 suffix, then continue with Apply2 for the second
Apply steps are very time consuming in Agentry, especially on PPC devices. Applys actually
perform the device writes. Try to limit usage of Apply steps. Do not use them unnecessarily as
they will severely impact the speed of your application, especially during looping operations that
create records
When performing looping operations that create many records, do not Apply each transaction
write, but rather Apply them all at once after the loop with a single Apply step
o This technique can be risky depending on PPC device. Some devices will run out of
stack space and crash Agentry, or lock it up, never completing the writes. Be careful
when writing many records with a single Apply and only do this on a device to device
basis after testing the performance. It is not possible to use this technique on some
slower devices or devices with limited RAM
16
o If processing a number of transactions in a row using different action steps, use a single
Apply when possible. You can employ this technique if none of subsequent transactions
rely on saved data from the previous transaction(s)
For Object
Always supply an object in the For Object property drop-down on the Action header. Do not
leave it blank. There are many reasons to do so:
o This is proper object oriented application design. Think of an Action as a method and
the For Object as a parameter to that method. You need to pass the proper target
object type to that method, as in Java or the compiler will throw an error. Following this
standard eliminates mistakes and ensures proper context, as Agentry will throw an error
during Check on Publish if there is a mismatch between a target object and the For
Object that the targeted Action accepts
o Properly sets the context for all steps within the action, making it easy to browse
properties of the current object for further targeting and rule creation
o Leaving the For Object blank or setting it incorrectly can lead to multiple copies of a
screen set being created inadvertently. It can also confuse Agentry and lead to targeting
issues and other problems
o Setting the correct For Object makes for a more readable and easily understood Action
Some Actions dont make use of any Objects: e.g., Transmit, CurrentScreenSetClose. These
Actions dont necessarily need a For Object, but to be consistent should still be assigned one.
When this case comes up, use the MainObject
Grouping
Groups may also be functionality related, in order to keep their size down when there are too
many Actions related to certain objects:
o StockTransfer
o StockReceipt
o StockSearch
17
Type
Examples
2 possible
Determine{Action1 Name}Or{Action2 Name} DetermineStartMaterialRequestOrWarnLocked
branches (ie
do this or
that
More than 2
branches
Determine{Action1 Name}If{True
Condition}
DetermineStartWorkorderIfWorkorderCanBeStarted
Enable
Enable Rule for Actions, Screens in a Screen Set, Fields on a Screen
Recommended Syntax:
EnableXXX
ShowXXX
Type
Examples
Enable a UI
item
EnableStockroom
EnableBinnumEdit
Show a UI
item
ShowPartsList
Type
All
Examples
CalcTotalWorkorders
EvalFirstDayofTheWeek
Type
All
Execute (Exec)
Used primarily as an Execute Rule to determine if a Sub-Action should be run
The Action being executed should not be included in the Rule name. The name
should briefly describe the condition that makes the Rule true, keeping it
reusable and not necessarily tied to a single Action
Naming convention syntax
Examples
Execute{If|When}{condition} ExecuteIfWorkorderDoesNotExist
Type
All
Find (Search)
Used as a Find First Object Where Rule to search a Collection for a specific
Object based on logic
Naming convention syntax
Examples
{Find|Search}{Object
Name}{condition}
FindNotificationMatchingWONum
FindComponentMatchingDeletedTask
Type
All
Type
Missing
Format (Current)
Used to format a string for display on a List Screen, Column Header, Caption
Header, Field Label, Button, Popup Message or Update Rule
Naming convention syntax
Examples
Format{Expression}
FormatWorkorderDetailPane
FormatPartsListHeader
FormatTotalWorkHours
Examples
Format{property}IsRequired{Warning|Err FormatLotnumIsRequiredWarning
19
Type
Examples
required
field
or|Prompt|Message}
FormatIdIsRequiredMessage
Field
value is
out of
bounds
Format{property}{operator}{Value}{Warn FormatQtyAcceptedLessThanZeroError
ing|Error|Prompt|Message}
FormatQtyRejectedGreaterThan100KWarning
Field
Format{condition}{Warning|Error|Prompt FormatOnly1RotatablePartCanBeAcceptedErr
value not |Message}
or
allowed
for
current
state
Type
All
Hide
Examples
Hide[FieldName][If|When{Condition}] HideEqnum
HideWhenEqnumIsNotNull
o
o
Type
All
Highlight
See Style below
Image
Used to dynamically set the Image to be used for a Screen List Column or
Button Control
Examples
Type
Include
Used to include Collection Objects for a Sub-Action Looping Step, List Tile View,
List View, etc
Naming convention syntax
Examples
State
Include{When}{state}
IncludeWhenOrgIDIsNotNull
Condition
Include{If}{condition}
IncludeIfLocationEqualsStoreRoom
Type
All
Type
All
Index
Used to dynamically set the Index to be used for a Complex Table Screen
Control
Examples
IndexEquipmentTileEdit
IndexFLOC
InitialValue
Used to set the initial state of a Transaction Property before or after data entry
Examples
InitialValueLocation
20
Type
Type
All
Type
Type
All
Examples
ParentEqnum
ParentCodeGroupForPart
Style (Highlight)
Used to dynamically provide UI style formatting
Type
Examples
LookupGlobalNotifType
LookupGlobalWOPriority
Parent
Used to determine the Index Parent seed value for a child Complex Table
Screen Field or Complex Table Looping Sub-Action
The name should describe the child Screen Field we are looking up the Parent
for. An optional suffix for clarification is acceptable: e.g.,
ParentEquipmentForNotification
Parent{Screen Field}{extra
desc}
Simple
Update
LookupGlobal
Used to look up a Data Table Global value in the dtApplicationConfig Table
dtApplicationConfig should act as a repository for backend related Globals that
affect client or java functionality. We currently populate this table via a java
routine in SMART WM for SAP and the Customer Service Component. The
data comes from the SAP Config Panel that is part of the SAP architecture. For
example, we maintain the current Work order Assignment Type in
Wo.AssignmentType. We also keep the default Notification Type in Notif.Type.
This way the values can be modified by an administrator via the SAP web
interface, rather than needing to change Globals in the Agentry Eclipse Editor.
The Client then uses these LookupGlobal Rules to access the values and make
logic decisions
LookupGlobal{Global Name}
All
Examples
Examples
StyleHighlightToday
StyleHeaderLabelCoffee
StyleScreenStandard
Update
Used on Screen Fields to override the mapped Object/Transaction value and
instead display formatted data
Examples
InitialValueLocation
Update
Update{property}When|If{Condition} UpdateTotalQtyWhenBackorderGreaterThanZero
given a
condition
or state
Validate
Used in Transaction Validation Rules to pop Warnings/Errors according to
business logic
Recommended Syntax:
ValidateXXX
21
Type
Examples
Test
required
field has a
value
Validate{property}
ValidateLotnum
Test Field
value id
within range
Validate{property}{condition}
ValidateQtyGreaterThan1
Groups
Rules should be placed into Groups matching their type so they can logically and easily be
located
o Enable
o InitialValue
o Update
Another alternative is to apply Groups according to a piece of functionality (Stock, Transfer,
etc), or use both techniques at once:
o StockEnable
o TransferInitialValue
o CustomerServiceValidation
22
Using the Current Property context should be avoided if possible. Always provide the fullyqualified Property name in the Rule, unless required to do otherwise. This is easier to read and
does not confuse Agentry
Unless specifically trying to write a specialized generic rule that will be used in multiple spots
throughout the application, do not use the Current Screen Set context to reference Fields.
Always provide the fully-qualified Screen Set name in a Rule. Doing so may work in certain
circumstances, but not in others. Providing the Screen Set name will work in all cases
o Sometimes the current context syntax can be useful for making rules reusable, e.g.,
Using Screen Set\Current Detail Screen Syntax to create a single Rule for use as an
Update Rule that will function correctly on multiple Platforms within a Screen Set
Create Globals in the application to represent commonly used string checks done in rules. Do
not hard-code these into rules with string Constants, as they cannot be easily identified at first
glance. This also allows for internationalization of a product:
o Application.EmptyString
o Application.BlankSpace
o Text.TrueValue
o Text.FalseValue
Break commonly used routines into Sub-Rules, rather than repeating the code redundantly in
parent Rules:
When writing rules that will be used for displaying text to the user, do not hard-code the English
text in the rule. Rule text constants cannot be overridden using Agentry internationalization files,
forcing them to be changed in the Editor by a programmer. This is not necessarily an easy task
to track down the offending rules. Instead, create Globals that can be easily modified for
international usage. These should be placed into a common group like Text. These Rules
include:
o Validation Message
o Format (Screen Captions, Column Headers, etc)
o Sub-Action Message Text
Parent Rules are used to determine the Index Parent for a child Complex Table Screen Field.
These consist of the values required to seed the Index separated by the Rule NEWLINE
character. Order the properties top down starting with the lowest child in the hierarchy. In the
following Rule, we are seeding the values for the codeByCodeGroup Index on a Screen Field.
codeByCodeGroup has a parent of codeGroupByCatalog which has a Parent of catalog. This
means we must supply 2 parent values in the Rule, starting with the child (codeGroupByCatalog)
and finishing with the parent (catalog):
23
Parent Rules are also used to seed Index values when looping over a Complex Table in a SubAction Step, but these Rules are set for each index individually. This means that compound
statements are not necessary, just one individual value per Rule
24
Properties
o Use {Verb}{Object} syntax
o Key value on a new Add is assigned a unique calculated value using TIME_TICKS
when possible, prefaced by LOCAL_
o Key value may also be set via a Main Object counter variable if necessary
o Key is assigned Before Data Entry when possible
o Display Name has been adjusted to be descriptive
Merging
o All Properties tie back to an Object Property in both Transactions, using dummy
properties if needed in the Object being worked with
o All Properties in the Edit Transaction exist with the same name and data type in the
Add/Edit Transaction to Merge into
Naming
Type
Interaction with
{Object}{Verb}
the user via
screen or
message/validation
Examples
PartAdd
PartIssue
POLineItemEdit
WorkorderDelete
25
Type
Examples
popup
Auto (Silent)
without user
interaction
{Object}{Verb}Auto[additional
description]
WorkorderDeleteAuto
AddressAddAuto
PointAddAutoFromRouteCT
WorkOrderClearAuto
AddressClear
Properties
Key
o
The key of an object is some value that is unique among its peer collection. Usually
when a new object is added, we generate a unique local id for it. This is accomplished
by setting the Initial Value for the object property to Rule Before data Entry and running
a rule similar to:
The above rule combines the string LOCAL_ with a millisecond representation of the
current system time, yielding a unique value on this device. This value if often replaced
with a real back-end value upon posting to another system such as Maximo or SAP, but
it does its job for us locally until that time
o Using Rule Before data Entry ensures that this local ID is available to other transaction
and screen properties during screen data entry and after the transaction is complete.
Always set this value before data entry when possible
Display Name
o Change the Display Names of Transaction Properties to something easily readable and
identifiable where needed. The Property name is defaulted into this field, but this is
most likely a code variable name that wont make sense when displayed to a technician.
Agentry will use this text to display for validation errors concerning field length or
allowable numeric limits
o
Merging
A few rules must be followed when setting up edit transactions so they will successfully merge
with existing edits/adds:
o All properties must tie back to an object property
Do not leave any properties mapped to None. This will cause a merge failure
If necessary, create dummy Properties in the target Object to map values back
to
o All properties in the edit transaction must exist with the same names and types in the
add/edit transaction to be merged into
Do not add any extra properties to the edit transaction or change names of
existing properties. This will cause a merge failure
Same Property names but of different data types will cause a merge failure
o Do not use Change Type on properties
Changing property types is always un-safe and generally should never be done,
even though the editor supposedly supports this functionality. You can easily
cause a merge to fail by changing a property type in either transaction, even if
they match
26
Type
Examples
Fetch
{Fetch|Get}{Object}
FetchWorkorders
GetWorkorders
Read Step
{Fetch|Get}{Object}
{Fetch|Get}{Object}For{ParentObject}
GetParts
GetPartsForWorkorder
27
some other backend external process (printing, emailing, saving a record to the file system,
etc.
o
o
o
o
o
Java Step names should generally match the Transaction or Fetch name calling
them with a Steplet suffix
Java steps should be created using the New or Existing Source Type
Read Steps should not be necessary using the Java Backend
SQL and XML Step Names should generally match the Transaction or Fetch name
calling them. Read Steps should describe the Collection being fetched under the
Parent Object: e.g., GetPartsForWorkOrder
Groups are always assigned and consistently match the related Object or
functionality
This will make the steps more easily readable by a human editor who can quickly see what the back end
process will accomplish without needed to click through to another screen. It will also make debugging easier
since more information will be provided in the debug log files.
In the case of SQL Scripts, the most common case, the backendActionName should describe the action on a
database table (Insert, Update, Delete, Exec, etc) and the affected table name. It may optionally include
extra descriptive information at the end of the name
Type
Examples
SQL Scripts
{SqlScriptName}
UpdatePOLineItem
UpdateMatRecTransPOLineItem
UpdateInvBalancesPO
UpdateInvLotAutokey
InsertInvLot
InsertMatUseTransDirectIssue
Other external
Process
{ProcessDescription}
SaveWorkOrderFileToDisk
PrintWorkorderStatusReport
EmailWorkorderStatusReport
28
Step Type
Step1
Transaction
Step 2
Transaction
Step 3
Apply
Step 4
Transaction
Step 5
Apply
Step 6
Transmit
It is much more user friendly to describe what Step1 through Step 6 are actually doing so that a designer
does not have to click on a step just to see its details
Step Name
Step Type
FinishMR
PrintLabel
Apply
DeleteMR
Apply2
Transmit
Transaction
Transaction
Apply
Transaction
Apply
Transmit
As you can see in the second example, a designer can glance down the step name column and understand
what the action is doing.
Recommendations by Step Type
Step Type
Use
Apply
Exit Application
Message
Navigation
Print Report
SubAction
Transaction
Apply{n}
Exit
Message Caption
Screen Set Name
Print{ReportName}
Action Name
Transaction Name
Globals
A global definition defines a constant value, including data type, for the application. This value can be
referenced throughout the application, both by the attributes of other definition types and for use in
synchronization components. A global value cannot be changed on the Client at run-time but can be
overridden during synchronization.
A global is a constant that is set in the application level in the Agentry editor. You set the Global value in one
place and then reference the global name wherever you need to use that value. This provides a single
change point for a value that is referenced by many other definitions.
When an application change is necessary concerning this Global, the single value can be adjusted, rather
than it being necessary to correct many separate definitions where this is used to enable or disable
functionality. For example, all of our Mobile Products have many features that can be turned on or off or
altered by changing the value of a global. In work manager good examples would be enabling or disabling
parts by setting the value true or false or adding additional statuses to the status list by adding them to the
global.
To set any text string that might need to change if you translate the application into another language
Multi-Purpose Globals are placed into the Application Group, e.g., Application.BlankSpace,
Application.EmptyString
29
o
o
o
o
International Localization strings are in the Text Group, or a Group matching their
functionality or Object
Do not create a Global Group with the same name as an Object. Backend Flunky resolution
conflicts with this. Use an abbreviation or derivation when creating an Objects Group
Put boundary limit Globals into the Lngth Group (Length is a reserved word)
Functionality (Component) related Globals belong to a functionality based Global Group
General
Globals should be used extensively throughout an Agentry application. They not only benefit the
application designer but also the end user and system administrator. Globals are used for:
o Controlling whether certain functionality is enabled or not
o Making an application international by changing the written language
o Helping enforce boundary limits during data entry
o Storing hard-coded constant values like:
Statuses
Error/Warning messages
Backend specific codes
o Acting as a single change point for a value that is referenced by many other definitions.
When an application change is necessary concerning this Global, the single value can be
adjusted, rather than it being necessary to correct many separate definition points
o Lookups in Java code
Naming
Name Globals so that their purpose can be easily identified, avoiding abbreviations:
o FaxTooLargeMessage is good, FaxMsg is bad
o ActivityCatalog is good, ActivCat is bad
o WorkOrderFetch is good, WOFetch is bad
Type
Enable
Functionality
Property Lengths
Functional or
module level
grouping
Group
Enable
Lngth
Module
name
Examples
Enable.EnterTimesheet
Lngth.Notes
WorkorderStatus.Received
Groups
Keeping Globals well organized can be difficult, but is very important. Not being organized will
lead to duplicate unnecessary Globals across multiple Global Groups and can make finding
existing Globals difficult
Globals that are not specific to any particular functionality group but are generally used
throughout the application should be put into a Group called Application:
o Application.BlankSpace =
o Application.EmptyString =
o Application.LocalPrefix = LOCAL_
Place text strings that are used for international localization purposes in a Group called Text:
o Text.None = -NONE-
o Text.PendingDelete = To be deleted
o Text. PhoneTooLargeMessage = Phone and Extension Length cannot exceed
30
o
o
Text.TrueValue
Text.FalseValue
Text strings for internationalization can also alternately be placed in a Group
matching a certain piece of functionality (Stock, CustomerService), or related to a
particular Object (WorkOrder, Task). It is easier to find these though if kept together
under the Text Group
Place Field length minimum and maximum related Globals in a Group called Lngth:
o Lngth.WorkOrderMinLen
o Lngth.NotifDescMaxLen
Place Globals related to a particular object in a Group representing that Object name. Do not
use an exact Object name, as that causes a conflict for the Agentry Flunky parser. This may
involve using abbreviations:
o WO.EnableStartWO = True
o Notif.NewStatus = NEW
o Addr.BuildingMaxLength = 20
o IndObject.TypeObjectComponent = 3
Place Globals related to a particular functionality section in a Group indicating that functionality:
o LaborTime.InProcessDescription = IN PROCESS
o LaborTime.CATSCodeDefault = 01
Usage
Object and Transaction Properties
o Create Globals for Minimum and Maximum string lengths, allowable numeric limits or any
other spot where Globals are allowed
Place these Globals in the Lngth Group (Length is a reserved word)
It is best to create a separate min and max for each property, but sometimes a
property type is re-used in multiple Properties or Objects like a phone number or a
code type. In this case, it is acceptable to create a single Global like
PhoneNumberMinLength and re-use it for all phone number related Properties
Initial Value data constants should come from Globals, not hand-entered text
constants
Screens
o Create multiple Globals for Rows and Columns and use these on each Screens header
UI.Win32RowsTransaction = 20
UI.PPCColumnsTransaction = 100
Screen Fields
o Create multiple Globals for Label Width and use these on each Screen Field
UI.Win32LabelWidthTransaction = 10
UI.PPCLabelWidthDetail = 5
o Some label widths are odd exceptions and these dont always make sense to record as
Globals, e.g., a Screen Field that has a larger than usual label width (20 compared to 12)
used only on one Screen in the application. Use common sense and when you have a
recurring label width, use a Global
31
Rules
o
Complex Tables should be named using Camel case, but with a ct prefix (ctActivityType, e.g.).
Fields
Indexes
Remember to clean up unused Indexes at some point. Add a reminder to the Index definition
when you believe it is obsolete. Extra indexes waste transmit time and storage space on a
device
Indexes with a parent should be noted in the Index name, e.g., DescriptionByKeyField
Display names have been modified to be descriptive abbreviations for Screen/Dialog display
When using a Compound Index, the Unique Index must be the lowest child in the hierarchy
Data Tables should be named using Camel case, but with a dt prefix (dtAccountIndicator, e.g.).
This is a legacy standard that may be eliminated
Images
The Image definition type allows you to incorporate bitmap images into the application and to display those
images in one or more of several different locations. This can include button icons, icons within list controls,
module icons, and images within some of the stock screens within every Agentry application. The Agentry
Editor also allows you to specify a mask color for the bitmaps, if desired. The bitmaps themselves are
external to the definitions on the Editor and are referenced by the Image definition. They are copied
published to the Agentry Server during a publish, and are then transferred to the Clients with the other
application definitions.
General
For images that dont require a Mask color, add one anyway for a color that is not represented
on the Image. Agentry does not properly display Images in certain places if a mask Color is not
specified due to a bug: Details for #19174 Toolbar and List Screen icon images unexpectedly
mask out colors when no mask is specified
When creating an Image to be used for a List Screen Column, the dimensions of each child
Image in the master should be 16 by 16. Add new Child Images to the right, extending the width
by 16 for each new child:
The above image shows 7 children for a Work Order Object, used to display on the status
column in a list. The 8th child is used to indicate a change to the Object that requires a transmit.
The pink background of the needs transmit image is also used as the Mask color for this
master Image, so the pink is never displayed on the Client
The above Images are referenced on the List Screen Column as the Icon Image. Use zerobased numbering to display the correct image via Rule. In our case, we have 8 images, so 0 7
33
Styles
The Style definition is used to modify the appearance of the user interface from the system defaults. This can
include different background and foreground colors; specifying a font face (Sans Serif, Times New Roman,
etc.), point size, font style (underline, bold, etc.), border styles for certain screen controls, and text alignment
(centered, justified, etc.). These styles can be applied to everything from the application as a whole, down to
an individual field or button on a single detail screen, and everything in between. Furthermore, these styles
can be applied to the interface at all times, or conditionally via the use of Rules.
Naming
Type
Examples
Tab
{Tab}{StyleName}
TabClean
Button
{Button}{StyleName}
ButtonClean
FocusedButton
{FocusedButton}{StyleName}
FocusedButtonClean
DetailScreen
{DetailScreen}{StyleName}
DetailScreenClean
Field
{Field}{StyleName}
FieldClean
FocusedField
{FocusedField}{StyleName}
FocusedFieldClean
Hyperlink
{Hyperlink}{StyleName}
HyperlinkClean
ListScreen
{ListScreen}{StyleName}
ListScreenClean
HeaderLabel
{HeaderLabel}{StyleName}
HeaderLabelClean
ColumnLabel
{ColumnLabel}{StyleName}
ColumnLabelClean
Row
{Row}{StyleName}
RowClean
RowHyperlink
{RowHyperlink}{StyleName}
RowHyperlinkClean
AlternateRow
{AlternateRow}{StyleName}
AlternateRowClean
AlternateRowHyperlink
{AlternateRowHyperlink}{StyleNa AlternateRowHyperlinkClean
me}
34
Type
Examples
HighlightRow
{HighlightRow}{StyleName}
HighlightRowClean
HighlightRowHyperlink
{FocusedButton}{StyleName}
xClean
SelectedRow
{FocusedButton}{StyleName}
xClean
SelectRowHyperlink
{FocusedButton}{StyleName}
xClean
DetailPane
{FocusedButton}{StyleName}
xClean
Naming
Type
Examples
Steplet
{TransactionName|FetchName|PushName}{Steplet}
AddWorkorderSteplet
GetWorkordersSteplet
Stephandler
{TransactionName|FetchName|PushName|CT|DT}{Stepha AddWorkorderStephandler
ndler}
POJO
{ObjectName}
Workorder
Item
CATSRecord
{Transaction|Fetch|PushName|CT|DT}{BAPI}
AddWorkorderBAPI
Complex Tables
CT{tablename}
CTParts
Data Tables
DT{tableName}
DTPriority
35
36
Namespace
All Syclo SAP Add-On Objects are developed under namespace /SYCLO/. Whenever youre
modifying objects delivered by base product it is recommended that you copy /SYCLO/
objects into Z or Y name space.
Packages
Syclo SAP Add-On Objects are organized into various workbench packages. All packages under the
/SYCLO/ namespace are predefined. Developer should not create new packages under the
/SYCLO/ namespace. For development purpose, create new packages using Y or Z namespace.
Naming convention is not enforced in Y or Z namespace.
The following packages are defined for the /SYCLO/ namespace:
/SYCLO/ - Main package used to grouping multiple packages. No object can be assigned
directly to this main package.
/SYCLO/CORE Contains objects from Syclo Integration Framework.
/SYCLO/UTIL Objects in this package are for internal use. Not released to customer.
/SYCLO/CO Contains objects related to SAP Controlling Area Module.
/SYCLO/HR Contains objects related to SAP Human Resource Module.
/SYCLO/MM Contains objects related to SAP Material Management Module.
/SYCLO/PM Contains objects related to SAP Plant Maintenance Module.
If youre trying to enhance any of the objects belonging to above packages. Create Z package hierarchy
similar to product package hierarchy.
Classes
Overall design paradigm for the Syclo SAP Add-On Component is based on ABAP OO; therefore ABAP
Object classes are used extensively. Whenever possible, ABAP Object class is the preferred way of
encapsulating business logic. All ABAP OO classes developed should follow the generic naming pattern
/SYCLO/CL_xxxxxxxxxxxxxxxxxxxx, when x represent any alphanumeric character.
37
Where pppp represents the corresponding workbench package name without /SYCLO/
prefix, such as CO, HR, MM, or PM; xxx represents any combination of alphanumeric
characters, which should be indicative of the business object. Maximum length of an ABAP
Object class name is 30 characters.
Persistent Classes
As a rule of thumb, persistent classes should be used to update tables created for Syclo SAP
Add-On Component, with the exception of exchange table update, which can be handled by
Exchange Object Class Handler base class. Each persistent class handles update for a single
transparent table. The following naming pattern should be followed:
/SYCLO/CL_ + pppp + _PERS_ + xx..x
/SYCLO/CA_ + pppp + _PERS_ + xx..x - Generated automatically by class builder
/SYCLO/CB_ + pppp + _PERS_ + xx..x - Generated automatically by class builder
Where pppp represents the corresponding workbench package name without /SYCLO/
prefix, such as CO, HR, MM, or PM; xxx represents any combination of alphanumeric
characters, which should be indicative of the table being updated. Typically xx is the first 9
characters of the name of the table being updated after removing /SYCLO/ prefix. For
example, if the table is /SYCLO/DO001, then xxx is set to DO001. Maximum length of
an ABAP Object class name is 30 characters.
Exception Classes
Exception class is the counterpart of message class in ABAP OO, and is the preferred method
for runtime exception handling. The following naming pattern should be followed:
/SYCLO/CX_ + pppp + _ + xxx
Where pppp represents the corresponding workbench package name without /SYCLO/
prefix, such as CO, HR, MM, or PM; xxx represents any combination of alphanumeric
characters, which should be indicative of the exception. Exception class is a special category
of ABAP OO class, maximum length of exception class name is 30 characters.
38
Interface
ABAP Object Interface is one of the foundations for polymorphism in ABAP OO paradigm, and therefore are
used extensively by Syclo SAP Add-On Component. All ABAP OO interfaces developed should follow the
generic naming pattern:
/SYCLO/IF_ + pppp + xxx
Where pppp represents the corresponding workbench package name without /SYCLO/ prefix, such as
CO, HR, MM, or PM; xxx represents any combination of alphanumeric characters, which should be
indicative of the function of the interface. Maximum length of an ABAP Object interface name is 30
characters.
Function Groups
As a general guideline, business logic of the Syclo SAP Add-On Component should be encapsulated using
ABAP Object paradigm. However due to the technical constraints of the ABAP programming language,
certain tasks still have to be handled using function groups and function modules, such as RFC calls or
update tasks. The following naming pattern should be followed:
39
update, and is the preferred way to handle extension of standard SAP business object update.
The following naming pattern should be followed:
/SYCLO/UPD_ + pppp
Where pppp represents the corresponding workbench package name without /SYCLO/ prefix, such as
CO, HR, MM, or PM. xxx represents any combination of alphanumeric
characters, which should be indicative of the Web Dynpro Component. Maximum length of an
ABAP Object class name is 30 characters.
Function Modules
As indicated in section 6.5, function modules are necessary in order to provide support for RFC calls and
update task. The general guideline is to use function module only as a skeleton, and encapsulate business
logic using ABAP Object classes, and call these classes within the function module.
Where pppp represents the corresponding workbench package name without /SYCLO/ prefix, such as
CO, HR, MM, or PM. xxx represents any combination of alphanumeric characters, which should be
indicative of the business object the BAPI Wrapper that set the first 2 character of xxx to either DT, CT,
or DO to represent whether the BAPI Wrapper is used for data table, complex table, or standard object in
Agentry. mmm represents the function BAPI Wrapper provides, GET for fetch business object data, CRT
for creation of business object, DEL for deletion of business object, UPD for update business object data.
Programs
Programs are created in order to support background process in Syclo SAP Add-On Component. The
following naming pattern should be followed:
/SYCLO/ + pppp + xxx + _PROG
Where pppp represents the corresponding workbench package name without /SYCLO/ prefix, such as
CO, HR, MM, or PM; xxx represents any combination of alphanumeric characters, which should be
indicative of the function of the program. Maximum length of an ABAP program name is 30 characters.
Includes
Traditionally include files can be used in programs, function groups, module pools to make ABAP programs
more modular. With the emphasis on ABAP OO paradigm in Syclo SAP Add-On Component, include files
plays a smaller role. When needed, include file should have the following generic naming pattern:
/SYCLO/ + pppp + xxx + _INCL
Where pppp represents the corresponding workbench package name without /SYCLO/ prefix, such as
CO, HR, MM, or PM; xxx represents any combination of alphanumeric characters, which should be
indicative of the function of the include file. Maximum length of an ABAP include file name is 30 characters.
Common scenarios when include files are used in Syclo SAP Add-On Component:
40
Enhancement Implementation
Enhancement framework is the new concept introduced in Netweaver 7.0 based SAP systems. The
framework provides support for centrally manage all enhancements to SAP system. Under enhancement
framework, enhancement spot identifies the location where enhancement is possible, and enhancement
implementation contains the actual code base with the enhancement logic.
There are two categories of enhancement implementation: composite enhancement implementation, and
single enhancement implementation.
This is the level 2 composite enhancement implementation, where pppp represents the corresponding
workbench package name without /SYCLO/ prefix, such as CO, HR, MM, or
PM; aaaa identify the functionality category of the enhancement implementation. At this time, the only
valid value is EXCH for Exchange Persistency Layer related enhancement
41
This is the lowest level implementation that actually contains the enhancement logic. The
below naming pattern should be followed:
/SYCLO/ + pppp + _ + aaa + xxx
Where pppp represents the corresponding workbench package name without /SYCLO/
prefix, such as CO, HR, MM, or PM; aaa is the abbreviation identify the types of SAP
method where the implementation has been created, for example, BTE for business
transaction event method, BADI for BAdI event, UPD for update task; xxx represents
any combination of alphanumeric characters, which should be indicative of the function of
the enhancement implementation. Maximum length of an enhancement implementation
name is 40 characters.
Tables
Transparent tables created for Syclo SAP Add-On Component should follow the below naming pattern:
/SYCLO/ + xxx
Where xxx represents any combination of alphanumeric characters, which should be indicative of the
function of the table if possible. Maximum length of an ABAP program name is 16 characters. Due to the
length limitation of table name, abbreviation is often used.
Common scenarios when transparent tables are created in Syclo SAP Add-On Component:
Exchange Table
Exchange tables are components of Exchange Persistence Layer of the Syclo SAP Add-On
Component. They contain change detection data for master data or transaction data in SAP
that related to mobile applications. The following naming convention should be followed:
/SYCLO/ + xxx + _EX
Where xxx represents any combination of alphanumeric characters, which should be
indicative of the function of the exchange table, typically set to the technical field name for
the business object key. Maximum length of a transparent table name is 16 characters.
Views
Data dictionary view object allows us to define alternative view of a transparent table (projection view),
combine multiple tables via condition (database view), maintain fields from multiple tables (maintenance
view), or allows search help from multiple tables (help view). The following naming pattern should be
followed:
/SYCLO/ + xxx + _V
Where xxx represents any combination of alphanumeric characters, which should be indicative of the
purpose of the view. Maximum length of view is 16 characters.
42
43
www.sap.com