Restrictions  Creating update links (with conflict resolution)

Chapter 4: Advanced Application Creation

MApp XML (spidered XML) and server code

When you link SAP applications for transaction support, the information from the linked new components is combined with the parameters defined for each of the linked new components to generate a new <insert> XML section that is generated and transferred to the clients (BlackBerry or PocketPc) for rendering.

For the BlackBerry J2ME client, the <insert> XML is added as a new type of child element to the Mapp spidered XML. The <insert> XML is generated and appended to the Mapp XML only if there is one or more new linked components.

Any mobile application created with Create XYZ RFC typically has scalar values and tables as inputs. The number of tables selected for input can be one or more. The changeable scalar values are marked as update parameters. The input table rows/columns are converted to parameters with the X.Y.0 format naming convention.

The naming convention of parameters is used to determine the <insert> XML content of level 1 and level 2 for a linked new SAP component. In the <insert> XML shown below, scalar values such as PO_HEADER, Vendor, and PO_Header.Doc_DATE' are listed at level 1, because this information is critical and required before the creation of a sales order.

The PO_ITEM_SCHEDULES and PO_ITEM are marked as table input items in the mobile application definition, so these are automatically converted into level 2 components. Each unique table (such as PO_ITEM_SCHEDULES and PO_ITEM) in the input definition has its own level 2 in the <insert> XML.

<insert type="sap">    <level id="1">        <app name="PO" wid="211" rid="21">            <Parameter type="TEXT" display_name="PO_HEADER.VENDOR" default_value="0000003910"/>            <Parameter type="TEXT" display_name="PO_HEADER.DOC_DATE" default_value="20050223"/>        </app>        <level id="2">            <app name="PO_ITEM_SCHEDULES">                <Parameter type="TEXT" display_name="PO_ITEM_SCHEDULES.QUANTITY" default_value="5000.000"/>                <Parameter type="TEXT" display_name="PO_ITEM_SCHEDULES.PO_ITEM" default_value="00010"/>                <Parameter type="TEXT" display_name="PO_ITEM_SCHEDULES.DELIV_DATE" default_value="20050228"/>            </app>            <app name="PO_ITEM">                <Parameter type="TEXT" display_name="PO_ITEM.PO_NUMBER" default_value="4100000001"/>                <Parameter type="TEXT" display_name="PO_ITEM.PO_ITEM" default_value="0000003910"/>                <Parameter type="TEXT" display_name="PO_ITEM.PUR_MAT" default_value="3300-113"/>                <Parameter type="TEXT" display_name="PO_ITEM.MATERIAL" default_value="3300-113"/>                <Parameter type="TEXT" display_name="PO_ITEM.NET_PRICE" default_value="123.450"/>            </app>        </level>    </level></insert>

NoteFor offline BlackBerry SAP applications, if you enter 1 or more rows of data for a table, but do not provide input values for every column of the table, default values for those columns are supplied from the sample application data. If you do not want these default values used, then set the default values to empty on the Parameter window in Mobile Web Studio.





Copyright © 2005. Sybase Inc. All rights reserved. Creating update links (with conflict resolution)

View this book as PDF