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

TYPE TABLE OF

Former Member
0 Likes
12,266

what is the difference between type and type table of..

i mean..

gs_vbak TYPE ty_vbak,

gt_vbak TYPE TABLE OF ty_vbak,

ty_vbak is my internal table..

Regards,

pandu

6 REPLIES 6
Read only

gopi_narendra
Active Contributor
2,873

gs_vbak TYPE ty_vbak --> Work Area declaration.

gt_vbak TYPE TABLE OF ty_vbak --> Internal Table declaration.

ty_vbak is my internal table.. --> Structure declaration.

If ty_vbak is the structure declaration in your program then

gt_vbak type table of ty_vbak is the internal table of type ty_vbak.

gs_vbak type ty_vbak is the workarea declaration

Regards

Gopi

Read only

Former Member
0 Likes
2,873

Hi..

<b>TYPE</b> - Type is used to tell the system what is the type of data object(variable) you want to create .

only by giving type u are declaring the work area or just a data...

<b>TYPE TABLE OF</b> - by giving type table of means u are declaring the internal table..

<b>Reward points if useful</b>

Regards

Ashu

Read only

Former Member
2,873

gs_vbak acts like a aworkarea

gt_vbak acts like an internal table

loop at gt_vbak into gs_vbak.
  gs_vbak-field1 = 'XXXX'.
  modify gt_vbak from gs_vbak.
endloop.

Read only

Former Member
0 Likes
2,873

Hi,

1. TYPE is data type declaration, it may be work area or variable or constant.

2. Type table is Internal table of Strucute.

Both can be declared in the SE11 (ABAP Dictionary) globally in Data Type.

Reward if useful!

Read only

Former Member
0 Likes
2,873

Hi,

gs_vbak <u>TYPE</u> ty_vbak --> used to declare work area.

gt_vbak <u>TYPE TABLE OF</u> ty_vbak --> used to declare internal table.

Read only

Former Member
0 Likes
2,873

hi

data : wa_itab type itab --> nothing but work area.

data : wa_itab type table of itab ---> internal table declaration....

thanks,

maheedhar.t