abap/run: add support for simple macros/templates/variables#175
Conversation
Creating an ABAP snippet is cool for quick testing but we can use
these ABAP snippets to overcome missing RFC connectivity and call
much more versatile ABAP snippets doing some real stuff.
Lets start small without external dependencies and without complex
features like custom functions similar Ansible filters - we can do that
latter if needed.
This patch just introduces the possibility to put "{{NAME}}" into ABAP
snippet and then specify `--define NAME=foo` in the command `sapcli abap run`.
Sure, similar feature can be achieved by piping via sed (but that's no
go for Windows users). The needed ABAP snippet with the needed value
can be generated by LLM but tokens are getting expensive. So when
developing agents skills you can put your uber-cool ABAP snippet doing
some fantastic job into assets/ and instruct the agent to call it with
the needed --define instead of burning tokens on generation of the
entire ABAP snippet based on some template.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR adds ABAP source preprocessing to substitute template tokens in provided ABAP source code. The ChangesABAP Preprocessing Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Creating an ABAP snippet is cool for quick testing but we can use these ABAP snippets to overcome missing RFC connectivity and call much more versatile ABAP snippets doing some real stuff.
Lets start small without external dependencies and without complex features like custom functions similar Ansible filters - we can do that latter if needed.
This patch just introduces the possibility to put "{{NAME}}" into ABAP snippet and then specify
--define NAME=fooin the commandsapcli abap run.Sure, similar feature can be achieved by piping via sed (but that's no go for Windows users). The needed ABAP snippet with the needed value can be generated by LLM but tokens are getting expensive. So when developing agents skills you can put your uber-cool ABAP snippet doing some fantastic job into assets/ and instruct the agent to call it with the needed --define instead of burning tokens on generation of the entire ABAP snippet based on some template.