Application Development 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: 

Add a new column in a internal table

0 Kudos

How can I add a new column to a internal table using APPEND ?

I have already created a table in SE11 and I want to add a new column with the content 'Concluido' at the end of each row of the table.

How can I do that ?

Thank you

7 REPLIES 7

sveabecker
Community Advocate
Community Advocate
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Please add more details to your question, e.g. you can also add a screenshot. With that, you can reach a broader range of experts to get your question answered. I also recommend to do this tutorial https://developers.sap.com/tutorials/community-qa.html

The more details you provide, the more likely it is that members will be able to assist you.

Regards, Svea

SAP Community moderator


----- Stay up-to-date with SAP Community and subscribe to What's New today! -----

ziolkowskib
Active Contributor

Hi maria_ines_almeida:

Question: How can I add a new column to a internal table using APPEND ?
Answer: You can't add a new column to an internal table using APPEND.
If that is not the answer please elaborate on your question a bit further.
Regards,
Bartosz

Softwaris
Participant
0 Kudos

You don't add columns with APPEND, you add columns to a table thru SE11 also. Just look up your table with SE11 and add a field with related data types, etc:

matt
Active Contributor

Unless you use an APPEND structure.

matt
Active Contributor

If it's via SE11, it's not an internal table. That is an abap construct, not a data dictionary construct.

former_member1716
Active Contributor
0 Kudos

maria_ines_almeida,

As already suggested above can you please explain what is the actual requirement here?

1) You want to add a column to your database table and you want to have a constant value for it?

or

2) You want to add a column to your internal table and you want to have a constant value for it?

Are you displaying any report?

Help us with your input!

gasparerdelyi
Active Participant
0 Kudos

If you mean the following statement

APPEND row TO itab.

then there is no way, of course.

However, if you mean using an append structure with additional fields (like in database tables and dictionary structures) then the answer is that you need to apply the append structure to the line type.

You might need to create a dictionary structure mimicking the structure of the original line type plus the append structure and then declaring a new internal table or table type on the amended copy -- as long as you do not want to change it for everything using the original structure or database table.