Skip to Content
0
Jan 04 at 07:13 PM

can I program APPEND to a TABLE(string) in 7.4 using VALUE?

129 Views

I have a code below which I want to write in 7.4 syntax but I get syntax error stating, "The type "STRING" is not a structure".

It seems compiler perceives crtyp as a field where the value is being assigned using '='.
How to add the string value to my table line by line here?

DATA: lt_dynwhere TYPE STANDARD TABLE OF string with EMPTY KEY.

APPEND 'crtyp = <gt_head>-crtyp and' TO lt_dynwhere.
APPEND 'kunag = <gt_head>-kunag' TO lt_dynwhere

below is what I tried to do but ended up with a syntax error:

lt_dynwhere = VALUE #( ( crtyp = <gt_head>-crtyp and )
                        ( kunag = <gt_head>-kunag )
                        ).

how can I add these lines to my internal table which is of type string?
is it to be appended using Index or something similar?

lt_dynwhere = VALUE #( ( string1 = 'crtyp = <gt_head>-crtyp and' )
                       ( string2 = 'kunag = <gt_head>-kunag' )
                        ).

where string1 and string2 could be some sort of identifier?


Please provide any help/suggestion.
Thank You.