Dear experts,
we are facing an issue with time dependent hierarchies in eliminations. I have included the KEYDATE in the DM package to give users the opportunity to choose the hierarchy version for the IC elimination. I also adjusted the related process chain for the KEYDATE to be considered. This step is working correctly and the KEYDATE will be passed. Result line from DM package:
SELECTION_KEYDATE = 20190101
Nevertheless, the called script logic which executes the elimination program US_ELIM does not consider the KEYDATE at all. It always uses the current system date as KEYDATE. I found a SAP note (2254535) which says that the KEYDATE must be included into the script logic to be considered. It also says that the script logic expects the KEYDATE in the format:
KEYDATE = YYYYMMDD
So I entered the following code into the script logic:
*RUN_PROGRAM US_ELIM CATEGORY = %CATEGORY_SET% CURRENCY = EUR,CHF TID_RA = %TIME_SET% OTHER = [PRCTR=%PRCTR_SET%] KEYDATE = 20190101 *ENDRUN_PROGRAM
The program above runs as expected and does the correct elimination.
The problem is that I can't make the KEYDATE dynamic in the script logic like:
KEYDATE = %KEYDATE%
As soon as I do this, the system ignores the KEYDATE set and uses the current KEYDATE instead. This is understandable regarding the SAP note with the expected format of the KEYDATE. But I need to make the KEYDATE dynamic in the script logic in order to enable users to set it in the DM package.
Does anyone of you guys have had such an issue and knows how to solve it?
Thank you in advance,
Karsten