UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
開発・技術 · SKILL.md

abap-snippet

abap-snippet

Run ABAP code snippet to very syntax, execute Function Modules or perform complicate queries.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: abap-snippet description: Run ABAP code snippet to very syntax, execute Function Modules or perform complicate queries.

What I do

I create a temporary ABAP class implementing the interface IF_OO_ADT_CLASSRUN and put your ABAP code snippet into implementation of the method IF_OO_ADT_CLASSRUN~MAIN.

I run syntax check for the temporary class and if there are no syntax errors, I execute the method IF_OO_ADT_CLASSRUN~MAIN and print the output of the execution into the standard output.

Basic usage: one-liner

echo "out->write( |Hello, { sy-uname }!| )." | sapcli abap run -

Multiple lines of ABAP code

sapcli abap run - <<EOF
  out->write( |Hello, { sy-uname }!| ).
  out->write( |Current date is { sy-datum }| ).
EOF

Running ABAP code snippet from file

First create a file snippet.abap with the following content:

out->write( |Hello, { sy-uname }!| ).
out->write( |Current date is { sy-datum }| ).

Then run the code snippet from the file:

sapcli abap run snippet.abap
保存したスキル