...
Tip |
---|
|
It is highly recommended to mark the Use Data Model from the Properties sections and use the FAB Data Model Node in building up the fields, structures and tables list. The fields from the FAB Data Model Node will still have to be assigned to the Bound Field of the relevant control element. This will in turn create the same field list in the Fields Area Section like what has been exhibited in the above example.
Info |
---|
Synchronize the fields in the Data Model Node from the fields in the Fields Area Section by using the option Adopt from Fields and Tables as shown below
|
FAB Data Model Node is similar to the Fields with the following additional characteristics: - Allows hierarchical/nested data model that provides a more logical definition.
Root Node
- Customer - Individual field of type string
- Orders - Table for Order header
- OrdersStruct - Structure holding the Order header fields
- OrderItems - Table for Order items
- OrderItemsStruct - Structure holding the Order items fields
- Fields can be referenced to SAP Data Elements
- More fine-grained definition of model field properties (example field OrderDate is a Date in one part of the model, but String in another part).
Advantages of using the FAB Data Model Node How to use the FAB Data Model Node. - Mark the Use Data Model in the properties of the application
- Right click on the Project and select Add Data Model
- Right click on the Root Node and select either of the following:
-Add Field - to add individual fields -Add Structure Type Node - to add structures -Add Table Type Node - to add table types -Adopt from Fields - choose this option to copy the Fields into the Data Model Root Node
- Assign the Data Model field into the Bound Field of the control
- Access the fields in Javascript using the FAB delivered functions and in FAB User Exits by referring to the variable CR_DATA
Note: If the Data Model is not selected in an app, and the option 'DoNotSave' is checked in the bound field of an input field, the data entered onto that particular field doesn't get saved in the backend table /IQX/FORMS_INST.
|
Sample FAB Application
Upload this XML file in the FAB Workbench (TCODE /IQX/FAB)
View file |
---|
name | ADAM_DEMO_DATA_MODEL_000001.xml |
---|
height | 250 |
---|
|
Create a class in SE24 with the name YCL_ADAM_DEMO_DATA_MODEL. Once created, switch the Class in Source Code-Based mode by clicking on then copy and paste the code from the file below. Activate the class
View file |
---|
name | YCL_ADAM_DEMO_DATA_MODEL |
---|
height | 250 |
---|
|
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@223dfe |
---|
showSpace | false |
---|
sort | title |
---|
type | page |
---|
cql | label in ("properties","app-life-cycle","fabworkbench") and type = "page" and space = "IFAB" |
---|
labels | list-control |
---|
|
...