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

problem with include structure..

Former Member
0 Likes
919

Hi all,

here am able to create itab using DB table using include structure. but am getting error.

here i want to create it_rpsco internal table with header line.

TYPES : BEGIN OF t_rpsco,

include structure rpsco,

END OF t_rpsco.

DATA : it_rpsco TYPE STANDARD TABLE OF t_rpsco WITH HEADER LINE,

wa_it_rpsco TYPE t_rpsco.

anyone can rectify above syntax.

Thanks in advance.

kumar.

6 REPLIES 6
Read only

Former Member
0 Likes
663

HI

TYPES : BEGIN OF t_rpsco.

include structure rpsco.

END OF t_rpsco.

Instead of using comma use full stop. it will work.

Regards

Aditya

Read only

Former Member
0 Likes
663

HI Frds

Try out this coding

types : BEGIN OF t_rpsco.

include structure rpsco.

types : END OF t_rpsco.

DATA : it_rpsco TYPE STANDARD TABLE OF t_rpsco WITH HEADER LINE,

wa_it_rpsco TYPE t_rpsco.

Reward Me Points

By

Pari

Read only

Former Member
0 Likes
663

Hi,

TYPES : BEGIN OF t_rpsco.

include structure rpsco.

types END OF t_rpsco.

DATA : it_rpsco TYPE STANDARD TABLE OF t_rpsco WITH HEADER LINE,

wa_it_rpsco TYPE t_rpsco.

Regards,

Satya

Read only

Former Member
0 Likes
663

Hi sudeer,

If your are using Include structure in Reports, The continuoues statements doesnt work.

So you write like this,

TYPES : BEGIN OF t_rpsco.

include structure rpsco.

Types: END OF t_rpsco.

DATA : it_rpsco TYPE STANDARD TABLE OF t_rpsco WITH HEADER LINE,

wa_it_rpsco TYPE t_rpsco.

Reward me points if found helpful.

Regards

Siri...

Read only

0 Likes
663

hi friends thanks for ur replays,

its working but the problem is below.

LOOP AT it_tab2.

SELECT * into TABLE it_rpsco

FROM rpsco

WHERE objnr = it_tab2-objnr and

lednr eq v_lednr and

gjahr eq p_year and

wrttp eq '01' and

beltp eq '1'.

IF SY-SUBRC EQ 0.

APPEND it_rpsco.

ENDIF.

ENDLOOP.

in the above code under loop am selecting data into it_rpsco,

allways it is showing current record as first record only, its body getting only 1 record(current) it is nt appending .

what is wrong in that.

Rgds,

sudeer.

Read only

Former Member
0 Likes
663

Hi Sudheer,

U can use full stop after the "include structure rpsco.". it will work properly.

TYPES : BEGIN OF t_rpsco.

include structure rpsco.

END OF t_rpsco.

it will work.