Skip to Content
author's profile photo Former Member
Former Member

types declaration

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2007 at 06:19 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 01, 2007 at 08:16 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 06:36 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.