Thursday, 3 December 2015

How to create dynamic internal table.and dynamic work area .


REPORT YBTEST.


PARAMETER :  var1 type c LENGTH 20  value scmg_t_case_attr.

DATA: ref1 TYPE ref TO data , " this if for internal table
      ref2 TYPE ref TO data. " this is for work area

*variable1 = variable .
CREATE DATA ref1 TYPE TABLE OF (VAR1).
CREATE DATA ref2 TYPE (var1) .
FIELD-SYMBOLS : <fs_internal_table> TYPE STANDARD TABLE . "this is for internal table
FIELD-SYMBOLS : <fs_work_area> . "this is for work area

*below statement creates the structure or table as required
ASSIGN ref1->* to <fs_internal_table>.
ASSIGN ref2->* to <fs_work_area>.

*data : lt_tab TYPE STANDARD TABLE OF <fs_internal_table> .

WRITE : 'BHARAT'.

No comments:

Post a Comment