Hi,
We have implemented runlogic PH keyword on BPC 10 for running currency translation in parallel with change parameter Time.
for ex: if we run the package with time period 2013.01. as per logic it is supposed to run for all months in 2013 from 2013.01 to 2013.12 in parallel.
some times when we run this package, it tends to skip few months(it does not translate for few months and these months are different for each run) in between and it is random.
Main script
*SELECT(%YEAR_F%,[YEAR],TIME,[ID]='2013.02')
*SELECT(%MONTH_F%,[BASE_PERIOD],TIME,[ID]='2013.02')
*SELECT(%TIME_F%,[ID],TIME,[YEAR]='%YEAR_F%' AND [BASE_PERIOD] >= '%MONTH_F%' AND [CALC]='N')
*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
VALIDATION = OFF
DEBUG = OFF
LOGIC = FXTRANS_FCS.LGF
APPSET = BEACON
APP = VOLUMES
DIMENSION CATEGORY = %CATEGORY_SET%
DIMENSION ENTITY = %ENTITY_SET%
DIMENSION TIME = %TIME_F%
CHANGED = TIME
*END_BADI
for ex: if i select 2013.01 - based on the above select statements it takes from 2013.01 to 2013.12
*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
VALIDATION = OFF
DEBUG = OFF
LOGIC = FXTRANS_FCS.LGF
APPSET = BEACON
APP = VOLUMES
DIMENSION CATEGORY = %CATEGORY_SET%
DIMENSION ENTITY = %ENTITY_SET%
DIMENSION TIME = 2013.02,2013.03,2013.04,2013.05,2013.06,2013.07,2013.08,2013.09,2013.10,2013.11,2013.12
CHANGED = TIME
*END_BADI
Called function:standard fxtrans.lgf
/Currency Translation
*RUN_PROGRAM CURR_CONVERSION
CATEGORY = %CATEGORY_SET%
CURRENCY = %RPTCURRENCY_SET%
TID_RA = %TIME_SET%
OTHER = [ENTITY=%ENTITY_SET%]
RATEENTITY = GLOBAL
*ENDRUN_PROGRAM
//Reverse Non-Monetary Quantity conversion
*SELECT (%ACCTN%, [ID], VOLACCT, CALC = 'N')
*SELECT (%QUANTU%, [ID], QUANTITY, NO_CURR = 'N')
*SELECT(%CATEG%, [FX_SOURCE_CATEGORY], CATEGORY, [ID] = %CATEGORY_SET%)
*XDIM_MEMBERSET BU = BAS(TOTBU)
*XDIM_MEMBERSET BUILDSTATE = BAS(TOTBS)
*XDIM_MEMBERSET BUSINESS = BAS(TOTBUS),MP_VB
*XDIM_MEMBERSET CTRTYPE = BAS(TOTCTR)
*XDIM_MEMBERSET PRODUCT = BAS(TOTPRODUCT)
*XDIM_MEMBERSET QUANTITY = %QUANTU%
*XDIM_MEMBERSET TECHPLATF = BAS(TOTTP)
*XDIM_MEMBERSET VOLACCT = %ACCTN%
*XDIM_MEMBERSET AUDITTRAIL = BAS(D_INPUT),D_OTHER
*XDIM_MEMBERSET CATEGORY = %CATEG%
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
*XDIM_MEMBERSET RPTCURRENCY = C_LC
*XDIM_MEMBERSET TIME = %TIME_SET%
*WHEN QUANTITY.NO_CURR
*IS N
*REC(FACTOR=1,RPTCURRENCY=%RPTCURRENCY_SET%,CATEGORY=%CATEGORY_SET%)
*ENDWHEN
*COMMIT
Kindly advise.
Thanks,
Madhav