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

types declaration

Former Member
0 Likes
1,681

Hi,

I need the equalent declaration syntax in types declaration :

Question : 1

DATA : BEGIN OF t_in_lien OCCURS 0.

INCLUDE STRUCTURE zwgps_br_co_eefile.

DATA : zli_type LIKE zdimbpar-zlien_type,

END OF t_in_lien.

*The above internal table declaration is with header line. How can I declare the same using 'Types' statement and also how to declare work area.

Question : 2

Data : itab like mara occurs 0 with header line.

The above internal table declaration I can also declare like :

data : itab TYPE STANDARD TABLE OF mara.

How to declare work area in the above case.

Regards,

AAkash

3 REPLIES 3
Read only

Former Member
0 Likes
671

Hi Chandra,

2. data : itab TYPE STANDARD TABLE OF mara,

fs_itab like itab.

Here fs_itab is work area

( OR )

data : itab TYPE STANDARD TABLE OF mara with header line.

hear itab itself is header line.

Reward if help full,

Mahi.

Read only

matt
Active Contributor
0 Likes
671

Mahi: I'm sorry, but your answer is entirely incorrect.

INCLUDE STRUCTURE has limitations.

I'd use

TYPE: begin of my_in_lien_type,
        eefile like zwgps_br_co_eefile,
        zli_type like zdimbpar-zlien_type,
      end of my_in_line_type.

DATA: t_in_lien TYPE STANDARD TABLE OF my_in_lien_type WITH NON-UNIQUE KEY HEADER_LINE,
      ws_in_lien TYPE my_in_lien_type.

ws_in_lien is your work area.

2) data: itab TYPE STANDARD TABLE OF mara,
      wa TYPE mara.

wa is your workarea.

matt

Read only

Former Member
0 Likes
671

hi

YES INCLUDE STRUCTURE HAD SOME RESTRICTIONS

TYPE: BEGIN OF ITAB1,

FILE LIKE ZWGPS_BR_CO_FILE,

ZLITYPE LIKE ZDIMBPARTYPE,

END OF ITAB1.

DATA: IT_ITAB1 TYPE STANDARD TABLE OF ITAB1 WITH NON-UNIQUE KEY HEADER_LINE,

WA_ITAB1 TYPE ITAB1..

REWARD IF USEFULL