@open-rap/compiler 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -2
  3. package/dist/agent/server.d.ts +35 -0
  4. package/dist/agent/server.js +408 -0
  5. package/dist/agent/server.js.map +1 -0
  6. package/dist/authoring/abapgit.d.ts +38 -0
  7. package/dist/authoring/abapgit.js +242 -0
  8. package/dist/authoring/abapgit.js.map +1 -0
  9. package/dist/authoring/catalog.d.ts +48 -0
  10. package/dist/authoring/catalog.js +117 -0
  11. package/dist/authoring/catalog.js.map +1 -0
  12. package/dist/authoring/floorplan.d.ts +28 -0
  13. package/dist/authoring/floorplan.js +31 -0
  14. package/dist/authoring/floorplan.js.map +1 -0
  15. package/dist/authoring/generate.d.ts +57 -0
  16. package/dist/authoring/generate.js +630 -0
  17. package/dist/authoring/generate.js.map +1 -0
  18. package/dist/authoring/mcp.d.ts +15 -0
  19. package/dist/authoring/mcp.js +52 -0
  20. package/dist/authoring/mcp.js.map +1 -0
  21. package/dist/authoring/new.d.ts +35 -0
  22. package/dist/authoring/new.js +389 -0
  23. package/dist/authoring/new.js.map +1 -0
  24. package/dist/bdef/ast.d.ts +249 -0
  25. package/dist/bdef/ast.js +3 -0
  26. package/dist/bdef/ast.js.map +1 -0
  27. package/dist/bdef/lexer.d.ts +105 -0
  28. package/dist/bdef/lexer.js +148 -0
  29. package/dist/bdef/lexer.js.map +1 -0
  30. package/dist/bdef/parser.d.ts +22 -0
  31. package/dist/bdef/parser.js +1012 -0
  32. package/dist/bdef/parser.js.map +1 -0
  33. package/dist/build.d.ts +26 -0
  34. package/dist/build.js +62 -0
  35. package/dist/build.js.map +1 -0
  36. package/dist/cds/adapter.d.ts +91 -0
  37. package/dist/cds/adapter.js +381 -0
  38. package/dist/cds/adapter.js.map +1 -0
  39. package/dist/cds/expression-ast.d.ts +65 -0
  40. package/dist/cds/expression-ast.js +330 -0
  41. package/dist/cds/expression-ast.js.map +1 -0
  42. package/dist/cli.d.ts +9 -0
  43. package/dist/cli.js +485 -0
  44. package/dist/cli.js.map +1 -0
  45. package/dist/dcl/parser.d.ts +59 -0
  46. package/dist/dcl/parser.js +338 -0
  47. package/dist/dcl/parser.js.map +1 -0
  48. package/dist/ddic/catalog.d.ts +17 -0
  49. package/dist/ddic/catalog.js +211 -0
  50. package/dist/ddic/catalog.js.map +1 -0
  51. package/dist/ddic/cds-types.d.ts +47 -0
  52. package/dist/ddic/cds-types.js +131 -0
  53. package/dist/ddic/cds-types.js.map +1 -0
  54. package/dist/ddic/table-source.d.ts +70 -0
  55. package/dist/ddic/table-source.js +500 -0
  56. package/dist/ddic/table-source.js.map +1 -0
  57. package/dist/ddic/xml.d.ts +65 -0
  58. package/dist/ddic/xml.js +201 -0
  59. package/dist/ddic/xml.js.map +1 -0
  60. package/dist/dev.d.ts +128 -0
  61. package/dist/dev.js +434 -0
  62. package/dist/dev.js.map +1 -0
  63. package/dist/diagnostics.d.ts +33 -0
  64. package/dist/diagnostics.js +53 -0
  65. package/dist/diagnostics.js.map +1 -0
  66. package/dist/gen/abap/derived-types.d.ts +26 -0
  67. package/dist/gen/abap/derived-types.js +323 -0
  68. package/dist/gen/abap/derived-types.js.map +1 -0
  69. package/dist/gen/abap/eml.d.ts +118 -0
  70. package/dist/gen/abap/eml.js +362 -0
  71. package/dist/gen/abap/eml.js.map +1 -0
  72. package/dist/gen/abap/enums.d.ts +13 -0
  73. package/dist/gen/abap/enums.js +74 -0
  74. package/dist/gen/abap/enums.js.map +1 -0
  75. package/dist/gen/abap/framework-http.d.ts +14 -0
  76. package/dist/gen/abap/framework-http.js +1049 -0
  77. package/dist/gen/abap/framework-http.js.map +1 -0
  78. package/dist/gen/abap/framework-query.d.ts +14 -0
  79. package/dist/gen/abap/framework-query.js +225 -0
  80. package/dist/gen/abap/framework-query.js.map +1 -0
  81. package/dist/gen/abap/framework-utils.d.ts +29 -0
  82. package/dist/gen/abap/framework-utils.js +3707 -0
  83. package/dist/gen/abap/framework-utils.js.map +1 -0
  84. package/dist/gen/abap/framework.d.ts +12 -0
  85. package/dist/gen/abap/framework.js +480 -0
  86. package/dist/gen/abap/framework.js.map +1 -0
  87. package/dist/gen/abap/generate.d.ts +40 -0
  88. package/dist/gen/abap/generate.js +238 -0
  89. package/dist/gen/abap/generate.js.map +1 -0
  90. package/dist/gen/abap/rewrite.d.ts +82 -0
  91. package/dist/gen/abap/rewrite.js +957 -0
  92. package/dist/gen/abap/rewrite.js.map +1 -0
  93. package/dist/gen/abap/shadow.d.ts +25 -0
  94. package/dist/gen/abap/shadow.js +175 -0
  95. package/dist/gen/abap/shadow.js.map +1 -0
  96. package/dist/gen/abap/tokens.d.ts +33 -0
  97. package/dist/gen/abap/tokens.js +87 -0
  98. package/dist/gen/abap/tokens.js.map +1 -0
  99. package/dist/gen/app/index.d.ts +25 -0
  100. package/dist/gen/app/index.js +322 -0
  101. package/dist/gen/app/index.js.map +1 -0
  102. package/dist/gen/csdl.d.ts +11 -0
  103. package/dist/gen/csdl.js +562 -0
  104. package/dist/gen/csdl.js.map +1 -0
  105. package/dist/gen/deploy.d.ts +12 -0
  106. package/dist/gen/deploy.js +53 -0
  107. package/dist/gen/deploy.js.map +1 -0
  108. package/dist/gen/docs/index.d.ts +35 -0
  109. package/dist/gen/docs/index.js +267 -0
  110. package/dist/gen/docs/index.js.map +1 -0
  111. package/dist/gen/docs/markdown.d.ts +23 -0
  112. package/dist/gen/docs/markdown.js +187 -0
  113. package/dist/gen/docs/markdown.js.map +1 -0
  114. package/dist/gen/docs/site.d.ts +17 -0
  115. package/dist/gen/docs/site.js +106 -0
  116. package/dist/gen/docs/site.js.map +1 -0
  117. package/dist/gen/keycloak.d.ts +21 -0
  118. package/dist/gen/keycloak.js +90 -0
  119. package/dist/gen/keycloak.js.map +1 -0
  120. package/dist/gen/launchpad/index.d.ts +48 -0
  121. package/dist/gen/launchpad/index.js +302 -0
  122. package/dist/gen/launchpad/index.js.map +1 -0
  123. package/dist/gen/launchpad/ui.d.ts +14 -0
  124. package/dist/gen/launchpad/ui.js +350 -0
  125. package/dist/gen/launchpad/ui.js.map +1 -0
  126. package/dist/gen/mcp.d.ts +23 -0
  127. package/dist/gen/mcp.js +244 -0
  128. package/dist/gen/mcp.js.map +1 -0
  129. package/dist/gen/sql-expressions.d.ts +12 -0
  130. package/dist/gen/sql-expressions.js +136 -0
  131. package/dist/gen/sql-expressions.js.map +1 -0
  132. package/dist/gen/sql.d.ts +38 -0
  133. package/dist/gen/sql.js +612 -0
  134. package/dist/gen/sql.js.map +1 -0
  135. package/dist/gen/ui/index.d.ts +7 -0
  136. package/dist/gen/ui/index.js +27 -0
  137. package/dist/gen/ui/index.js.map +1 -0
  138. package/dist/gen/ui/layout.d.ts +230 -0
  139. package/dist/gen/ui/layout.js +511 -0
  140. package/dist/gen/ui/layout.js.map +1 -0
  141. package/dist/gen/ui/static.d.ts +55 -0
  142. package/dist/gen/ui/static.js +2901 -0
  143. package/dist/gen/ui/static.js.map +1 -0
  144. package/dist/gen/ui/views.d.ts +10 -0
  145. package/dist/gen/ui/views.js +511 -0
  146. package/dist/gen/ui/views.js.map +1 -0
  147. package/dist/gen/vendor.d.ts +23 -0
  148. package/dist/gen/vendor.js +68 -0
  149. package/dist/gen/vendor.js.map +1 -0
  150. package/dist/gen/xml.d.ts +9 -0
  151. package/dist/gen/xml.js +42 -0
  152. package/dist/gen/xml.js.map +1 -0
  153. package/dist/index.d.ts +20 -0
  154. package/dist/index.js +20 -0
  155. package/dist/index.js.map +1 -0
  156. package/dist/input/project.d.ts +50 -0
  157. package/dist/input/project.js +128 -0
  158. package/dist/input/project.js.map +1 -0
  159. package/dist/ir/access-controls.d.ts +11 -0
  160. package/dist/ir/access-controls.js +148 -0
  161. package/dist/ir/access-controls.js.map +1 -0
  162. package/dist/ir/authorizations.d.ts +25 -0
  163. package/dist/ir/authorizations.js +178 -0
  164. package/dist/ir/authorizations.js.map +1 -0
  165. package/dist/ir/behaviors.d.ts +16 -0
  166. package/dist/ir/behaviors.js +548 -0
  167. package/dist/ir/behaviors.js.map +1 -0
  168. package/dist/ir/builder.d.ts +20 -0
  169. package/dist/ir/builder.js +505 -0
  170. package/dist/ir/builder.js.map +1 -0
  171. package/dist/ir/config.d.ts +25 -0
  172. package/dist/ir/config.js +130 -0
  173. package/dist/ir/config.js.map +1 -0
  174. package/dist/ir/dictionary.d.ts +54 -0
  175. package/dist/ir/dictionary.js +328 -0
  176. package/dist/ir/dictionary.js.map +1 -0
  177. package/dist/ir/entities.d.ts +58 -0
  178. package/dist/ir/entities.js +676 -0
  179. package/dist/ir/entities.js.map +1 -0
  180. package/dist/ir/expressions.d.ts +33 -0
  181. package/dist/ir/expressions.js +327 -0
  182. package/dist/ir/expressions.js.map +1 -0
  183. package/dist/ir/handlers.d.ts +63 -0
  184. package/dist/ir/handlers.js +398 -0
  185. package/dist/ir/handlers.js.map +1 -0
  186. package/dist/ir/number-ranges.d.ts +24 -0
  187. package/dist/ir/number-ranges.js +74 -0
  188. package/dist/ir/number-ranges.js.map +1 -0
  189. package/dist/ir/seed.d.ts +23 -0
  190. package/dist/ir/seed.js +78 -0
  191. package/dist/ir/seed.js.map +1 -0
  192. package/dist/ir/service.d.ts +21 -0
  193. package/dist/ir/service.js +96 -0
  194. package/dist/ir/service.js.map +1 -0
  195. package/dist/launchpad/config.d.ts +47 -0
  196. package/dist/launchpad/config.js +321 -0
  197. package/dist/launchpad/config.js.map +1 -0
  198. package/dist/launchpad/workspace.d.ts +48 -0
  199. package/dist/launchpad/workspace.js +166 -0
  200. package/dist/launchpad/workspace.js.map +1 -0
  201. package/dist/srvd/parser.d.ts +36 -0
  202. package/dist/srvd/parser.js +193 -0
  203. package/dist/srvd/parser.js.map +1 -0
  204. package/dist/standard/data.d.ts +18 -0
  205. package/dist/standard/data.js +534 -0
  206. package/dist/standard/data.js.map +1 -0
  207. package/dist/standard/index.d.ts +36 -0
  208. package/dist/standard/index.js +507 -0
  209. package/dist/standard/index.js.map +1 -0
  210. package/dist/version.d.ts +2 -0
  211. package/dist/version.js +4 -0
  212. package/dist/version.js.map +1 -0
  213. package/docs/AGENTS.md +79 -0
  214. package/docs/ANNOTATIONS.md +76 -0
  215. package/docs/DECISIONS.md +1554 -0
  216. package/docs/DEPLOYMENT.md +113 -0
  217. package/docs/DIAGNOSTICS.md +116 -0
  218. package/docs/FEATURES.md +287 -0
  219. package/docs/GUIDE.md +560 -0
  220. package/docs/KNOWN_GAPS.md +216 -0
  221. package/docs/MCP.md +84 -0
  222. package/docs/PLAN.md +690 -0
  223. package/docs/README.md +148 -0
  224. package/docs/REMOTE_APIS.md +121 -0
  225. package/docs/ROADMAP.md +35 -0
  226. package/docs/UTILITIES.md +95 -0
  227. package/package.json +49 -3
