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

Internal table Declaration

Former Member
0 Likes
384

Hi gurus,

i'm trying out to create a internal table using the local structure,

i'm send a partial code, can anybody say whether the syntax is right or not.

DATA: BEGIN OF LST_TAB,    ------>  Local Structure

           EMPLOYEEID TYPE ZACTIVITY_TAB-EMPLOYEEID,
          PROJECTID TYPE ZACTIVITY_TAB-PROJECTID,
          PROJECTNAME TYPE ZACTIVITY_TAB-PROJECTNAME,
          STARTDATE TYPE ZACTIVITY_TAB-STARTDATE,
         ENDDATE TYPE ZACTIVITY_TAB-ENDDATE,

         END OF LST_TAB.


DATA: IT_TAB LIKE LST_TAB.    ----> internal table 
DATA: WA_TAB LIKE LST_TAB. ---> Work Area

Thankx & Regards.

Moderator message : Not enough re-search before posting, discussion locked.

Message was edited by: Vinod Kumar

1 ACCEPTED SOLUTION
Read only

former_member16553
Active Participant
0 Likes
348

Hi

    types : begin of ty_tab

               employeeid type zactivity_tab-employeeid

                .......

               end of ty_tab .

data : wa type ty_tab,

          itab type standard table of ty_tab.

2 REPLIES 2
Read only

former_member16553
Active Participant
0 Likes
349

Hi

    types : begin of ty_tab

               employeeid type zactivity_tab-employeeid

                .......

               end of ty_tab .

data : wa type ty_tab,

          itab type standard table of ty_tab.

Read only

Private_Member_49934
Product and Topic Expert
Product and Topic Expert
0 Likes
348

This is a very basic question. You should have gone through some abap tutorial.

By the way this is not correct.

DATA: IT_TAB LIKE STANDARD TABLE OF LST_TAB.    ----> internal table

OR even better

TYPES : : BEGIN OF LST_TAB,    ------>  Local Structure

           EMPLOYEEID TYPE ZACTIVITY_TAB-EMPLOYEEID,
          PROJECTID TYPE ZACTIVITY_TAB-PROJECTID,
          PROJECTNAME TYPE ZACTIVITY_TAB-PROJECTNAME,
          STARTDATE TYPE ZACTIVITY_TAB-STARTDATE,
         ENDDATE TYPE ZACTIVITY_TAB-ENDDATE,

         END OF LST_TAB.


DATA: IT_TAB TYPE STANDARD TABLE OF LST_TAB.    ----> internal table 
DATA: WA_TAB TYPE LST_TAB. ---> Work Area

and do F1 on the syntax in abap editor you will get lot of help