Google Search - Blog...........

ABAP - Dynamic Data Declaration Depending On Condition.

REPORT zdynamic.

TYPES:

p3 TYPE p DECIMALS 3,

p2 TYPE p DECIMALS 2.

DATA:

dref TYPE REF TO data.

FIELD-SYMBOLS TYPE ANY.

PARAMETERS a TYPE i.

IF a = 1.

CREATE DATA dref TYPE p3.

ELSE.

CREATE DATA dref TYPE p2.

ENDIF.

ASSIGN dref TO .

No comments:

Post a Comment