@@ -0,0 +1,216 @@
1
+ # Known gaps
2
+
3
+ This file lists what is not (yet) supported, in particular the ABAP features
4
+ `@abaplint/transpiler` does not handle: the rule of the project is to document them here rather
5
+ than to work around the transpiler. The overall feature coverage is tracked in
6
+ [docs/FEATURES.md](docs/FEATURES.md).
7
+
8
+ Reference versions: `@abaplint/core` 2.120.98, `@abaplint/transpiler` 2.14.24,
9
+ `@abaplint/runtime` 2.14.24.
10
+
11
+ ## abaplint transpiler and runtime
12
+
13
+ | Gap | Effect | Workaround | Tracking |
14
+ |---|---|---|---|
15
+ | The RAP derived types (`TYPE TABLE FOR …`, `keys`, `failed`, `reported`, `result`) are typed `void` by abaplint. | The transpiler refuses the ABP (`TypeNameOrInfer, type not found: #`). | The compiler generates the types and rewrites the ABP before transpilation (D2). | Solved (M4) |
16
+ | abaplint does not parse all the EML forms (`CREATE AUTO FILL CID SET FIELDS WITH`, `CREATE BY \_assoc SET FIELDS WITH` are unknown statements for it), and the EML lowering of the transpiler handles neither `BY \_assoc`, nor `LINK`, nor `CREATE BY`, nor `IN LOCAL MODE`. | Syntax error or "not supported" at runtime. | Our own EML parser and lowering to `ZRAP_EML` by the rewriting pass (D2). | Solved (M4) |
17
+ | The arithmetic operations of the runtime on packed numbers (`p`) go through JavaScript numbers (the storage itself is exact). | A calculation beyond about 15 significant digits can lose decimals. | The values travel as exact text between the buffer and the ABP (D8); usual amounts are not affected. | — |
18
+ | The SQL layer of the transpiler fails on CDS associations. | Transpilation impossible with the original DDLS. | "Shadow" DDIC without CDS views (D19). | Solved (M4) |
19
+ | The private methods of the local classes are only reachable through `FRIENDS_ACCESS_INSTANCE`, an internal detail of the generated code. | May change with a version of the transpiler. | Pinned versions; the tests of M4 call all the handlers through this path. | — |
20
+ | Namespaced objects (`/DMO/…`) give modules named with `#`, imported as `%23`. | The module loader of Vitest does not find them. | The modules are renamed (`#` → `_`) on generation. | Solved (M4) |
21
+ | abaplint does not type the inline declaration of the result of a `SELECT` with a literal, an aggregate other than `COUNT(*)` or an expression (`void` type "SELECT_todo"). | The transpiled method fails as soon as it is called. | The rewriting pass declares the existence check (`@abap_true`: `abap_boolean`) and `MAX`/`MIN` of a single source (type of the column); diagnostic ABP009 for the other forms (D26). | Worked around |
22
+ | The transpiler reads a component host (`@ls-comp`) as a subtraction (`ls - comp`) when the `SELECT` uses fields prefixed by an alias (`t~col`). | Invalid or ambiguous SQL at runtime. | The rewriting pass writes it `@( ls-comp )` (equivalent host expression) in these `SELECT`s. | Worked around |
23
+ | `SELECT … ENDSELECT` reads whole rows of the table then assigns them to the target. | With a field list, elementary target failing, shorter structure filled by position. | Diagnostic ABP007: `SELECT *`, or `INTO TABLE` then `LOOP AT`. | — |
24
+ | An `int8` value (`get_offset( )`, `get_page_size( )` of the paging of a query) in `LOOP AT … FROM`/`TO` | The runtime mixes BigInt and numbers: exception "Cannot mix BigInt" | `CONV i( … )` before the `LOOP`, as in the `custom-entity` fixture. | — |
25
+ | `OPEN CURSOR … ORDER BY`: the transpiler writes `ORDER BY` twice; `FETCH NEXT CURSOR … INTO TABLE @DATA(…)` makes it fail ("InlineDeclarations"). | — | The duplicate is removed on SQL translation; declare the target of the `FETCH`. Cursors are not part of ABAP Cloud anyway (refused by the check). | — |
26
+
27
+ ## Behavior pool (ABAP)
28
+
29
+ | Gap | Status |
30
+ |---|---|
31
+ | ABAP SQL writes (`INSERT`, `UPDATE`, `MODIFY`, `DELETE` on a table) outside the saver, `WITH` | Diagnostic ABP007 (D26): the RAP runtime writes the BO, change it with EML. Allowed in `save_modified` (D30). |
32
+ | Classic ABAP SQL writes of packed numbers (including `TIMESTAMPL`) | The abaplint runtime passes the values through JavaScript numbers: about 15 significant digits, the microseconds of a timestamp are lost. `MAPPING FROM ENTITY` (kernel) is exact. |
33
+ | `DELETE dbtab FROM @wa` | The transpiler loses the row (the query would empty the table): diagnostic ABP007; `DELETE FROM dbtab WHERE …`, `FROM TABLE` or `MAPPING FROM ENTITY`. A `DELETE` without a condition is refused at runtime. |
34
+ | Tables and views outside the project in a `SELECT` (`/dmo/agency`, SAP tables) | Error ABP004: only the tables and CDS entities of the project exist in the generated database. |
35
+ | `SELECT` and unsaved changes of the LUW | Not visible, as in RAP: `SELECT` reads the database (read the BO with EML to see the buffer). |
36
+ | `SELECT` conditions on a date, a UUID, a timestamp or a boolean | Evaluated on the ABAP form computed by the view: no usable index, sequential read of the table (D26). |
37
+ | ABAP SQL functions (`concat`, `division`, `dats_days_between`, `tstmp_*`…) | Passed as is: only those that exist under the same name in PostgreSQL work. |
38
+ | SQL error at runtime | Runtime error (500), no catchable `CX_SY_OPEN_SQL_DB` exception; the transaction of the LUW stays usable (savepoint). |
39
+ | `SELECT … FOR UPDATE`, `OFFSET`, `CLIENT SPECIFIED`, `USING CLIENT`, secondary connections | Not supported by the transpiler or irrelevant (single tenant, D9). |
40
+ | Saver class (`lsc_…`) | `save_modified` and `cleanup` for additional and unmanaged save (D30). `adjust_numbers` (late numbering): ABP007; the other methods are not called (ABP003). The rows of `update` always carry all the values. |
41
+ | Unmanaged save: database constraints | No child → parent foreign key (the BDEF has no persistent table): `save_modified` deletes the children (`delete` contains them). |
42
+ | EML on a projection BDEF (`MODIFY ENTITIES OF zc_travel`) | Diagnostic ABP007: use the base BDEF. |
43
+ | `MODIFY ENTITIES OPERATIONS` (dynamic EML), `RELATING TO`, `AUGMENTING`, `COMMIT ENTITIES RESPONSES`, `GET PERMISSIONS`, `SET LOCKS`, `RAISE ENTITY EVENT` | Diagnostics ABP005/ABP007. |
44
+ | Late numbering (`adjust_numbers`) | Not supported (ABP007). Early numbering, direct or by association, is. |
45
+ | `COMMIT ENTITIES` and `ROLLBACK ENTITIES` in a handler | Runtime error, as in RAP. |
46
+ | Responses of an EML statement | Replace the content of the given `FAILED`/`REPORTED`/`MAPPED` targets; `sy-subrc` is 4 when `failed` is not empty (convention, not documented by SAP). |
47
+ | Seventh decimal of the generated `TIMESTAMPL`s | The runtime generates them to the microsecond (D8). |
48
+
49
+ ## Remote APIs (D31)
50
+
51
+ | Gap | Status |
52
+ |---|---|
53
+ | Client proxy: `$batch` (`create_request_for_batch`), `$expand`, deep insert, navigation by association (`navigate_to_many`…), actions and functions of the remote service, `$search`, delta | Not supported: methods missing from the base (ABAP check error). |
54
+ | Value controls (`value_controls` of the SCM2 classes, `_vc` fields of the abstract entities) | Neither read nor filled: a `null` value of the service gives the initial value; updating a value to `null` is not possible. |
55
+ | `comm_system_id`, `i_service_instance_name`, `i_authn_mode` | Ignored: a destination is a set of environment variables. No user propagation (principal propagation) nor OAuth client credentials: a fixed token can be given with `_TOKEN`. |
56
+ | Parameters `is_proxy_model_key`, `iv_service_definition_name` | Ignored: the proxy reads the `$metadata` of the remote service (one more call per proxy). |
57
+ | Destination named by a variable | Works, but is not listed in the generated `.env.example` (only literals are). |
58
+ | Communication targets (COTA), SOAP (`cl_soap_destination_provider`), RFC | Not supported. |
59
+ | Outgoing HTTP proxy | The `fetch` of Node.js only reads `HTTPS_PROXY` with `NODE_USE_ENV_PROXY=1` (or `--use-env-proxy`). |
60
+ | Remote calls and LUW | The call goes out during the interaction (action, determination…): a rollback of the LUW does not undo what was written remotely, as on SAP. |
61
+
62
+ ## CDS
63
+
64
+ | Gap | Status |
65
+ |---|---|
66
+ | Expressions in the select list (D67): `$session.user`, `$session.client`, `$session.system_language`, `BETWEEN`, aggregates, SQL functions outside the list of D67 | Diagnostic CDS002 |
67
+ | Calculated elements read with EML in the behavior pool (D67) | Value of the active view (last save), not recomputed on the changes of the transaction; initial value for a draft instance. |
68
+ | Association paths in the select list (`_Agency.Name`), including in an expression | Diagnostic CDS002 |
69
+ | Joins, WHERE clause | Diagnostic CDS002 (WHERE ignored with a warning) |
70
+ | Views with parameters, unions, hierarchies | Diagnostic CDS002 |
71
+ | Custom entities (D43): parameters, aggregation (`get_aggregation`), nested `$expand`; DCL not applied (the query class filters itself) | Not handled |
72
+ | Custom entities: a `$filter` outside ranges (OR between elements, functions other than `contains`/`startswith`/`endswith`, comparison between elements) | `get_as_ranges` raises `cx_rap_query_filter_no_range`, as in SAP; `get_as_sql_string` stays available. Functions and expressions that cannot be translated: 501. |
73
+ | Managed BO with unmanaged save on a custom entity (D43) | Specific to Open RAP Runtime (BDEF027 warning); no database lock: the LUWs of the application are serialized, the target API keeps its own checks. |
74
+ | DCL access control: EML and ABAP SQL of the behavior pool | Not filtered (like `WITH PRIVILEGED ACCESS`); only the OData reads are (D35). As in RAP, changes go through the instance authorization, not through the DCL. |
75
+ | DCL access control: other aspects (`bypass when`, user-defined aspects), paths of several associations, `$filter` on a navigation | A condition that is not evaluated grants no row (DCL002); the subquery of a `$filter` on `_Travel/…` reads the target without its DCL. |
76
+ | `@AccessControl.authorizationCheck` | Informative: a role applies if it exists, whatever the value. |
77
+ | Included structures (`.INCLUDE`) in the tables | Diagnostic DDIC003 |
78
+ | Table entities (D55): `@ClientHandling.type` | Read, without effect: no client column (D9). |
79
+ | Table entities: `null` columns | The PostgreSQL column keeps its default value (ABAP initial value) like the others; `null` is a distinct state only for the types without an initial value. |
80
+ | Table entities: `SOURCE_TYPE` of the abapGit XML written by `rapt abapgit` | `T`, derived from the documentation: to check on the first import; ADT rewrites the XML on activation. |
81
+ | Enumerated types: `CAST( x AS enum )`, constant `Type.#CONST` in a view, `CONV string( enum )` (name of the constant) in the behavior pool, `cl_abap_enumdescr` | Not handled: only the `CAST`s to an `abap.xxx` type or a data element are supported (D67); in the behavior pool, an enumerated value is its base value. |
82
+ | Enumerated types in the behavior pool: constant in a string template (`|{ type-const }|`) | Not replaced: the transpiler reports the unknown name (ABP004); go through a variable. |
83
+ | Enumerated types exposed in OData | Refused in `standard` mode as on SAP (CDS021); `EnumType` in `enhanced` mode only. |
84
+ | Conversion exits (ALPHA…), ISO conversion of the languages | Not handled |
85
+
86
+ ## Database
87
+
88
+ | Gap | Status |
89
+ |---|---|
90
+ | Client column (`CLNT`) | Removed: single-tenant applications (D9) |
91
+ | Seventh decimal of the `TIMESTAMPL`s | Lost: `timestamptz(6)` (D8) |
92
+
93
+ ## OData
94
+
95
+ | Gap | Status |
96
+ |---|---|
97
+ | `lt`/`le` comparisons on an initial date: in ABAP `00000000` is lower than any date; here the initial value is `NULL` and no comparison keeps it (OData semantics of `null`). | Accepted |
98
+ | `$filter` with `any`/`all`, nested `$expand`, JSON batch, `$value` | 501 or 400 response |
99
+ | `$apply` (D52): transformations other than `filter`, `groupby`, `aggregate` (`topcount`, `compute`, `concat`…), transformation after a grouping, `@Aggregation` annotation | 501 response; the aggregates are on the properties of the type, without hierarchy. |
100
+ | Enumeration literals (D55): a single member (`Ns.Type'A'`, no `'A,B'` flags), `has` operator | The first member is taken; `has`: 400. |
101
+ | `etag dependent by`: master with unmanaged save, or ETag field of the master that is not an administrative timestamp | The runtime does not change the ETag of the master when a dependent entity changes: `save_modified` or the application must do it (D32). |
102
+ | `etag dependent by` through a projection that does not expose the association | No ETag for the dependent entity (neither `@odata.etag`, nor `If-Match` check). |
103
+ | Global feature control (`features : global`) in the reads | Exposed like the instance feature control (`__EntityControl`, `__OperationControl`: same value for all the instances), computed again on each request, without a cache. Static action: checked at runtime only (no instance for `Core.OperationAvailable`). |
104
+
105
+ ## Generated application
106
+
107
+ | Gap | Status |
108
+ |---|---|
109
+ | First load of the UI: about 400 OpenUI5 modules served one by one (no `ui5 build` bundle) | Accepted (D27); one-hour HTTP caching. |
110
+ | Sessions: neither token refresh, nor revocation before the expiry of the cookie (8 h) | Accepted (D28). |
111
+ | Locks between several instances of the application | PostgreSQL row locks (`NOWAIT`), tested against another transaction (`rap-locks.test.ts`); no load test. |
112
+ | TypeScript 7.0.2 compiles `new (x as T).Y()` without parentheses | Form avoided in the code (D29). |
113
+
114
+ ## Launchpad (D37)
115
+
116
+ | Gap | Status |
117
+ |---|---|
118
+ | Navigation between applications from an application (CrossApplicationNavigation, intent links in an Object Page) | Not planned: intents are opened from the launchpad (`/#…`, `/go/…`). |
119
+ | Intent parameters passed in the query string, which the generated UI does not use (no direct opening of an instance) | Gap. |
120
+ | Application loaded full page, not in a container of the shell | Accepted: one application per page; the shell bar is shown by the application. |
121
+ | Personalization (groups and tiles of the user), notifications, enterprise search | Not planned. Spaces and pages are supported (D48). |
122
+ | Pages of a space: drop-down list above the sections | Accepted: SAP shows them in the menu of the tab of the space. |
123
+ | Tile counters read on load only | Gap: no refresh interval. |
124
+ | Shared session: same `SESSION_SECRET` for the launchpad and its applications, no revocation before expiry | Accepted: one level of trust, like the sessions (D28). |
125
+ | Applications behind the launchpad in `AUTH_MODE=none`: their development user, independent of the one of the launchpad | Development only. |
126
+ | OpenUI5 resources served by each application (`/apps/<id>/resources/`) | Accepted: no cache shared between the applications. |
127
+
128
+ ## ABAP Cloud utilities (D40)
129
+
130
+ | Gap | Status |
131
+ |---|---|
132
+ | Time zone of the user | UTC: `xco_cp_time=>time_zone->user` and `->utc` give the same values, `systemtstmp_*` does not convert. |
133
+ | Numbering and application log | Written in the LUW of the request: rolled back if it fails (on SAP, a drawn number is consumed). `use_2nd_db_connection` is ignored. |
134
+ | Number range interval not configured | Created on the first request, from 1 to 99999999999999999999 (on SAP: `cx_nr_object_not_found`). External numbering and alphanumeric intervals not supported. |
135
+ | `/ui2/cl_json` | No `generate` (dynamic data), nor `assoc_arrays`, nor `conversion_exits`, nor `type_descr`; object references are written `null`. Invalid JSON leaves the data unchanged. |
136
+ | `xco_cp_json` | `from_abap` writes the `abap_bool`s as `"X"`/`""`; the names of the members are matched ignoring case and `_` on read. |
137
+ | `cl_abap_regex`, `cl_abap_matcher` | Regular expression engine of JavaScript: the constructs specific to PCRE (possessive quantifiers, `\K`, recursion…) are not supported (`cx_sy_regex`, or another meaning); the POSIX syntax is approximated (classes `[:alpha:]`…, `\<`, `\>`). `FIND … REGEX object` with a `cl_abap_regex` object is not supported. |
138
+ | RTTS | `describe_by_name` raises `cx_sy_rtti_type_not_released`; no creation of types (`cl_abap_structdescr=>create`, `CREATE DATA … TYPE HANDLE`), no attributes nor methods in `cl_abap_classdescr`. `absolute_name` comes from the qualified name of the transpiler. |
139
+ | `cl_abap_random*` | Park-Miller generator (not cryptographic): the sequences differ from those of SAP for the same seed. No `cl_abap_random_packed*` nor `decfloat16`. |
140
+ | `cl_abap_char_utilities=>minchar` | Missing (null character). |
141
+ | Background processing (D41) | The operations stay in memory until they run: a process not yet run when the application stops never is (it stays `NEW`). No restart nor retry of an `ERRONEOUS` process, no queue by name (`set_name` is used for tracking), no check of the transactional phase of the call (on SAP, `save_for_execution` of a controlled operation happens in the save phase). `if_bgmc_process_monitor`: states `NEW`, `SUCCESSFUL`, `ERRONEOUS` (names specific to Open RAP Runtime). A single `COMMIT ENTITIES` per operation. |
142
+ | E-mail (D41) | Sent after the commit of the LUW, without retry; `send( )` always returns the state `W` (waiting). No e-mail templates (`cl_bcs_mail_message=>create_instance_by_template`), nor signature, nor encryption. |
143
+
144
+ ## Standard views and value helps (D44)
145
+
146
+ | Gap | Status |
147
+ |---|---|
148
+ | Available standard views | `I_Currency`, `I_UnitOfMeasure`, `I_Country`, `I_Language`, `I_Region`, `I_TimeZone` and their text views, `I_CalendarDate`, `I_BusinessUserBasic`, `I_ExchangeRate`. The other released views are not provided: CDS005. |
149
+ | `I_Region` | Regions of the United States, Canada, Germany and Australia only. |
150
+ | `I_ExchangeRate` | No rate delivered (empty table `rapt_exchrate`): to load by the application or `rapt/seed.json`. No currency conversion (`CURRENCY_CONVERSION`). |
151
+ | `I_BusinessUserBasic` | A user only appears after their first request; no synchronization with the IdP (departures, name changes). |
152
+ | Reference data | Texts in English only; units: about thirty common units (the content of SAP has many more); no shift of the decimals (`TCURX`): `Decimals` is informative. |
153
+ | Elements of the standard views | The commonly used ones; the other elements of the SAP views (and their associations) do not exist. |
154
+ | Value help | A single value help per element (the first one if several, without `qualifier`); `useForValidation` checked in the UI, not by the service (as in RAP); no `distinctValues`, nor `presentationVariantQualifier`. |
155
+
156
+ ## Draft (D54)
157
+
158
+ | Gap | Status |
159
+ |---|---|
160
+ | Determinations and validations while editing the draft (`on modify` on the draft, `Prepare` that validates) | Not run in the draft: they run on activation; `Prepare` returns the draft without a check. |
161
+ | Actions of the application on a draft | 501 response: activate first. |
162
+ | `SiblingEntity`, `draft query view`, `with draft` on a BO with unmanaged save | Not supported (the list gets the effect of `SiblingEntity` through `DraftAdministrativeData/InProcessByUser`, D58). |
163
+ | Collaborative draft (D59) | No real time (WebSocket): the Object Page reads the draft again every 5 s; no field lock; `ShareAll` ignored; joining a draft only checks the Edit authorization; two-segment navigation `DraftAdministrativeData/DraftAdministrativeUser`: read `DraftAdministrativeUser?$filter=DraftUUID eq …`. |
164
+ | State messages (`%state_area`) | Returned as transition messages on activation. |
165
+ | Exclusive lock | Taken over by another user after 15 minutes without a change, as on SAP; no adjustable duration. |
166
+
167
+ ## Floorplans (D53)
168
+
169
+ | Gap | Status |
170
+ |---|---|
171
+ | Analytical List Page | One chart (the first `@UI.chart`) and one dimension; no visual filter bar, nor multiple charts, nor `@Aggregation` measures. |
172
+ | Overview Page | `kpi`, `list`, `table`, `chart` cards described in `rapt/config.json` (no `@UI.dataPoint` / `@UI.kpi` annotations), without a global filter. |
173
+ | Charts | Our own SVG control: columns, bars, lines, pie, donut; no zoom, rich tooltip nor export. |
174
+
175
+ ## Web APIs and OAuth 2.0 (D60)
176
+
177
+ | Gap | Status |
178
+ |---|---|
179
+ | Development OAuth server | Development only: no refresh token, nor consent, nor revocation; signing key regenerated on each start. |
180
+ | Web API of a draft BO | Active instances only (the draft is not exposed). |
181
+ | OData V2 | Not supported: the generated service is always OData V4 (SRVD003). |
182
+
183
+ ## Enhanced mode (D45)
184
+
185
+ | Gap | Status |
186
+ |---|---|
187
+ | Check of the mandatory fields | On save only (not while typing); fields under dynamic feature control (instance `fc-mandatory`) not checked. |
188
+
189
+ ## MCP (D47)
190
+
191
+ | Gap | Status |
192
+ |---|---|
193
+ | Transport | HTTP, JSON responses; no SSE stream, nor MCP session, nor server notifications. No stdio transport (a client that only speaks stdio goes through an HTTP relay). |
194
+ | Authentication | Bearer token or development user; no OAuth authorization built into the MCP protocol (OAuth metadata discovery). |
195
+ | Tools | No MCP resources nor prompts; `$expand` not offered in `_list`. |
196
+
197
+ ## UI variants (D51)
198
+
199
+ | Gap | Status |
200
+ |---|---|
201
+ | Shared (public) variants, variant applied automatically, contexts | Not supported: personal variants. |
202
+ | Order of the columns, grouping | Not supported (visibility and sorting only). |
203
+
204
+ ## rapt agent (D64)
205
+
206
+ | Gap | Status |
207
+ |---|---|
208
+ | Transport | stdio only; one request at a time (the compiler is not reentrant on a project). |
209
+ | Running the application | No tool starts `rapt dev`: the user starts it (a long-running server is not a tool call); the agent then uses the OData service or the MCP server of the service. |
210
+ | Agent mode of VS Code | Needs VS Code 1.101 or later (the MCP server API); one server per workspace folder. |
211
+
212
+ ## Website (D63)
213
+
214
+ | Gap | Status |
215
+ |---|---|
216
+ | Documentation of the website | Rendered at each publication from `docs/`: the website shows the documentation of the `main` branch, not of each version. |
package/docs/MCP.md ADDED
@@ -0,0 +1,84 @@
1
+ # MCP server: the service for AI agents
2
+
3
+ The Model Context Protocol (MCP) lets an AI agent (Claude, an IDE assistant, an in-house agent…)
4
+ call "tools". Open RAP Runtime turns the OData service of a RAP BO into an MCP server: each
5
+ operation becomes a tool, run by the service itself, with the authorizations, the access
6
+ controls, the validations and the messages of the BO ([D47](DECISIONS.md)).
7
+
8
+ ## 1. Describing the tools: `rapt mcp`
9
+
10
+ ```sh
11
+ rapt mcp my-project # or, in VS Code: "RAP: Generate the MCP server of the service"
12
+ ```
13
+
14
+ The command writes `rapt/mcp.json`, to version with the sources:
15
+
16
+ ```json
17
+ {
18
+ "server": {
19
+ "name": "zrt_ui_travel",
20
+ "instructions": "Travel agency. Read with _list and _get before changing; the BO checks each change."
21
+ },
22
+ "tools": {
23
+ "Travel_list": "Lists the travels. Filter by AgencyID, OverallStatus (O open, A accepted, X rejected)…",
24
+ "Travel_acceptTravel": "Accepts a travel: its status becomes A. Refused when the travel is already accepted.",
25
+ "Booking_delete": false
26
+ }
27
+ }
28
+ ```
29
+
30
+ - One **description** per tool: what it does, when to use it, the meaning of the codes. It is
31
+ what the agent reads to choose the tool; a good description is better than a long prompt.
32
+ - `false` removes the tool (a deletion the agent must not do, for example).
33
+ - `server.instructions`: the general context given to the agent on connection.
34
+ - Run `rapt mcp` again after a change of the service: the written descriptions are kept, the new
35
+ tools are added with a default description, those that no longer exist are removed.
36
+
37
+ ## 2. The tools
38
+
39
+ | Tool | OData request | Arguments |
40
+ |---|---|---|
41
+ | `<Set>_list` | `GET <Set>` | `filter` (OData `$filter`), `search`, `select`, `orderby`, `top` (50 by default, 1000 at most), `skip` |
42
+ | `<Set>_get` | `GET <Set>(key)` | the keys |
43
+ | `<Set>_create` | `POST <Set>` | the editable fields (mandatory ones: `required` of the schema) |
44
+ | `<Set>_update` | `PATCH <Set>(key)` | the keys and the fields to change |
45
+ | `<Set>_delete` | `DELETE <Set>(key)` | the keys |
46
+ | `<Set>_create<_Composition>` | `POST <Set>(key)/<_Composition>` | the keys of the parent and the fields of the child |
47
+ | `<Set>_<action>` | `POST <Set>(key)/<namespace>.<action>` | the keys (except for a static action) and the parameters |
48
+ | `<Set>_<function>` | `GET …/<namespace>.<function>(…)` | same |
49
+
50
+ The input schemas (JSON Schema) come from the OData types: `format: uuid`, `date`, `date-time`,
51
+ maximum lengths, strings of digits. The read tools are marked `readOnlyHint`, the deletions
52
+ `destructiveHint`.
53
+
54
+ The result is the JSON of the service without its OData control information; an error of the BO
55
+ (validation, authorization, lock) comes back as text with its messages and `isError: true`, so
56
+ that the agent can correct its request.
57
+
58
+ ## 3. Running and connecting
59
+
60
+ The application built with `rapt/mcp.json` serves the tools on `/mcp` ("Streamable HTTP"
61
+ transport of the protocol, JSON responses). With `rapt dev`, the *MCP server* tile of the
62
+ development launchpad points to it.
63
+
64
+ ```sh
65
+ rapt dev my-project # http://localhost:8080/mcp
66
+ claude mcp add --transport http travel http://localhost:8080/mcp # Claude Code
67
+ ```
68
+
69
+ For a client configured by a file (for example `.mcp.json`):
70
+
71
+ ```json
72
+ { "mcpServers": { "travel": { "type": "http", "url": "http://localhost:8080/mcp" } } }
73
+ ```
74
+
75
+ ## 4. Security
76
+
77
+ - In development (`AUTH_MODE=none`), the agent acts as the development user (`DEV_USER`,
78
+ `DEV_ROLES`).
79
+ - In production (`AUTH_MODE=oidc`), each MCP request carries a token of the IdP
80
+ (`Authorization: Bearer …`): the agent only has the authorizations of that user. The session
81
+ cookie of the browser is never accepted on `/mcp`.
82
+ - `MCP=off` disables the MCP server of an application built with `rapt/mcp.json`.
83
+
84
+ Limits: [KNOWN_GAPS.md](../KNOWN_GAPS.md#mcp-d47).