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

SELECT into internal table which is based on SAP table with append

Former Member
0 Likes
1,093

Hi all,

In our company we have appended 10 flags (CHAR 1) to our MARA tabel using a DDIC-structure. Now I want to select data with a SELECT-statement. I've created the following type:

TYPES: BEGIN OF ty_test,

matnr TYPE mara-matnr,

zzlis01 TYPE mara-zzlis01 " belongs to structure

zzlis02 TYPE mara-zzlis02

(8 extra flags)

...

END OF ty_test.

DATA:

it_test STANDARD TABLE OF ty_test,

wa_test TYPE ty_test.

To write the select statement, what is the best way? Do I have to write all the fields again?

SELECT matnr zzlis01 zzlis02 ... and so on

INTO it_test.

Can anybody advice? Thx in advance.

Cheers!

Carl

1 ACCEPTED SOLUTION
Read only

afordham
Participant
0 Likes
853

The short answer is: the way you're doing it is the best way. I'm sure there are flasher ways of doing it, but this is the most efficient and the most comprehensible.

Regards,

Andrew

Hi all,

In our company we have appended 10 flags (CHAR 1) to our MARA tabel using a DDIC-structure. Now I want to select data with a SELECT-statement. I've created the following type:

TYPES: BEGIN OF ty_test,

matnr TYPE mara-matnr,

zzlis01 TYPE mara-zzlis01 " belongs to structure

zzlis02 TYPE mara-zzlis02

(8 extra flags)

...

END OF ty_test.

DATA:

it_test STANDARD TABLE OF ty_test,

wa_test TYPE ty_test.

To write the select statement, what is the best way? Do I have to write all the fields again?

SELECT matnr zzlis01 zzlis02 ... and so on

INTO it_test.

Can anybody advice? Thx in advance.

Cheers!

Carl

4 REPLIES 4
Read only

afordham
Participant
0 Likes
854

The short answer is: the way you're doing it is the best way. I'm sure there are flasher ways of doing it, but this is the most efficient and the most comprehensible.

Regards,

Andrew

Read only

Former Member
0 Likes
853

Hi Carl,

yes you need to mention all the fields, that is the best way.

Satish

Read only

Former Member
0 Likes
853

I think what u r doing is good.Proceed with the same.

Read only

Former Member
0 Likes
853

Hi carl,

You need to spedify the table columns for better performance