‎2007 Dec 19 10:33 AM
This is my problems
I will by PLMK-STELLEN data to determine decimals
Example:
IF PLMK-STELLEN = 3
then data: l_amt1 type p decimals 3.
IF PLMK-STELLEN = 2
then data: l_amt1 type p decimals 2.
For this case, how can i do, please help.
Thanks a lot!!
‎2007 Dec 19 11:40 AM
You should use dynamic declaration.
TYPES:
p3 TYPE p DECIMALS 3,
p2 TYPE p DECIMALS 2.
DATA dref TYPE REF TO data.
FIELD-SYMBOLS <l_amt1> TYPE ANY.
IF PLMK-STELLEN = 3
CREATE DATA dref TYPE p3.
ELSEif IF PLMK-STELLEN = 2.
CREATE DATA dref TYPE p2.
ENDIF.
ASSIGN dref TO <l_amt1>.
Hope it helps.
‎2007 Dec 19 1:05 PM
Hi,
See the following code.
DATA: FLD(8) TYPE P DECIMALS 2,
DEC TYPE I.
DESCRIBE FIELD FLD DECIMALS DEC.
Here DEC will have the value 2.
Hope this will Help,
Cheers,
Ram