Ccodemod

codemod/abap-subroutine-pass-by-reference

Rewrite ABAP FORM subroutine signatures to remove VALUE(...) wrappers from USING and CHANGING parameters so they pass by reference.

abapformsubroutinepass-by-referencetransformation
Public
0 executions

Run locally

npx codemod @codemod/abap-subroutine-pass-by-reference

@codemod/abap-subroutine-pass-by-reference

Rewrite ABAP FORM subroutine signatures to remove explicit pass-by-value wrappers from USING and CHANGING parameters. The codemod converts VALUE(parameter) declarations into plain parameter names so subroutine parameters are passed by reference.

Installation

bash

Usage

This codemod targets ABAP source files matching **/*.abap and rewrites FORM declarations like:

abap

into:

abap

Preserve behavior:

  • Only FORM definitions are rewritten.
  • VALUE(...) in comments is left unchanged.
  • PERFORM calls and non-FORM declarations are left unchanged.

Implementation note:

  • ABAP is not a parser-backed JSSG language here, so the transform uses a source-text rewrite scoped to FORM ... . statements.

Development

bash

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.