Hi Vishal,
I would not try to incoporate a generated macro coding into a wrapper program in case the macro logic is as simple as you described, i.e. copying one KF to another KF for a certain selection.
I would rather enhance the ABAP program and incoprorate the respective BAPI "BAPI_PBSRVAPS_GETDETAIL2" to read time series data from the live cache according to the entries from your selection screen and then write it back to the desired target key figure with BAPI "BAPI_PBSRVAPS_CHANGEKEYFIGVAL".
Firstly this will be much easier instead of trying to artificially incorporate a macro and secondly it will be a supported way by SAP in case of any issues.
Cheers, Peter