Abapito
Abapito

Reputation: 73

Adding all table fields into the SE11 structure?

I'm learning SAP and ABAP language, I need to create a structure with all the fields of the SFLIGHT database table and a few more. Do I have to enter all the fields of the SFLIGHT table manually or is there any possibility to add all the fields of a given table at once?

I have to create DDIC structure like that: Ready structure screen

Do I have to fill this component names manually? My screen

Upvotes: 1

Views: 1956

Answers (2)

Suncatcher
Suncatcher

Reputation: 10621

The code solution is given by Jonas, but if you are asking about SE11-way then

Edit => scroll down to Include => click on Insert

enter image description here

https://techazmaan.com/ddic-include-structure/

Upvotes: 2

Jonas Wilms
Jonas Wilms

Reputation: 138267

With the TYPES ... LINE OF statement one can declare a type which represents a structure for one line of a table:

TYPES flight TYPE LINE OF sflight.

" the structure type can then be used in the program
DATA(scheduled_flight) = VALUE flight(
  " ...
).
INSERT scheduled_flight INTO sflight.

Thus usually there is no need to declare such a structure in the dictionary, as it already exists implicitly through the table creation.

Upvotes: 0

Related Questions