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

Two variables with one @DATA

0 Likes
10,018

Hi Experts,

can you please tell me how to declare two variables using one @data for inline declaration.

9 REPLIES 9
Read only

thkolz
Contributor
0 Likes
8,822

Not clear to me.

And what should be the benefit?

Read only

Tukutupap
Participant
0 Likes
8,822

As an old friend would say, "the juice is not worth the squeeze".

Read only

Berinath_Ulisi
Participant
0 Likes
8,822

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.

Read only

8,822

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

Make sure to subscribe to What's New!
Read only

0 Likes
8,822

Thanks jerry.janda. I just submitted this idea.

I'm not asking to vote for this idea 😉

Read only

matt
Active Contributor
0 Likes
8,822

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.

Read only

8,822

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:

  • Please describe your improvement request
  • A long time ago, with the old forum, people who want to use the forum as a Curriculum Vitae or whatever reason, used to add a sentence like "please reward" or "please accept this answer if it helps".
  • Hopefully this habit disappeared with the new forum as moderators removed these sentences.
  • But I saw this habit starts to happen again (https://answers.sap.com/comments/13717877/view.html and others).
  • I propose to add a new reason in Alert Moderator "ask for reward". It will be obvious for all moderators that this should not be permitted.
  • What is the opportunity/problem the request will address?
  • I consider it like a supplication, like noise (like text in upper case) and rude in some way as it says to the readers they don't know the Rules of Engagement. We should not repeat any part of the Rules of Engagement in the questions, answers, blog posts.
  • What is the expected benefit?
  • Less supplications, less noise, less "rude".

My comment after rejection:

  • I was not asking to "remove the answer", it was about avoiding "I will reward" in all questions, avoiding "please reward" in all answers, avoiding "please vote for my blog post", i.e. avoiding any text which repeats the Rules of Engagement to avoid noise (the same as in Stack Exchange sites). It's not something that should be considered an attack against people who post this kind of sentence, it's about learning them that it's not needed to repeat the Rules of Engagement in all their interventions.
Read only

Sandra_Rossi
Active Contributor
0 Likes
8,822

It's for one variable. But it can be a structure with several components, etc.

Read only

0 Likes
8,822

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