Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

syntactically correct incorrect ABAP with functional methods parentheses

matt
Active Contributor
1,602

This is not syntactically correct, as expected.

cl_demo_output=>write(5).

This is syntactically correct and runs fine. Not expected.

REPORT.
cl_demo_output=>write(`some_text`).
cl_demo_output=>write( `some_text`).
cl_demo_output=>write(`some_text` ).
cl_demo_output=>display( ).

But the language definition says spaces are required after the opening parenthesis and before the closing.

This is not syntactically correct, as expected.

cl_demo_output=>write(5).

This is syntactically correct and runs fine. Not expected.

REPORT.
cl_demo_output=>write(`some_text`).
cl_demo_output=>write( `some_text`).
cl_demo_output=>write(`some_text` ).
cl_demo_output=>display( ).

But the language definition says spaces are required after the opening parenthesis and before the closing.

3 REPLIES 3
Read only

FredericGirod
Active Contributor
1,301

It is wrong with variables

data(text) = conv string(`some text`). 
cl_demo_output=>write(text).

it looks like the | command :

data(text) = |my text is created :{ sy-datum }|  

no space before text needed, but space between variable are mandatories

Read only

Jean_Sagi
Participant
1,301

For me is a compiler problem that has acompanied ABAP from a long time now (...just my opinion...).

Read only

matt
Active Contributor
0 Likes
1,301

I don't disagree.