SAP-ABAP Technical
Wednesday, September 22, 2010
Dynamic 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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment