sap-unused-code

Analyze SCMON usage data and static where-used analysis to classify SAP ABAP custom code.

156|39|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/arc-mcp/arc-1 --skill sap-unused-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sap-unused-code
Source: https://github.com/arc-mcp/arc-1/tree/main/skills/sap-unused-code
Command: npx skills add https://github.com/arc-mcp/arc-1 --skill sap-unused-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify unused SAP custom code (Z/Y objects) that are never called at runtime, facilitating code cleanup and retirement projects.

Core Features & Use Cases

  • Combined Analysis: Combines SAP call monitor (SCMON) usage data with static where-used analysis to classify code as UNUSED, LIKELY_UNUSED, USED, or INDETERMINATE.
  • Scope Filtering: Allows users to filter by package, namespace prefix, object list, or specific intent statements.
  • Option Selection: Provides options to use direct SCMON table join, aggregated SUSG via CDS views, or manual SUSG XML export.
  • Prerequisites Check: Verifies necessary system configurations and authorizations before execution.
  • Runtime Usage Query: Offers different approaches to querying runtime usage based on system state.
  • Static Where-Used Check: Performs a static where-used check for objects not in the runtime usage set.
  • Classification: Classifies objects based on runtime and static analysis.
  • Reporting: Generates a report with classification details, usage data, and deletion candidates.
  • Error Handling: Provides comprehensive error handling and guidance for troubleshooting common issues.

Quick Start

To find unused custom code in the Z_FI_CUSTOM package, use the command: sap-unused-code --package Z_FI_CUSTOM

Frequently Asked Questions about sap-unused-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify unused ABAP custom code for retirement in SAP?

Identify unused SAP custom code by analyzing SCMON usage data and static where-used analysis together. This approach classifies ABAP objects as UNUSED, LIKELY_UNUSED, USED, or INDETERMINATE to guide code cleanup and retirement projects.

What is the difference between SCMON and SUSG data when finding unused SAP code?

SCMON provides raw runtime call monitor data, while SUSG offers aggregated usage data via CDS views. You can query SCMON through a direct table join, use aggregated SUSG views, or manually import a SUSG XML export to find unused code.

How do I check unused custom code in a specific SAP package?

Check unused custom code in a specific SAP package by applying scope filters. Use a command like `sap-unused-code --package Z_FI_CUSTOM` to limit the analysis to Z/Y objects within that package namespace.

Do I need SCMON data to run static where-used analysis on SAP ABAP systems?

You need access to SCMON and SUSG data to identify runtime usage, but static where-used analysis is performed on objects not found in the runtime usage set. The Skill checks prerequisites and authorizations before execution.

Why does my SAP code show as INDETERMINATE instead of UNUSED during cleanup analysis?

SAP code shows as INDETERMINATE when runtime usage data and static where-used analysis yield conflicting or incomplete signals. The Skill classifies objects this way to prevent accidental deletion of potentially active code.

Can I filter SAP code cleanup results by namespace prefix or object list?

Filter SAP code cleanup results by package, namespace prefix, object list, or specific intent statements. This scope filtering ensures the analysis targets only the relevant Z/Y custom objects for your retirement project.