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

Oops

Former Member
0 Likes
477

 How do you define an internal table in OOPS concept?

4 REPLIES 4
Read only

Former Member
0 Likes
460

Hi,

You can declare as structure and use seperate work area for that.

Internal tabl does not have work area in oops concept.

Ex: Begin of ITAb LIKE mara occurs 0.

wa_itab TYPE MARA.

Read only

Former Member
0 Likes
460

Hi,

Inside classes, internal tables without header line should only be declared. Use a work area or field symbols for internal table operations.



types: begin of ty_tbl,
              ....
          end of ty_tbl.

data: it_tbl type standard table of ty_tbl,
        is_tbl type ty_tbl.

Hope this helps.

Thanks

Balaji

Read only

Former Member
0 Likes
460

Hi,

Check this.

TYPES: BEGIN OF t_tab,

data(1024) type c,

carrid TYPE scarr-carrid,

carrname TYPE scarr-carrname,

currcode TYPE scarr-currcode,

url TYPE scarr-url,

END OF t_tab.

DATA : t_upload TYPE TABLE OF t_tab,

wa_upload TYPE t_tab.

Rwd points if helpful.

Thanks.

Read only

Former Member
0 Likes
460

Hi,

Please refer code snippet below:


types: begin of gs_table,
              f1 type <table>-<fieldname>
              f2 type <table>-<fieldname>
              f3 type <table>-<fieldname>
          end of gs_table.
 
data: gt_table type standard table of gs_table.

In OO ABAP programming you will not have header line.

Thanks,

Sriram Ponna.