Repository navigation
v0.5.0
Data has types: from the source, from classes and interfaces, from the dictionary and from function modules. Screens and their dialog modules are in the call graph. Following calls can be limited and cancelled, and what was not found says why. Four corpora that their CI checks against an older release are checked here too, and all of abaplint's invalid test statements are rejected.
-
Types: declarations in symbols and the reads and writes in logic have their type in
data_type, as far as the sources tell it: built-in types with length and decimals, localTYPESresolved,LIKEresolved through the data object it names, tables, ranges and references with what they hold, components and table expressions. Inline declarations get the type of what the statement puts there: literals, string templates, constructor expressions (REF #( )andFILTER #( )included), table expressions, built-in functions, methods of classes in the source, table lines ofLOOP ATandREAD TABLE, the rows ofSELECT ... INTO @DATA(x), exceptions ofCATCH, classes ofCASE TYPE OF; and theFOR,LETandINDEX INTOnames of constructor expressions. The forms are those of the common old-and-new-syntax overviews;LOOP AT ... GROUP BYgroups are not typed yet. Dictionary types stay names, likematnrormara-matnr.DataTypehas the new kindsnamed,structure,table,rangeandref, anameand aline. -
Types from classes and more statements: methods, attributes and types of classes and interfaces type what they give: RETURNING types,
lo->mv_x,zcl=>gc_max,TYPE zcl=>ty_sand its components, inherited members and aliases included; through chains link by link (CAST zcl( lo )->get( )-id); in a workspace for every class it can load, SAP's classes through ADT too (checked on the SAP trial system withcl_abap_typedescrandxco_cp). Types of other classes are named with their class,zcl=>ty_s. Inline declarations in method arguments get the type of their parameter. New forms:ASSIGN ... TO FIELD-SYMBOL(<x>),SPLIT ... INTO,FIND ... RESULTS/SUBMATCHES/COUNT,APPEND/INSERT/COLLECT ... ASSIGNING/REFERENCE INTO,SELECT ... FROM @itab,INTO NEW @DATA(r)andINTO (@DATA(a), @DATA(b)),COND #/SWITCH #,lr->compof data references, constructor expressions inside conditions,abap_true/abap_false/space, numeric functions (abs,ipow,nmax,sqrt,round, ...), the calculation type of arithmetic expressions,LOOP ATandREAD TABLEover a table given as an expression, components withVALUEinBEGIN OF. Built-in function types follow SAP's documentation:xsdbool( )isc(1)typedxsdboolean,boolc( )string,line_exists( )none. On the cheat sheets 62.7% of inline declarations are typed file by file (from 52.2%), 66.5% in a workspace, 95.0% with an SAP system connected. -
Corpora at older releases: abap-wasm, abapPGP (both checked by their CI with abaplint against ABAP 7.50), open-abap-gui (against 7.40 SP08) and abapNTLM (against 7.40 SP02), all MIT, join the corpus. A new test requires that none of their 95,521 statements needs a newer release than the one checked, has a syntax error or is unknown. open-abap-gui brings 187 classic reports with screens, selection screens and dialog modules; its three folders are one corpus, so
corpora.txttakes several folders on a line. -
Dictionary types: in a workspace, data elements have their built-in type and name in
data_element(TYPE xubnameisc(12),XUBNAME), from ADT, which gives the domain's type with the data element, or from abapGit, which keeps it in the domain: new object kindDOMA,.doma.xml. Data elements typed as references are references. Dictionary structures and tables arestructurewith their name, and their components have their types, those of included structures and built-in columns (abap.dec(15,2),DATATYPECURR) included.LIKE bapiret2-messagetakes the column's type. Failed data element and domain lookups are notes, like those of table types. -
Function modules:
CALL FUNCTION 'Z_FM' IMPORTING ev = DATA(x)typesxby the parameter, in the function module's scope, dictionary types included. Function modules whose source has no signature, like those generated for table maintenance, get it from the abapGit XML of their function group (.fugr.xml), so their parameters are known to the call graph and to typing. -
Screens:
CALL SCREEN 100,SET SCREEN 200andLEAVE TO SCREEN 300are calls of the new kindscreen; in the call graph the flow logic of a program's screens calls its dialog modules, calls of the new kindmodulefrom the blockscreen 0100, with the event and additions likeAT EXIT-COMMANDas options. Screens are read from abapGit folders,DYNPROSof.prog.xmland.fugr.xmlwith their flow logic there or in.prog.screen_NNNN.abapfiles; selection screens count as screens. Over the corpus, 96.3% of 300 such calls resolve; the rest are in includes analyzed without their main program, or name screens missing in the repositories. -
Found with open-abap-gui:
CONV zif_x=>ty_name( ... ),VALUE,CONDand the other constructor expressions with a type of a class or interface read their operands, which were missed.AT SELECTION-SCREEN ON p_carr,ON END OF,ON VALUE-REQUEST FORandON HELP-REQUEST FORread the parameter.SELECT * FROM t100withoutINTOwrites the work area ofTABLES t100. -
Dynamic attributes in
ASSIGN:ASSIGN oref->(name) TO <fs>with a backquote literal no longer needs 7.57; SAP's release news of 7.57 only bringstruc-(comp), and an attribute name may be any character-like literal. Found on the 7.02 branch of abap2UI5, which abaplint checks against 7.02. -
Calls on constructor expressions:
NEW zcl( )->m( )andCAST zcl( x )->m( )are method calls of the class's method, followed through the chain; the first was taken for a second constructor call, the second was not found.DATA(x) = NEW zcl( )->m( )typesxby whatmreturns, not aszcl. The corpus call graph finds 173 more method calls, all resolved. -
Parameters of interface and redefined methods: in
METHOD zif_x~meththe parameters are those of the interface, in a method declaredREDEFINITIONthose of the superclass; both were untyped, since the class does not repeat the signature.GET BIT ... INTO DATA(x)andGET RUN TIME FIELD DATA(x)givei,GET TIME FIELD DATA(x)t,GET TIME STAMP FIELD DATA(x)timestamp(pof length 8), as SAP documents them. On abap-wasm, 300 files checked by abaplint against 7.50, 99.6% of inline declarations are typed (from 81.9%). -
Dictionary lookup for types: in a workspace, the lines of dictionary table types (new object kind
TTYP, ADTddic/tabletypes, abapGit.ttyp.xml) and the types of type groups (new kindTYPE, ADTddic/typegroups, abapGit.type.abap) type data:LOOP ATover astring_tablegivesstring,abap_compdescr_tabof type groupABAPits structure with components. Since these lookups only add types, a failed one is a note, not an error:table types: 2 lookups failed, their types stay names (first: TTYP:X: HTTP 406 ...), once per kind. Lengths given by constants take the constant's value. With the SAP trial system connected, 95.0% of the cheat sheets' inline declarations are typed. -
Fewer lookups: names like
zif_xare looked up as interfaces first,REF TO dataandREF TO objectnot at all;SELECT ... INTO (@a, @b)without a blank after the parenthesis writes its targets. -
Syntax checks: all 77 of abaplint's statements invalid at every release are rejected, from 69: unknown additions of
CALL TRANSFORMATIONand method calls in itsSOURCE, a call afterCREATE DATA ... TYPE HANDLE, an internal table without alias inMERGE ... USINGandWHEN MATCHEDafterWHEN NOT MATCHED,CLASS-METHODS ... FOR ENTITY EVENT,READ TABLE ... USING KEYwithWITH KEY, andWITHending a table type. None of the 321,490 corpus statements abaplint accepts is reported. -
Follow filters and limits:
followin the options (--follow,--skip,--limitin the CLI and the MCP server) loads only objects whose names match patterns likeZ*or a custom namespace/ABC/*, leaves out others, and stops after a number of objects; the objects given are always loaded. Objects not loaded are in the newskippedof call graph and logic, not inmissing, and the notes say when the limit was reached. A progress function is called after each object (progressin Node.js and Python,--progressin the CLI), and an analysis can be cancelled (signalin Node.js, aCancelTokenin Python,Workspace::with_cancelin Rust); it then finishes with what it has. -
Why calls are unresolved: the new
unresolvedof calls in the call graph says why a target was not found:dynamic,unknown_type,missing,lookup_failed,hierarchy_incomplete,not_followed,limit,cancelledornot_loaded. The compact text writes it, like(unresolved: not followed). -
Structured errors:
errorsof call graph and logic are objects instead of text:code(auth,http,network,io,other),object,cause,retryableand the HTTPstatus. Failures of the connection to an SAP system arenetworkand retryable, as are HTTP 408, 429 and 5xx. Objects whose loading failed are no longer inmissing.
Changes to existing output: schema_version is 2, since errors holds objects. Objects not loaded on purpose or whose loading failed are no longer in missing. Calls have the new kinds screen and module, and blocks the kind screen. In Rust, the functions of abap_analysis::json that load sources take Hooks (provider, progress, cancel) instead of a provider; SourceError has a new variant Network; ObjectKind has the new variants Ttyp, Type and Doma; SourceProvider has the new methods screens and function_interface, with defaults.