Hi
If it you require the dynamic option between 2 decimals or 3 decimals only then do as follows.
1. Create three variables l_val3 type MENGE ( quantity type with 3 decimals )
l_val2 type DMBTR ( amount type with 2 decimals )
l_val type C length 15.
2. Based on your value &DEC&
assign the value to either of the above to final value l_val and print l_val.
:/ IF &DEC& = 2
l_val2 = &your variable&
l_val = l_val2
:/ ELSE
l_val3 = &your variable&
:/ l_val = l_val3
:/ &l_val(RC)&
Regards,
Venkat