Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Table: if read into variable, check variable type #942

Open
g-back opened this issue May 12, 2020 · 0 comments
Open

Read Table: if read into variable, check variable type #942

g-back opened this issue May 12, 2020 · 0 comments

Comments

@g-back
Copy link
Contributor

g-back commented May 12, 2020

Example:

Structure read into regular variable, will probably cause false results. Compiler allows this:

" TYPES: BEGIN OF ty_buffer
"              input  TYPE erdat,
"              output TYPE syst_datum,
"            END OF ty_buffer.
" DATA buffer_foo TYPE TABLE OF ty_buffer.

DATA r_date TYPE syst_datum.
r_date = VALUE #( buffer_foo[ input = i_input ] OPTIONAL ).
" correct would be:
" r_date = VALUE #( buffer_foo[ input = i_input ]-output OPTIONAL ).

Same with Read Table:

READ TABLE buffer_foo INTO r_date WITH KEY input = i_input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant