Linking applications  Restrictions

Chapter 4: Advanced Application Creation

Complex transactions

You can link applications to support complex transactions. These linked applications must be related and processed as such by both the server code and the client user interface. To accomplish this, each of the linked new components is associated with a level attribute.

This example illustrates the concept of level attributes:

A Customer Account application is associated with Contacts and Opportunities. Contacts and Opportunities do not exist without an Account. In terms of database entity-relationships, Account (ID) is a foreign key for Contact and Opportunity creation. Users are required to first create an Account, then create Contacts and Opportunities, which must then be associated with the Account created.

In this example, Account creation is a Level 1 operation and Contacts and Opportunities are Level 2 operations. Results (key) from Level 1 (new Account ID) are used in Level 2 operations (Account ID is a foreign key for Contact/Opportunity creation).

In SAP applications, when you link a new application, Mobile Web Studio shows it as a Level 1 application then silently queries the application to determine if it has input tables. If it does, hidden Level 2 items are automatically generated for each input table. When the insert application is synced to a mobile device, the mobile client automatically generates 2nd level inputs for each table. When the sync update is performed, the 2nd level data is gathered and passed into different rows in the SAP table.

NoteIn update applications all parameter names must match the column labels from the parent table. When syncing an application, UA looks at linked update applications and walks down their list of update parameters to match them with label names in the parent table. If it doesn't find a match for every update parameter, it ignores the update application and you do not get an Edit button.





Copyright © 2005. Sybase Inc. All rights reserved. Restrictions

View this book as PDF