Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
larshp
Active Contributor
Renaming ABAP objects is a tedious task, but can be necessary eg when sharing template code to avoid name clashes, or when changing the namespaces of objects.

abaplint can help to rename CLAS and INTF objects, it can run standalone on most CI pipelines like GitHub Actions. Code changes are performed by looking at semantics, ie. not regex-based.

Just setup the configuration,
"rename": {
"output": "renamed",
"skip": [],
"patterns": [{"type": "CLAS|INTF", "oldName": "(.*)_rename", "newName": "$1_foobar"}]
},

 

and execute "abaplint --rename" via command line. As this is a generic tool, it can be used for various purposes, as the following example,

 

Practical Example: Orchestrating Changes


abapGit utilizes the ajson project by atsy, but it should still be possible to build the standalone report, not imposing requirements on the customer system.

This is solved by copying the ajson code, automatically renaming it, and opening a pull request with changes,

 


Overview


 

There is a daily job in the ajson_mirror repository which checks for code changes, renames, and pushes changes directly to ajson_mirror.

Similarly, for the abapGit repository, a job runs and opens a pull request with the updated renamed ajson code.

A developer can then review the changes and merge to the main branch, if there are any breaking changes, abaplint will find these and block the possibility to merge.
13 Comments
Sandra_Rossi
Active Contributor
Thanks (again) for this illuminating blog post. I am a complete noob and I wanted to understand how it works. I have looked carefully at all the files you mention, and I don't find in the ajson_mirror action where do you indicate "abaplint --rename" so that to trigger automatically the renaming. If I understand well "abaplint --rename" uses the configuration in abaplint.json but I don't see where is the rename configuration; I found it in abaplint_rename.json but I don't understand how "abaplint --rename" can refer to a different json file. Could you explain a little bit more how it works or give some links? Thank you very much!
larshp
Active Contributor

Yea, there are some dots to connect 🙂

The action triggers "npm run mirror", which performs multiple steps from https://github.com/abapGit/ajson_mirror/blob/main/package.json#L12, see documentation from NPM how the package.json works

Sandra_Rossi
Active Contributor
0 Kudos
Thanks, I got it now 🙂
larshp
Active Contributor
If you have NodeJS installed on your local pc, then its also possible to clone the project, run "npm install && npm run mirror" to try it out
former_member183260
Participant
0 Kudos
good
larshp
Active Contributor
DOMA + DTEL + TABL + TTYP renaming support implemented, bug reports welcome
former_member610590
Participant
0 Kudos
Hi Lars,

a some question ahead from this renaming but still about open source:

why you have closed project with S3 ( l mean this one https://github.com/larshp/AWS_S3_SDK_for_ABAP_Z  ).

I found some issues and resolve them. as I understood you do not want to deal with that; is it fine if I start new/forked project ?
larshp
Active Contributor

you are free to what is mentioned in the license, note that it is GPL, https://github.com/larshp/AWS_S3_SDK_for_ABAP_Z/blob/master/LICENSE

There is also some stuff at https://github.com/tmhew/abap-aws-s3

But anyhow, its the wrong approach IMHO, AWS offers a lot of services, much of the client code should be auto generated via https://github.com/abap-openapi/abap-openapi-client

former_member610590
Participant
0 Kudos
Thanks for the reply! and for the link to the "some stuff"

actually I was interested why you have closed (stopped) this development ? 🙂 are you disappointed with communication ABAP-S3?) or there were some license issue?
larshp
Active Contributor
As noted in the readme, its not my development "This is a fork, original code by https://github.com/linkeit", and personally I dont really see how GPL licensed can be used in a business application, you would have to open source your full business application as GPL too.
larshp
Active Contributor
plus MSAG
ennowulff
Active Contributor
0 Kudos
and PROG?
larshp
Active Contributor

currently not supported, but open an issue at https://github.com/abaplint/abaplint/issues then we can track the progress(if any)