# find-callers-of-deprecated-bapi.rq # ----------------------------------------------------------------------------- # Find every custom artifact in a given system that calls a deprecated BAPI. # Returns: the caller's name, type, tier-1 evidence, and the deprecation notice # that justified the flag. # # Parameters (substitute before running): # $bapi — atlas:artifactName of the deprecated BAPI (e.g. "BAPI_PO_CREATE1") # $system — sourceSystem of the engineering case (e.g. "my-prod") PREFIX atlas: PREFIX rdfs: PREFIX xsd: SELECT ?callerName ?callerType ?deprecation ?deprecationDoc ?section WHERE { # the deprecated BAPI, looked up by name ?bapi a atlas:BAPI ; atlas:artifactName $bapi . # the deprecation notice pointing at it ?deprecation a atlas:Deprecation ; atlas:guidesFrom ?bapi ; atlas:citesDocument ?deprecationDoc . # callers: any custom artifact that references the BAPI ?caller atlas:belongsToModule ?module ; atlas:artifactName ?callerName ; a ?callerType . FILTER (strstarts(?callerName, "Z") || strstarts(?callerName, "Y")) # where the caller was sourced ?caller atlas:supportedByStatement ?section . ?section atlas:sourceURL ?srcURL . FILTER (contains(str(?srcURL), $system)) } ORDER BY ?callerName