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