‎2022 Sep 13 1:31 PM
Hi Experts,
can you please tell me how to declare two variables using one @data for inline declaration.
‎2022 Sep 13 1:42 PM
‎2022 Sep 13 1:59 PM
As an old friend would say, "the juice is not worth the squeeze".
‎2022 Sep 13 2:40 PM
Hi venkatesh.maddala,
That is not possible to declare two variables using one @data for inline declaration at a time.
For internal table inline declaration @data should be used.
For Reference Check the code below :
SELECT *
FROM mara
INTO TABLE @DATA(it_mara).
For, Inline declarations you can refer these links.
FIELD-SYMBOL - Inline Declaration - ABAP Keyword Documentation (sap.com)
Inline Declarations in ABAP 7.4 (saplearners.com)
I hope you Understood,
If It helps, please accept this answer.
Regards,
Berinath Ulisi.
‎2022 Sep 14 9:07 PM
Hi, b_5412:
I made a slight edit to the final sentence of your answer.
As a general rule, members consider it poor etiquette to ask for rewards, but it's perfectly acceptable to ask posters to accept your answer if it helps them. And, in fact, if a poster accepts an answer, then the thread becomes helpful for other members facing similar issues.
Please do keep this in mind when answering questions in future.
Thanks so much for lending your expertise to the community!
All the best,
--Jerry
‎2022 Sep 15 9:35 AM
Thanks jerry.janda. I just submitted this idea.
I'm not asking to vote for this idea 😉
‎2022 Sep 16 8:30 AM
sandra.rossi
Rejected. Oh well. You tried!
Decision Reason:
Out of scope
This is simply not something we will add for a multitude of reasons, we will not punish a user and remove their answers from the community simply because they chose to use verbiage that is disliked.
Instead, I guess, the community will punish by down-voting.
‎2022 Sep 16 9:36 AM
matthew.billingham If you copy one text then please add the context. Note that I was mistaken, it's not in the Rules of Engagement, it's in Ask and Answer Questions on SAP Community ("If you asked a question and got the answer you need, simply Accept.")
The idea:
My comment after rejection:
‎2022 Sep 13 5:04 PM
It's for one variable. But it can be a structure with several components, etc.
‎2022 Sep 16 8:35 AM
Hi,
I am not able to understand the context in which you need to declare multiple variables with a single @data.
Usually the questions should come with proper business requirement or problem requirement. Orbitrary question some times won't be having any proper answers
Regards,
Sreenivasa, L