sapstack: Instructions file for GitHub Copilot

.github/instructions/abap.instructions.md

sapstack abap.instructions.md is an instructions file for GitHub Copilot from BoxLogoDev/sapstack. It costs 571 tokens per session, scanned A, original, MIT.

A set of rules for writing ABAP, SAP's programming language, with guidance for database access, S/4HANA compatibility, error handling, security, and extensions.

In plain words
What is it for?
Use it when developing or reviewing ABAP programs, BAPIs, CDS views, RAP actions, BAdIs, and related SAP integrations.
Why use it?
It helps avoid slow queries, outdated data access, unsafe changes to standard SAP objects, missing error checks, hardcoded business values, and exposed personal data.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is BoxLogoDev/sapstack's own configuration. It tells GitHub Copilot how to work on sapstack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sapstack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BoxLogoDev/sapstack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BoxLogoDev/sapstack/main/.github/instructions/abap.instructions.md
Clone the repo
git clone --depth 1 https://github.com/BoxLogoDev/sapstack

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sapstack abap.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/boxlogodev/sapstack/abap/github.svg)](https://agentmods.dev/instructions/boxlogodev/sapstack/abap)
Your own site
<a href="https://agentmods.dev/instructions/boxlogodev/sapstack/abap"><img src="https://agentmods.dev/badge/instructions/boxlogodev/sapstack/abap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sapstack abap.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/boxlogodev/sapstack/abap"><img src="https://agentmods.dev/badge/instructions/boxlogodev/sapstack/abap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 571 This file is loaded in full into every session.
When invoked 571 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00571 $0.00571
Opus 5.5 $0.00228 $0.00228
Sonnet 5.5 $0.00114 $0.00114
Haiku 4.5 $0.00057 $0.00057

Measured 1mo ago against content hash cfb53f88d0d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sapstack abap.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/abap.instructions.md · 58 lines

What it actually says

ABAP Instructions (GitHub Copilot)

이 파일은 ABAP 파일을 편집할 때만 적용되는 Copilot 지침입니다.

기본 규칙 (Clean Core + HANA + K-SOX)

SELECT 최적화

  • ❌ SELECT * FROM ... — 금지
  • ✅ 필요 필드만 SELECT + WHERE 조건 (PK/인덱스)
  • ❌ LOOP AT ... SELECT ... (N+1 문제) — 금지
  • ✅ FOR ALL ENTRIES (empty check 포함) 또는 JOIN

S/4HANA 대응

  • BSEG → I_JournalEntryItem CDS 사용
  • MKPF/MSEG → I_MaterialDocumentItem CDS
  • KNA1/LFA1 직접 접근 금지 → Business Partner 사용
  • CALL TRANSACTION 백그라운드에서 금지 → BAPI / RAP action

에러 처리

  • 모든 BAPI 호출은 RETURN 테이블에서 type = 'E' 또는 'A' 체크
  • 오류 시 BAPI_TRANSACTION_COMMIT 호출 금지
  • 오브젝트 참조 메서드 호출 전 IS BOUND 체크
  • TRY-CATCH는 위험한 작업(파일 I/O, 동적 변환, 외부 호출)에만

Clean Core

  • 표준 SAP 오브젝트 직접 수정 금지 (BAdI / Enhancement Spot / CDS 확장 사용)
  • Access Key 사용 = 위험 신호
  • Z-프로그램은 반드시 Z*/Y* 접두어

보안

  • 민감 데이터 접근 전 AUTHORITY-CHECK
  • 하드코딩된 비밀번호·API 키 금지
  • 한국 개인정보(주민번호, 연락처)는 로그 출력·UI 표시에서 마스킹 필수

하드코딩 금지

  • 회사코드, G/L 계정, 원가센터, 플랜트 등 고정값 금지
  • TVARV / Z-테이블 / DDIC Domain / .sapstack/config.yaml 활용

권장 패턴 예시

자세한 코드 예시는 plugins/sap-abap/skills/sap-abap/SKILL.md의 "Section 3 — Code Patterns with Full Examples"를 참조하세요:

  • New BAdI
  • ALV OO 방식
  • BAPI 에러 처리
  • CDS View
  • RAP Behavior Definition
  • ABAP Unit Test

성능 Quick Check

SAP Note 참조:

  • 2161145 — S/4HANA SQL Optimization Guidelines
  • 2313884 — Custom Code Migration Tool (ATC)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 58 lines · 571 tokens per session scan A cfb53f88d0d8

Subscribe to this mod's changes

sapstack abap.instructions.md is an instructions file published in the GitHub repository BoxLogoDev/sapstack (20 stars, last pushed 19d ago), licensed MIT. It adds 571 tokens to every session, about $0.0023 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,257 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,159 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens