Update
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
* 3. In the New Service Binding pop-up, make the following entries:
|
||||
* - Name: ZDEMO_ABAP_RAP_CALC_SB
|
||||
* - Description: Service binding for demo
|
||||
* - Binding type: OData V2 - UI
|
||||
* - Binding type: OData V4 - UI
|
||||
* - Service Definition: ZDEMO_ABAP_RAP_CALC_SD (should be already filled)
|
||||
* 4. Choose Next.
|
||||
* 5. Assign a transport request and choose Finish.
|
||||
@@ -72,6 +72,9 @@
|
||||
* The calculation ID which represents the key of the instance has an
|
||||
* initial value. Only when you save the instance to the database, the
|
||||
* final key is set.
|
||||
* The effect of side effects can be explored as follows: Make an entry
|
||||
* in an input field, click another input field (e.g. to make a new entry
|
||||
* there), and check how the value for the result changes.
|
||||
*
|
||||
* ----------------------------- NOTE -----------------------------------
|
||||
* This simplified example is not a real life scenario and rather
|
||||
|
||||
@@ -18,6 +18,9 @@ late numbering
|
||||
field ( mandatory ) num1, num2, arithm_op;
|
||||
static action delete_all;
|
||||
internal action calculation;
|
||||
side effects { field num1 affects field calc_result;
|
||||
field num2 affects field calc_result;
|
||||
field arithm_op affects field calc_result; }
|
||||
validation validate on save { create; field num1, arithm_op, num2; }
|
||||
determination det_modify on modify { field num1, num2, arithm_op; }
|
||||
draft action Resume;
|
||||
|
||||
@@ -1,73 +1,67 @@
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
|
||||
@ObjectModel.semanticKey: ['id']
|
||||
@UI: { headerInfo: { title: { value: 'id' },
|
||||
typeName: 'Calculation', typeNamePlural: 'Calculations' } }
|
||||
@UI: {
|
||||
headerInfo: {
|
||||
typeName: 'Calculation',
|
||||
typeNamePlural: 'Calculations',
|
||||
title: { type: #STANDARD, value: 'id' }
|
||||
}
|
||||
}
|
||||
|
||||
define root view entity ZDEMO_ABAP_RAP_DRAFT_M
|
||||
as select from zdemo_abap_tabca
|
||||
{
|
||||
//FACET SECTION
|
||||
@UI.facet: [
|
||||
{
|
||||
|
||||
// Header Facet (Object Page):
|
||||
|
||||
{ id: 'HeaderFacet',
|
||||
purpose: #HEADER,
|
||||
type: #FIELDGROUP_REFERENCE,
|
||||
//label: 'Calculation ID',
|
||||
targetQualifier: 'Fieldgroup:HeaderItems',
|
||||
position: 10 },
|
||||
|
||||
// Body Facets (Object Page)
|
||||
|
||||
{ id: 'Calculation',
|
||||
@UI.facet: [
|
||||
{
|
||||
id: 'calc',
|
||||
purpose: #STANDARD,
|
||||
type: #IDENTIFICATION_REFERENCE,
|
||||
label: 'Calculation',
|
||||
position: 10 }
|
||||
position: 10
|
||||
}]
|
||||
|
||||
]
|
||||
|
||||
// Element List
|
||||
@EndUserText.label: 'Calculation ID'
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 10,
|
||||
label: 'Calculation ID' },
|
||||
{ type: #FOR_ACTION, dataAction: 'delete_all',
|
||||
label: 'Delete All Persisted Calculations' } ],
|
||||
fieldGroup: [ { qualifier: 'Fieldgroup:HeaderItems',
|
||||
position: 10 } ] }
|
||||
key id,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 20,
|
||||
label: '1st Operand' } ],
|
||||
identification: [ { position: 20,
|
||||
label: '1st Operand' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 10 } ] }
|
||||
num1,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 30,
|
||||
label: 'Operator' } ],
|
||||
identification: [ { position: 30, label: 'Operator' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 20 } ] }
|
||||
arithm_op,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 40,
|
||||
label: '2nd Operand' } ],
|
||||
identification: [ { position: 40,
|
||||
label: '2nd Operand' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 30 } ] }
|
||||
num2,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 50,
|
||||
label: 'Result' } ],
|
||||
identification: [ { position: 50, label: 'Result' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 40 } ] }
|
||||
calc_result,
|
||||
@UI: { hidden: true }
|
||||
@Semantics.systemDateTime.lastChangedAt: true
|
||||
crea_date_time,
|
||||
@EndUserText.label: 'Last Changed At'
|
||||
@UI: { fieldGroup: [ { qualifier: 'Fieldgroup:HeaderItems',
|
||||
position: 20 } ] }
|
||||
@Semantics.systemDateTime.localInstanceLastChangedAt: true
|
||||
lchg_date_time
|
||||
}
|
||||
@EndUserText.label: 'Calculation ID'
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 10,
|
||||
label: 'Calculation ID' },
|
||||
{ type: #FOR_ACTION, dataAction: 'delete_all',
|
||||
label: 'Delete All Persisted Calculations' } ],
|
||||
fieldGroup: [ { qualifier: 'Fieldgroup:HeaderItems',
|
||||
position: 10 } ] }
|
||||
key id,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 20,
|
||||
label: '1st Operand' } ],
|
||||
identification: [ { position: 20,
|
||||
label: '1st Operand' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 10 } ] }
|
||||
num1,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 30,
|
||||
label: 'Operator' } ],
|
||||
identification: [ { position: 30, label: 'Operator' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 20 } ] }
|
||||
arithm_op,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 40,
|
||||
label: '2nd Operand' } ],
|
||||
identification: [ { position: 40,
|
||||
label: '2nd Operand' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 30 } ] }
|
||||
num2,
|
||||
@UI: { lineItem: [ { importance: #HIGH, position: 50,
|
||||
label: 'Result' } ],
|
||||
identification: [ { position: 50, label: 'Result' } ],
|
||||
fieldGroup: [ { qualifier: 'CaluclationItems',
|
||||
position: 40 } ] }
|
||||
calc_result,
|
||||
@UI: { hidden: true }
|
||||
@Semantics.systemDateTime.lastChangedAt: true
|
||||
crea_date_time,
|
||||
@EndUserText.label: 'Last Changed At'
|
||||
@UI: { fieldGroup: [ { qualifier: 'Fieldgroup:HeaderItems',
|
||||
position: 20 } ] }
|
||||
@Semantics.systemDateTime.localInstanceLastChangedAt: true
|
||||
lchg_date_time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user