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

INCLUDE STRUCTURE spfli

Former Member
0 Likes
737

Hi all,

Just see the code below. SPFLI is the Transparent table for Flight schedule.

My question is :

How a Table should be include as STRUCTURE (INCLUDE STRUCTURE spfli).

How far it is correct?

DATA: BEGIN OF wa.

INCLUDE STRUCTURE spfli.

DATA: count TYPE I.

DATA: END OF wa.

Thanks in Advance

Sri...

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
572

Hi,

The difference between a table and structure is table will have a DATABSE table in the underlying database. At the DDIC level there is no difference between a structure and a table. You can use a table as strucutre.

I think you might have done this somany times.

DATA: itab type table of spfli.

here SPFLI is table. You are using it to create an internal table of this type.

There is nothing wrong in it INCLUDE STRUCTURE is the syntax used to copy the fields into your own local strucutre.

Regards,

Sesh

4 REPLIES 4
Read only

Former Member
0 Likes
572

Hi,

u cant include table as a structure.

regards,

keerthi

Read only

Former Member
0 Likes
572

You declaration is correct , whats the problem

This will include all the fields from table SPLFI and also the field COUNT in the internal table WA

if you want only workare , then

DATA : WA1 LIKE SPFLI.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
573

Hi,

The difference between a table and structure is table will have a DATABSE table in the underlying database. At the DDIC level there is no difference between a structure and a table. You can use a table as strucutre.

I think you might have done this somany times.

DATA: itab type table of spfli.

here SPFLI is table. You are using it to create an internal table of this type.

There is nothing wrong in it INCLUDE STRUCTURE is the syntax used to copy the fields into your own local strucutre.

Regards,

Sesh

Read only

Former Member
0 Likes
572

Hi,

your declaration is correct.

You can use INCLUDE STRUCTURE spfli when you define a structure wa (using DATA or TYPES) to include the components of the structured data object spfli in the structure wa .

Regards,

Sruthi