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

Table with structure...Urgent

Former Member
0 Likes
765

Please, I have this:

DATA: begin of itab OCCURS 0 WITH HEADER LINE,

structure of Z99BW81,

MARK LIKE sdyn_conn-mark.

DATA: itab LIKE z99bw81 OCCURS 0 WITH HEADER LINE.

Whic is the correct form? I cant find a example. I want to create a table with the structure of one table more one field.

thanks a lot

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
741

Hi,

DATA: BEGIN OF ITAB OCCURS 200.

INCLUDE STRUCTURE Z99BW81.

DATA: MARK LIKE sdyn_conn-mark.

DATA: END OF ITAB.

Regards,

Sruthi

Hi,

DATA: BEGIN OF ITAB OCCURS 200.

INCLUDE STRUCTURE Z99BW81.

DATA: MARK LIKE sdyn_conn-mark.

DATA: END OF ITAB.

Regards,

Sruthi

5 REPLIES 5
Read only

Former Member
0 Likes
741

Hi check my example :

DATA : BEGIN OF t_co_fi OCCURS 0.
        INCLUDE STRUCTURE t_co.
DATA :  awkey LIKE bkpf-awkey.
DATA : END OF t_co_fi.

hope this helps,

erwan

Read only

Former Member
0 Likes
741
DATA: Begin of itab OCCURS 0 .
           INCLUDE  structure Z99BW81.
DATA: MARK LIKE sdyn_conn-mark.
DATA: END OF itab.

Hope this solves ur query.

Read only

Former Member
0 Likes
741

You should be using separate table and work area declarations...

Like:-

TYPES: BEGIN OF ty_ship_points,
          vstel TYPE vsted,
          vste1 TYPE vstem,
          vste2 TYPE vstem,
          vste3 TYPE vstem,
          vste4 TYPE vstem,
          vste5 TYPE vstem,
          vste6 TYPE vstem,
          vste7 TYPE vstem,
          vste8 TYPE vstem,
          vste9 TYPE vstem,
          vste10 TYPE vstem,
          vste11 TYPE vstem,
         END OF ty_ship_points.

  DATA: st_ship_points TYPE ty_ship_points.
  DATA: t_ship_points TYPE TABLE OF ty_ship_points.

In your type declaration you define the structure including any structures or single fields you want. Then use the table and work area for accessing your internal table like

LOOP AT t_ship_points INTO st_ship_points.

Gareth.

Read only

Former Member
0 Likes
742

Hi,

DATA: BEGIN OF ITAB OCCURS 200.

INCLUDE STRUCTURE Z99BW81.

DATA: MARK LIKE sdyn_conn-mark.

DATA: END OF ITAB.

Regards,

Sruthi

Read only

Former Member
0 Likes
741

DATA:

BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE mara.

DATA:emp TYPE char5.

DATA: END OF itab.