How to generate ABAP code, and what code generation really changes in ABAP development cost
ABAP code can be generated in several ways: SAP's own tools and templates (screen painter, the table maintenance generator, RAP generators in ADT), pattern-based snippets, and now AI assistants that draft programs, unit tests and specifications from a description or from existing code. Generation cuts the cost of boilerplate such as a report with a selection screen or an extra dialog screen, but it does not remove the expensive parts: understanding the business rule, finding the right tables and APIs, testing against real data and transporting safely.
When this makes sense
- You are budgeting a RICEFW list and want to know which objects code generation can make cheaper
- Your developers already use AI assistants and you need review rules before generated code reaches production
- You have years of undocumented custom programs and want specifications generated from the code
- A partner quotes ABAP effort per object and you want to judge whether the estimate is realistic
- You need small dialog changes, such as adding a separate screen to an existing program, and want to know what that costs
What the engagement covers
Generator inventory
Which SAP-delivered generators apply: SE54 table maintenance, SE51 screen painter, ALV output via the SALV classes, the RAP generator wizards in ABAP Development Tools, and ADT templates for CDS views and classes.
AI-assisted drafting
Drafting reports, selection screens, BAPI calls, exception classes and ABAP Unit tests from a functional description, with your naming conventions and release level as constraints.
Reverse specification
Generating technical specifications from existing programs: tables read and written, BAPIs and function modules called, user exits touched, authorisation checks and selection logic.
Code review and ATC gates
Running ABAP Test Cockpit and Code Inspector checks on generated code, plus a human review for performance (SELECT in loops, FOR ALL ENTRIES on empty tables) and security.
Estimation model
Splitting effort per object into specification, build, unit test, integration test and transport, and showing which slice generation shortens.
Dialog programming changes
Adding screens, subscreens and tab strips to module pool programs, PBO and PAI modules and the data exchange between program and screen.
How it runs
- 1
Object list and classification (1-2 weeks)
- Classify each RICEFW object by type and complexity
- Mark objects suited to generators or AI drafting
- Agree estimation units
- 2
Pilot (2-3 weeks)
- Build a sample of objects with and without generation
- Measure review and rework time
- Adjust estimates from the measured results
- 3
Build (Depends on object count)
- Generate drafts and complete business logic
- Run ATC and peer review
- Write and run ABAP Unit tests
- 4
Test and transport (1-4 weeks per release)
- Integration testing with business users
- Transport sequencing to quality and production
- Hand over documentation
What you get
- Classified RICEFW list with effort per object and per phase
- Generated and reviewed code with ATC results
- ABAP Unit test classes for testable logic
- Technical specifications, including ones reverse-generated from legacy code
- Coding guidelines for AI-assisted ABAP, with review checklist
- Estimate versus actual comparison from the pilot
What drives cost and effort
| Object type mix | Reports, ALV outputs and table maintenance gain most from generation; complex enhancements and interfaces gain little because the logic is the work. |
| Quality of functional specifications | Vague specs make generated code wrong faster, and rework cancels the saving. |
| Release level | Classic ABAP on ECC and ABAP Cloud on S/4HANA need different patterns; a generator tuned for one produces unusable code for the other. |
| Review and testing standards | Generated code still needs ATC, peer review and test data, and these steps dominate cost on small objects. |
| Access to real data | Testing against representative data in quality catches the performance and edge-case issues that drafts miss. |
| Transport and change control | Strict CAB processes add fixed overhead per object regardless of how fast the code was written. |
Fixed price per object class
Well-specified, repeatable objects such as reports, forms and simple interfaces.
Time and materials with a cap
Enhancements and changes to legacy code where the unknowns are in the existing program.
Retained development capacity
A steady stream of small changes where a monthly pool of hours is easier than quoting each one.
Questions to ask any SAP consultant
Which parts of your estimate assume code generation, and what do you charge if it does not help?
You want the saving shown per object, not hidden in a lower day rate that later turns into change requests.
What review gate does generated ABAP pass before transport?
ATC findings, performance anti-patterns and missing authority checks are common in drafted code.
Is your AI tooling run on infrastructure where our code and table names stay private?
Custom ABAP reveals business rules and data structures; know where it is sent and stored.
Do you write ABAP Unit tests or only manual test scripts?
Unit tests cost little to generate and reduce regression cost in later upgrades.
Can you show an estimate versus actual record for similar objects?
Realistic estimators can explain where past objects overran and why.
Score candidate partners side by side with the free Implementation Partner Scorecard
Where these projects go wrong
Generated code that compiles but is slow on production volumes
Review SELECT patterns and test in quality with production-sized data before transport.
Code that ignores your release or clean-core rules
State the target release and allowed APIs in the prompt or template, and enforce with ATC variants.
Specifications drifting from code
Regenerate the technical spec from the final code at handover instead of keeping the draft spec.
Intellectual property and data leakage
Use private or approved AI services and keep production data out of prompts.
If you need a handful of standard reports or a table maintenance dialog, SAP's own generators and a capable internal developer are enough; no consultant or AI tool is required. Code generation matters when you have dozens of objects or a large undocumented code base to explain. Treat any quote that claims large savings across all object types with caution: interfaces, enhancements and performance work are still mostly thinking and testing.
Frequently asked questions
Can AI write production-ready ABAP?
AI can draft reports, classes and tests that are close to usable when given the release level, tables and conventions. It still makes mistakes with table relationships, authorisation checks and performance, so every object needs review and testing before transport.
How do I add a separate screen to an ABAP program?
In a module pool you create a new screen number in SE51 or SE80, design its layout, add PBO and PAI modules, and call it with CALL SCREEN or SET SCREEN, or as a modal dialog with CALL SCREEN STARTING AT. Fields named like global program variables are exchanged automatically between program and screen. For reports, a selection screen defined with SELECTION-SCREEN BEGIN OF SCREEN is often simpler.
Can specifications be generated from existing ABAP code?
Yes. Parsing a program for tables, function modules, BAPIs, exits and selection logic gives a solid first draft of a technical specification. A developer should still confirm the business meaning of conditions and constants.
How is ABAP development usually priced?
Common models are effort per object by complexity class, time and materials, or a monthly hours pool. Specification and testing often take as long as writing the code, so compare estimates on all phases, not build only.
Does Netray generate ABAP with AI?
Netray uses AI agents for drafting, code review and reverse documentation, run privately where the customer requires it, with partner ABAP specialists reviewing the result. It is one tool in the estimate, not a promise that every object gets cheaper.