This commit is contained in:
danrega
2023-09-25 11:54:26 +02:00
parent a9d30088cd
commit 5b472c62ce
3 changed files with 66 additions and 66 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -1,33 +1,27 @@
@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: [ @UI.facet: [
{
// Header Facet (Object Page): id: 'calc',
purpose: #STANDARD,
{ id: 'HeaderFacet',
purpose: #HEADER,
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
}]
]
// Element List
@EndUserText.label: 'Calculation ID' @EndUserText.label: 'Calculation ID'
@UI: { lineItem: [ { importance: #HIGH, position: 10, @UI: { lineItem: [ { importance: #HIGH, position: 10,
label: 'Calculation ID' }, label: 'Calculation ID' },