Skip to content

Commit 2dda490

Browse files
D047539Markus1812
andauthored
[AIFP] Inserting Field Type and Variable Type in AIFP (#712)
Co-authored-by: Markus <[email protected]>
1 parent bd33578 commit 2dda490

File tree

3 files changed

+295
-99
lines changed

3 files changed

+295
-99
lines changed

file-formats/aifp/aifp-v1.json

Lines changed: 175 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -95,51 +95,82 @@
9595
"type": "string",
9696
"maxLength": 3
9797
},
98-
"messageVariable1": {
99-
"title": "Message Variable 1",
100-
"description": "Message variable 1",
101-
"type": "string"
102-
},
103-
"messageVariable2": {
104-
"title": "Message Variable 2",
105-
"description": "Message variable 2",
106-
"type": "string"
107-
},
108-
"messageVariable3": {
109-
"title": "Message Variable 3",
110-
"description": "Message variable 3",
111-
"type": "string"
112-
},
113-
"messageVariable4": {
114-
"title": "Message Variable 4",
115-
"description": "Message variable 4",
116-
"type": "string"
98+
"variableAssignments": {
99+
"title": "Message Variable Assignments",
100+
"description": "Message variable assignments",
101+
"type": "array",
102+
"items": {
103+
"title": "Variable List",
104+
"description": "Variable list",
105+
"type": "object",
106+
"properties": {
107+
"number": {
108+
"title": "Number",
109+
"description": "Number",
110+
"type": "integer",
111+
"minimum": 1,
112+
"maximum": 4
113+
},
114+
"type": {
115+
"title": "Type",
116+
"description": "Type",
117+
"type": "string",
118+
"enum": [
119+
"constant",
120+
"systemField",
121+
"definedField"
122+
],
123+
"enumTitles": [
124+
"Constant",
125+
"System Field",
126+
"Defined Field"
127+
],
128+
"enumDescriptions": [
129+
"Constant value",
130+
"System field",
131+
"Defined field in the check assignment"
132+
],
133+
"default": "definedField"
134+
},
135+
"field": {
136+
"title": "Field",
137+
"description": "Field",
138+
"type": "string"
139+
},
140+
"value": {
141+
"title": "Value",
142+
"description": "Value",
143+
"type": "string"
144+
}
145+
},
146+
"additionalProperties": false
147+
}
117148
}
118149
},
119150
"additionalProperties": false
120151
},
121-
"checkAssignments": {
122-
"title": "Check Assignments",
123-
"description": "Check assignments",
152+
"singleCheckAssignments": {
153+
"title": "Single Check Assignments",
154+
"description": "Single check assignments",
124155
"type": "array",
125156
"items": {
126-
"title": "Check Details",
127-
"description": "Check details",
157+
"title": "Single Check",
158+
"description": "Single check",
128159
"type": "object",
129160
"properties": {
130-
"number": {
131-
"title": "Number",
132-
"description": "Number",
133-
"type": "string",
134-
"maxLength": 3,
135-
"pattern": "^[0-9]+$"
136-
},
137161
"description": {
138162
"title": "Description",
139163
"description": "Description",
140164
"type": "string",
141165
"maxLength": 120
142166
},
167+
"id": {
168+
"title": "ID",
169+
"description": "ID",
170+
"type": "string",
171+
"maxLength": 3,
172+
"pattern": "^[0-9]+$"
173+
},
143174
"scenario": {
144175
"title": "Scenario",
145176
"description": "Scenario",
@@ -265,9 +296,36 @@
265296
],
266297
"default": "equals"
267298
},
268-
"pattern": {
269-
"title": "Pattern",
270-
"description": "Pattern for Field Check",
299+
"fieldType": {
300+
"title": "Field Type",
301+
"description": "Field type",
302+
"type": "string",
303+
"enum": [
304+
"definedField",
305+
"pattern",
306+
"systemField"
307+
],
308+
"enumTitles": [
309+
"Defined Field",
310+
"Pattern",
311+
"System Field"
312+
],
313+
"enumDescriptions": [
314+
"Defined field in the check assignment",
315+
"Pattern",
316+
"System field"
317+
],
318+
"default": "pattern"
319+
},
320+
"field": {
321+
"title": "Field",
322+
"description": "Field",
323+
"type": "string",
324+
"maxLength": 60
325+
},
326+
"value": {
327+
"title": "Value",
328+
"description": "Value or pattern for Field Check",
271329
"type": "string",
272330
"maxLength": 60
273331
}
@@ -360,9 +418,36 @@
360418
],
361419
"default": "equals"
362420
},
363-
"pattern": {
364-
"title": "Pattern",
365-
"description": "Pattern for database check",
421+
"fieldType": {
422+
"title": "Field Type",
423+
"description": "Field type",
424+
"type": "string",
425+
"enum": [
426+
"definedField",
427+
"pattern",
428+
"systemField"
429+
],
430+
"enumTitles": [
431+
"Defined Field",
432+
"Pattern",
433+
"System Field"
434+
],
435+
"enumDescriptions": [
436+
"Defined field in the check assignment",
437+
"Pattern",
438+
"System field"
439+
],
440+
"default": "pattern"
441+
},
442+
"field": {
443+
"title": "Field",
444+
"description": "Field",
445+
"type": "string",
446+
"maxLength": 60
447+
},
448+
"value": {
449+
"title": "Value",
450+
"description": "Value or pattern for database check",
366451
"type": "string",
367452
"maxLength": 60
368453
}
@@ -400,33 +485,65 @@
400485
"type": "string",
401486
"maxLength": 3
402487
},
403-
"messageVariable1": {
404-
"title": "Message Variable 1",
405-
"description": "Message variable 1",
406-
"type": "string"
407-
},
408-
"messageVariable2": {
409-
"title": "Message Variable 2",
410-
"description": "Message variable 2",
411-
"type": "string"
412-
},
413-
"messageVariable3": {
414-
"title": "Message Variable 3",
415-
"description": "Message variable 3",
416-
"type": "string"
417-
},
418-
"messageVariable4": {
419-
"title": "Message Variable 4",
420-
"description": "Message variable 4",
421-
"type": "string"
488+
"variableAssignments": {
489+
"title": "Message Variable Assignments",
490+
"description": "Message variable assignments",
491+
"type": "array",
492+
"items": {
493+
"title": "Variable List",
494+
"description": "Variable list",
495+
"type": "object",
496+
"properties": {
497+
"number": {
498+
"title": "Number",
499+
"description": "Number",
500+
"type": "integer",
501+
"minimum": 1,
502+
"maximum": 4
503+
},
504+
"type": {
505+
"title": "Type",
506+
"description": "Type",
507+
"type": "string",
508+
"enum": [
509+
"constant",
510+
"systemField",
511+
"definedField"
512+
],
513+
"enumTitles": [
514+
"Constant",
515+
"System Field",
516+
"Defined Field"
517+
],
518+
"enumDescriptions": [
519+
"Constant value",
520+
"System field",
521+
"Defined field in the check assignment"
522+
],
523+
"default": "definedField"
524+
},
525+
"field": {
526+
"title": "Field",
527+
"description": "Field",
528+
"type": "string"
529+
},
530+
"value": {
531+
"title": "Value",
532+
"description": "Value",
533+
"type": "string"
534+
}
535+
},
536+
"additionalProperties": false
537+
}
422538
}
423539
},
424540
"additionalProperties": false
425541
}
426542
},
427543
"additionalProperties": false,
428544
"required": [
429-
"number"
545+
"description",
546+
"id"
430547
]
431548
}
432549
}
@@ -436,6 +553,6 @@
436553
"formatVersion",
437554
"header",
438555
"generalInformation",
439-
"checkAssignments"
556+
"singleCheckAssignments"
440557
]
441558
}

