Skip to Content
0
Feb 03, 2022 at 09:01 AM

How to initialize internal table with array of strings using 'value' operator in ABAP?

97 Views

Hello Folks,

I am trying the below code to set up array of strings in internal table.

types: tt_input type standard table of string with default key.

data(gt_input) = value tt_input( ( 'string1' ) ( 'string2' ) ).

But it shows syntax error '"string1'" and the row type of "GT_INPUT" are incompatible.'

When I try to set array of integers I face no proplem.

types: tt_input type standard table of i with default key.

data(gt_input) = value tt_input( ( 1 ) ( 2 ) ).

Any thoughts please ?