-
Notifications
You must be signed in to change notification settings - Fork 59
/
zdmo_i_rapgeneratorbo.bdef.asbdef
184 lines (145 loc) · 6.03 KB
/
zdmo_i_rapgeneratorbo.bdef.asbdef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
managed;
with draft;
define behavior for ZDMO_I_RAPGENERATORBO alias RAPGeneratorBO
implementation in class ZDMO_BP_I_RAPGeneratorBO unique
persistent table ZDMO_rapgen_bo
draft table ZDMO_rapgener01d
etag master LocalLastChangedAt
lock master total etag LastChangedAt
//authorization master ( global )
{
field ( numbering : managed )
RapNodeUUID;
field ( readonly ) ABAPLanguageVersion, PackageLanguageVersion, BoName, JsonString, JsonIsValid, BoIsGenerated, JobCount, JobName;
field ( mandatory ) ImplementationType, BindingType, DataSourceType;
field ( features : instance ) ADTLink, Namespace, PackageName;
update;
delete;
static action createBOandRootNode parameter ZDMO_i_rap_gen_param_rapbonode result [1] $self;
action ( features : instance ) createBO result [1] $self;
determination createJSONString on save { create; }
draft action ( features : instance ) Edit;
draft action Activate;
draft action Discard;
draft action Resume;
draft determine action Prepare
{
determination ( always ) createJSONString;
validation ( always ) check_json_string;
validation ( always ) mandatory_fields_check; }
mapping for ZDMO_RAPGEN_BO
{
RapNodeUUID = RAP_NODE_UUID;
BoName = BO_NAME;
Namespace = NAMESPACE;
PackageName = PACKAGE_NAME;
TransportRequest = TRANSPORT_REQUEST;
SkipActivation = SKIP_ACTIVATION;
ImplementationType = IMPLEMENTATION_TYPE;
ABAPLanguageVersion = abap_language_version;
PackageLanguageVersion = package_language_version;
DataSourceType = DATA_SOURCE_TYPE;
BindingType = BINDING_TYPE;
DraftEnabled = DRAFT_ENABLED;
Suffix = SUFFIX;
Prefix = PREFIX;
MultiInlineEdit = MULTI_INLINE_EDIT;
CustomizingTable = CUSTOMIZING_TABLE;
AddToManageBusinessConfig = ADD_TO_MANAGE_BUSINESS_CONFIG;
BusinessConfName = BUSINESS_CONF_NAME;
BusinessConfIdentifier = BUSINESS_CONF_IDENTIFIER;
BusinessConfDescription = BUSINESS_CONF_DESCRIPTION;
CreatedBy = CREATED_BY;
CreatedAt = CREATED_AT;
LastChangedBy = LAST_CHANGED_BY;
LastChangedAt = LAST_CHANGED_AT;
LocalLastChangedAt = LOCAL_LAST_CHANGED_AT;
JsonString = JSON_STRING;
JsonIsValid = json_is_valid;
BoIsGenerated = bo_is_generated;
JobCount = job_count;
JobName = job_name;
ADTLink = adt_link;
}
association _RAPGeneratorBONode { create; with draft; }
determination SetNameSpace on modify { field PackageName; }
determination SetObjectNames on modify { field Namespace, Suffix, Prefix, BindingType, ImplementationType, DraftEnabled, DataSourceType; }
determination SetFieldNames on modify { field ImplementationType, DraftEnabled; }
validation mandatory_fields_check on save { create; update; field PackageName, BindingType, ImplementationType, DataSourceType; }
validation check_json_string on save { create; update; field JsonString; }
}
define behavior for ZDMO_I_RAPGENERATORBONODE alias RAPGeneratorBONode
implementation in class ZDMO_BP_I_RAPGeneratorBONode unique
persistent table ZDMO_rapgen_node
draft table ZDMO_rapgener00d
etag master LocalLastChangedAt
lock dependent by _RAPGeneratorBO
//authorization dependent by _RAPGeneratorBO
{
field ( readonly )
HeaderUUID, NodeNumber, HierarchyDescendantCount,
HierarchyDistanceFromRoot, HierarchyDrillState, HierarchyPreorderRank
, IsRootNode, ParentEntityName, ParentDataSource, ParentUUID, RootUUID,
FieldNameLocLastChangedAt,
FieldNameLastChangedAt
;
field ( features : instance ) FieldNameRootUUID, FieldNameUUID, FieldNameParentUUID,
ControlStructure, DraftTableName,
FieldNameTotalEtag, FieldNameEtagMaster, QueryImplementationClass,
ServiceBinding, ServiceDefinition, FieldNameLastChangedBy,
FieldNameCreatedAt, FieldNameCreatedBy;
field ( numbering : managed )
NodeUUID;
field ( mandatory )
DataSource, EntityName, FieldNameObjectID,
CdsIView, CdsPView, BehaviorImplementationClass, MdeView;
update;
delete;
action ( features : instance ) addChild2 parameter ZDMO_I_RAP_GEN_PARAM_ADD_CHILD result [1] ZDMO_I_RAPGENERATORBONODE;
mapping for ZDMO_RAPGEN_NODE
{
NodeUUID = NODE_UUID;
HeaderUUID = HEADER_UUID;
ParentUUID = PARENT_UUID;
RootUUID = root_uuid;
NodeNumber = NODE_NUMBER;
IsRootNode = is_root_node;
EntityName = ENTITY_NAME;
ParentEntityName = PARENT_ENTITY_NAME;
ParentDataSource = parent_data_source;
DataSource = DATA_SOURCE;
FieldNameObjectID = FIELD_NAME_OBJECT_ID;
FieldNameEtagMaster = FIELD_NAME_ETAG_MASTER;
FieldNameTotalEtag = FIELD_NAME_TOTAL_ETAG;
FieldNameUUID = FIELD_NAME_UUID;
FieldNameParentUUID = FIELD_NAME_PARENT_UUID;
FieldNameRootUUID = FIELD_NAME_ROOT_UUID;
FieldNameCreatedBy = FIELD_NAME_CREATED_BY;
FieldNameCreatedAt = FIELD_NAME_CREATED_AT;
FieldNameLastChangedBy = FIELD_NAME_LAST_CHANGED_BY;
FieldNameLastChangedAt = FIELD_NAME_LAST_CHANGED_AT;
FieldNameLocLastChangedAt = FIELD_NAME_LOC_LAST_CHANGED_AT;
CdsIView = CDS_I_VIEW;
CdsPView = CDS_P_VIEW;
MdeView = MDE_VIEW;
BehaviorImplementationClass = BEHAVIOR_IMPLEMENTATION_CLASS;
ServiceDefinition = SERVICE_DEFINITION;
ServiceBinding = SERVICE_BINDING;
ControlStructure = CONTROL_STRUCTURE;
QueryImplementationClass = QUERY_IMPLEMENTATION_CLASS;
DraftTableName = DRAFT_TABLE_NAME;
HierarchyDistanceFromRoot = hierarchy_distance_from_root;
HierarchyDescendantCount = hierarchy_descendant_count;
HierarchyDrillState = hierarchy_drill_state; // leaf, expanded, collapsed
HierarchyPreorderRank = hierarchy_preorder_rank;
LocalLastChangedAt = LOCAL_LAST_CHANGED_AT;
}
association _RAPGeneratorBO { with draft; }
determination CalculateNodeNumber on modify { create; }
determination SetChangedAtFieldNames on modify { field FieldNameEtagMaster, FieldNameTotalEtag; }
determination SetRepositoryObjectNames on modify { create; field EntityName; }
determination SetParentAndRootUUID on modify { field NodeUUID; }
determination SetFieldNames on modify { field DataSource; }
internal action SetRepoObjectNames;
internal action SetRepoFieldNames;
}