file-formats/aifp/examples/z_aff_example_aifp.aifp.json

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,39 @@
33
"header": {
44
"description": "Example AIFP for ABAP File Format",
55
"originalLanguage": "en",
6-
"abapLanguageVersion": "cloudDevelopment"
6+
"abapLanguageVersion": "standard"
77
},
88
"generalInformation": {
9-
"namespace": "AIFNS",
9+
"namespace": "ZAIFNS",
1010
"aifCheck": "BP_EXIST"
1111
},
12-
"checkAssignments": [
12+
"errorMessage": {
13+
"messageClass": "/AIF/CREATE_CUST",
14+
"messageNumber": "001",
15+
"variableAssignments": [
16+
{
17+
"number": 1,
18+
"type": "definedField",
19+
"value": "1"
20+
}
21+
]
22+
},
23+
"singleCheckAssignments": [
1324
{
14-
"number": "10",
1525
"description": "Check Business Partner Exist",
26+
"id": "10",
1627
"scenario": "simpleFieldAndDbCheck",
1728
"fieldCheck": {
18-
"checkType": "empty",
19-
"operator": "equals"
29+
"checkType": "empty"
2030
},
2131
"databaseCheck": {
2232
"table": "BUP000",
2333
"whereCondition": "ID = '$1'",
24-
"checkType": "checkExistence",
25-
"operator": "equals"
34+
"checkType": "compare",
35+
"fieldName": "NAME",
36+
"operator": "equals",
37+
"fieldType": "definedField",
38+
"value": "2"
2639
}
2740
}
2841
]

0 commit comments

Comments
 (0)