Skip to content

Why generic AI writes poor ABAP

General AI models write tidy ABAP syntax, but they do not know the SAP-specific tables, fields and modern patterns well enough. That is where it goes wrong in practice.

In short

ABAP is the programming language of SAP. Ask a general AI model for ABAP code and you get something that looks good. Yet it often goes wrong: wrong field names, tables that do not exist, or patterns SAP has advised against for years. The model knows the language, but not the SAP system.

Where it goes wrong

  • Domain knowledge. Which table holds which data and exactly what the fields are called is barely on the internet. A model guesses, and a field name that is one letter off does not work.
  • Outdated patterns. A lot of old ABAP code is public. A model picks up those habits, while modern SAP development follows different conventions.
  • Integration types. RFC function modules, OData V2, OData V4 and RAP each need their own approach. A general model mixes them up.

In our own tests, a large, general code model scored about 5.5 out of 10 on tasks like these.

How it can be done better

  • Knowledge from the system itself. The metadata of an SAP system (tables, fields, relationships) as a reference for the model.
  • Let SAP check it. Run all generated code through the syntax check of a real SAP system first, before anyone uses it.
  • A specialised model. Fine-tune a small model on checked examples.
  • AI instructions in the platform. Known pitfalls and working patterns are supplied with every answer, so the AI does not have to guess.

We are working on exactly that combination: a local ABAP model, trained on examples checked by our own SAP lab. No code goes to the cloud.

What to watch out for

Use AI for ABAP as an accelerator, not as a replacement for SAP knowledge. Always have code checked, by the system and by someone who knows SAP.

Would you like advice on AI for SAP development? Request a free advice conversation.

Updated on