Offline introduces a new feature in 2010 - the ability to enter free text in Offline that can subsequently be populated into an SAP long text field. Long text can be entered on any Offline screen - even pop-up screens and there are no restrictions on the number of characters that a user can enter. This section will cover the management of bulk data entry and management. Topics covered include:
- Creating Long Text
- Uploading and Downloading
Long text has a similar syntax to that used in edit fields. However, long text fields contain an extra parameter 'edheight', as shown in the syntax below:
{{type:SCR_EDIT,label:"Item Long Text:",position:{row:5,col:5,edcol:6,edlen:131,edheight:9},fieldname:"itemLongTextEdit",style:EDIT_STYLE_READONLY},
There are two styles that can be used with long text fields. These are the following:
- EDIT_STYLE_READONLY
- EDIT_STYLE_NORMAL (This is the default value, if no style is specified)
Creating Long Text
To implement long text in Offline, users must use the column type 'DBF_TEXT' when creating the database. Text is separated by using the '/n' delimiter. In the following example, we are creating a new long text field:
{fieldname:"itemLongTextEdit",fieldtype:DBF_TEXT,keytype:DBT_NON_PRIMARY_KEY,columntitle:"Confirm Long Text",columnwidth:19,columntype:CTRL_TABLE_STATIC},
Uploading and Downloading
Synactive uses custom proprietary functions to perform the upload and the download operations between SAP and the Offline database. These functions will be included in the SynR3.JS file and will be included into the generic upload and download functions in future releases as well.
Uploading Data to SAP
To upload data to SAP, the user types in long text on long text controls, and these are saved into db columns with type DBF_TEXT as demonstrated above. During the upload process, these long text blobs are split into strings of 72 characters each.
Downloading Data from SAP
When downloading long text data from SAP, the long text comes as strings of 72 characters from either a Function Module or from a text file. These strings are then combined depending upon the key columns.
For example, all the long text strings that belong to the same order, operation, sub operation can be combined together and downloaded into a column which has type DBF_TEXT.