Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Manipulate Data in SQL Statement

Hello there!

I want to manipulate Data in a SQL Statement. For instance:

SELECT
   name
   age
FROM pers INTO CORROSPONDING FIELDS OF it_ppl WHERE company = '01'.

The outcome would be something like

Hans   25
Sam    23
Marie  28
Julia  23

So what if I want to add an column behind the selected data, where the data output should not be variable from the database but a konstant, fix value?

I tried it like that:

SELECT
   name
   age
   'Fix value' AS value
FROM pers INTO CORROSPONDING FIELDS OF it_ppl WHERE company = '01'.

Outcome should be like

Hans   25  Fix value
Sam    23  Fix value
Marie  28  Fix value
Julia  23  Fix value

The big question is: a) Is this possible with Open SQL and if so b) how?!

Thanks in advance,

kind regards,

Christof!

Former Member
Not what you were looking for? View more on this topic or Ask a question