Repository navigation
v0.4.0
The release each statement needs, syntax checks, and lineage for SAP_BASIS 7.50 systems and HR code: sources from the host, sy-subrc and system fields per statement, infotypes, locks and data clusters.
Changes to existing output: system fields are named by field (sy-dbcnt, before sy), steps carry implicit writes of system fields, and GET statements are steps. In Rust, the functions of abap_analysis::json that load sources take a source provider of the caller as a new last argument.
- Sources from the host:
fetchin the source options of Node.js and Python is a function of the host program, called with each object the analysis needs (CLAS:ZCL_X/implementations,FUNC:Z_FM, ...) and returning its source or nothing, e.g. from the host's own ADT client or cache. It is asked after the folders and before the SAP system; what it throws is listed inerrors. In Node.js only the…Asyncfunctions take it, a promise as its result included; the blocking ones throw aTypeError. In Rust it isabap_source::FnProvider, withProviderOptions::build_with. The JSON entry points inabap_analysis::jsonthat load sources take it as a new last argument. sy-subrcper statement: guards onsy-subrcname in the newsubrcthe statements that may have set the value they check.IF sy-subrc = 0after a READ TABLE andIF sy-subrc NE 0after a call inside it were one contradicting condition before. Statements that setsy-subrc, as SAP documents for each, write it (newimpliciton data accesses), so the data flow gives its sources: a write underIF sy-subrc = 0after a READ TABLE now depends on the table read. Method calls set it, PERFORM may. The compact text writessy-subrc = 0 [sy-subrc of 70]. System fields are each their own data object,sy-subrc,sy-dbcnt, no longersy.- System fields: the 171 fields of SYST are known with their types, as the structure SYST of an SAP system has them (abaplint agrees on 167; it has
sy-fdaywuntyped andsy-sponoas text). Their accesses have the new scopesystemand the newdata_type(kind, length, decimals, data element). Statements set them as SAP documents:sy-tabix(READ TABLE, LOOP AT, APPEND, COLLECT),sy-index(DO, WHILE),sy-dbcnt(database statements, FETCH, EXEC SQL),sy-fdpos(SEARCH, CO, CN, CA, NA, CS, NS, CP, NP),sy-tfillandsy-tleng(DESCRIBE TABLE), the message fields (MESSAGE). Reads of them come from those statements, so a value written fromsy-dbcntdepends on what the SELECT before read; fields of the runtime, likesy-datum, are no inputs of effects, since callers do not pass them. - Clusters in database access:
EXPORT ... TO DATABASE dbtab(ar) ID id,IMPORT ... FROM DATABASE,IMPORT DIRECTORYandDELETE FROM DATABASEare database accesses of the table (modify,select,delete), with the newcluster: area, ID and the names in the cluster; exported data insource, imported data intarget. They were only in the logic effects. The compact text writesmodify pcl2(ru) cluster. - Locks: lock modules are no longer followed into their generated code;
ENQUEUE_<lock object>writes the new storelock:<lock object>(Store::Lock),DEQUEUE_deletes it,DEQUEUE_ALLdeleteslock:*. Lock objects start withE, soENQUEUE_READis no lock module. - HR infotypes:
INFOTYPES nnnnis a declaration (kindinfotype) of the tablepnnnn, so the table is global data. The infotype number decides the table:HRPnnnnfor personnel planning (1000 to 1999, 5000 to 5999),PBnnnnfor recruitment (4000 to 4999) and applicants, elsePAnnnn; customer infotypes (9000 to 9999) after the reader,HRPfor PCH andRH_READ_INFTY. AtGET PERNRandGET PERASthe logical database fills the infotype tables inPA, atGET OBJECthose inHRP, each from its own, apart fromMODE N.HR_READ_INFOTYPE,RH_READ_INFTY,RH_READ_INFTY_1001andRP-READ-INFOTYPEread the table of the infotype they name. The macrosRP-PROVIDE-FROM-LAST/-FRST,RP-READ-INFOTYPEandRP-SET-DATA-INTERVALread and write their arguments, after SAP's description of their use; their definitions are not read.GETstatements are steps now. - Releases: each statement gets the oldest on-premise ABAP release that has everything it uses, from 7.02 to 8.16, with the construct that needs it, like
7.40 SP02: inline declaration. Newreleaseanderroron statements. New commandabap release <file> [--release 750]gives the release a file needs and the statements newer than a given release. 98.2% of the corpus statements get the release abaplint gives; all but 3 of the rest are cases where abaplint reads newer syntax as older or dates predicate functions later. The oracle has a new mode,--releases, that parses the corpus once per release. - Releases from SAP's release news: where abaplint dates an ABAP SQL construct differently from SAP's ABAP release news, the release news win.
INTO @DATA(x)needs 7.40 SP08 (abaplint: SP05), searchedCASE WHENSP08, path expressions 7.50 and with parameters or filters 7.52,CROSS JOIN7.51, hierarchies 7.53, window expressions (OVER) andINTO … INDICATORS7.54 (abaplint: 7.57 and 8.16),LIKE_REGEXPR,OCCURRENCES_REGEXPRandREPLACE_REGEXPR7.55,SUBSTRING_REGEXPR7.56. New:FIRST_VALUE,LAST_VALUE,NTILEand window frames (ROWS BETWEEN) 7.55,INDICATORS … NULL BITFIELD7.56, inline declaration inOPEN CURSOR7.51. The comparison with abaplint counts these apart: 146 corpus statements and 90 abaplint cases. abaplint cases met: 99.0%, from 98.0%. - Syntax errors: checks for errors of known kinds, like a keyword as a column, parameter sections out of order or
PACKAGE SIZEwithout a table. They report 69 of abaplint's 77 cases that are invalid at every release, and none of the corpus statements abaplint accepts. - SAP macros: calls of the macros of the logical database PNP (
RP-PROVIDE-FROM-LAST,RP-PROVIDE-FROM-FRST,RP-READ-INFOTYPE,RP-SET-DATA-INTERVAL), which HR reports use without defining them, areMacroCallstatements instead ofUnknown. Macros with dashes in their names,DEFINE my-mac., are expanded; only the part before the first dash was the name. - Field groups:
INSERT f1 f2 INTO headerisInsertFieldGroup, not an internal table insert. - Text literals: a literal in quotes ends at its closing quote also when no blank follows, as in SQLScript
'x';, like abaplint 2.120.86. - abaplint 2.120.86: the reference is updated from 2.120.60, with its statement test cases extracted again.
- Older SAP systems: tested against an ERP on SAP_BASIS 750 SP35.
- What a system offers is read from its ADT discovery, not assumed from its release.
- Data preview queries the system rejects fall back to the table preview, with single-table queries.
- The enhancement lookup no longer filters on
ENHINCINX-FULL_NAME, a long string that SAP_BASIS 750 rejects in a condition. This was the HTTP 400 for every function module. - Data elements are requested in the version the system lists.
- Notes: a lookup the system cannot do is no longer an error. It is a note in the new
notesof call graph and logic results, likeenhancements: not available (the ADT discovery has no enhancements/enhoxhh to read their code, SAP_BASIS 750 SP 0035). Answers that could not be given are not cached. - Mock of SAP_BASIS 750:
abap mock-adt --release 750(MockRelease::Basis750in Rust) acts like the ERP measured. It has that system's discovery and component list, and serves data elements only in XML version 1 (406 otherwise), structures but no tables, and no enhancement code. Its data preview answers the queries of the ADT provider from the class relations, BAdIs and enhancements of the served folders. It rejects what 7.50 rejects: long strings inWHEREand lines over 255 characters. A test checks that the call graph over it matches the one read from the folder, with one note. - Request log:
ABAP_ADT_LOG=1writes every ADT request to stderr: method, path, status, duration, and the SQL of data preview queries. It never writes headers, cookies, tokens or credentials. - Fix: two parallel loads of the same object could make a cache write fail.
- Fix: parallel loads asking for the same BAdI each sent the lookup to the system; now one asks and the others wait. The 7.50 mock showed it: one query went out six times in one call graph.
- Formatting: Markdown, JavaScript and JSON are formatted with prettier 3.9.10 (
.prettierrc.json,npm run --prefix tools format), checked in CI, so editors formatting on save no longer change them. - Corpus: three HR projects with logical database PNP,
INFOTYPESand payroll clusters. The oracle reads plainNAME.abapfiles as programs.