‎2008 Jan 04 9:25 AM
hai all,
can any one tell me how to define an internal table in the global class.
and occurs specificataion
‎2008 Jan 04 9:41 AM
Hello
There are two ways:
(1) Use a table type from the DDIC
(2) Define a table type definition yourself
Example (1): instance attribute mt_return
mt_return TYPE bapirettab. " table type of bapiret2
Example (2): type definition in types section of class
TYPES:
ty_t_kna1 TYPE STANDARD TABLE OF kna1.
mt_customers TYPE ty_t_kna1.
In both cases you will always need a corresponding workarea to read or fill the itab. Fortunately header lines are no longer possible within classes!!!
DATA:
ls_return TYPE bapiret2,
ls_customer LIKE LINE OF mt_customers.
LOOP AT me->mt_return INTO ls_return.
...
READ TABLE me->mt_customers INTO ls_customer INDEX ...
...
Regars
Uwe
‎2008 Jan 04 1:50 PM
Hi Upender,
In Global class , we can declare a internal table using Table type,
before go to SE24(for create the global class),
we should create table type in SE11.
after that we should mention that table type in to associated type tab in SE24.
after that we can use internal table in class method.
Regards,
Vijay
Edited by: Vijay.V on Jan 4, 2008 2:50 PM