How to assign Variable type at run time?

Dynamic programing can save a lot of ‘superfluous’ coding. To assign a variable a type at runtime, use the ABAP statement ASSIGN with the option TYPE. For instance: DATA: D_TYPE,D_FIELD(35).DATA: D_TEST TYPE P.FIELD-SYMBOLS: .D_FIELD = ‘D_TEST’.D_TYPE = ‘P’.ASSIGN (D_FIELD) TO TYPE D_TYPE. Additionally you can use the option DECIMALS of the ASSIGN statement if your … Read more