Hi experts!
I'm on BPC 10.1 NW SP4 (SAPK-81004INCPMBPC) and I'm developing a long logic that I segmented in around 10 scripts which are all called in a central script in sequence inside a *FOR cycle, as one month needs to be processed completely before going into the next one. In one of the steps a calculation on Equity accounts is made and for some strange reason I get an "Invalid when/endwhen" error on script log. This calculation takes balance from prior month to apply logic in two parts:
1. IF prior month is december, do something
2. IF prior month is not december, do something else.
The calculation of any of this parts taken independentely works just fine, but whatever part I put on second place gives me the same error.
- On base scenario I have the Priormonth=December first and it gives me an error on Priormonth<>December.
- If I change the order and put Priormonth<>December first it gives me an error on Priormonth=December
The calling logic is the following:
*INCLUDE 00CONSTANTS.LGF *INCLUDE 00VARIABLES.LGF *LOOKUP Rates *DIM R_ACCOUNT = END *DIM R_ENTITY = Global *DIM CATEGORY = CATEGORY.RATE_CATEGORY *DIM LCMes:INPUTCURRENCY = SOCIEDAD.CURRENCY *FOR %CURR% = %RptC% *DIM %CURR%Mes:INPUTCURRENCY = UF *NEXT *FOR %T% = %TIME_SET% *DIM LC%T%:TIME = %T% *DIM LC%T%:INPUTCURRENCY = SOCIEDAD.CURRENCY *FOR %CURR% = %RptC% *DIM %CURR%%T%:TIME = %T% *DIM %CURR%%T%:INPUTCURRENCY = %CURR% *NEXT *NEXT *ENDLOOKUP *FOR %A% = 1 AND %Y% = %YS% *INCLUDE ANG00_CURRCONVLC.LGF *FOR %T% = %TIME_SET% AND %TID% = %TIMEID% *INCLUDE ANG01_ARRASTREBCE.LGF *INCLUDE ANG02_CMPATRIMONIO.LGF *INCLUDE ANG03_CMPROPINV.LGF *INCLUDE ANG04_DEPRECIACION.LGF *INCLUDE ANG05_LINEALES.LGF *INCLUDE ANG06_IMPUESTORENTA.LGF *INCLUDE ANG07_INTMINORITARIO.LGF *INCLUDE ANG08_CMG.LGF *INCLUDE ANG09_UTEJERCICIO.LGF *NEXT *NEXT
Just ANG02 and ANG03 have this problem and both works mostly the same way but with different accounts. If I take both of them out, the rest of the script runs flawlessly.
Thank you beforehand! I hope that you guys can help me out in this :)
Best regards,
Joaquín.
Sorry... just noticed that the *.txt wasn't attached. Here is the code for ANG02_CMPATRIMONIO.LGF
*XDIM_MEMBERSET CATEGORY = %CATS% *XDIM_MEMBERSET SEGMENTO = BAS(B_Pza_Chile) *XDIM_MEMBERSET CUENTAS = BAS(Patrimonio) *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotaldeGestión) *XDIM_MEMBERSET RPTCURRENCY = LC *XDIM_MEMBERSET TIME = TMVL(-1, %T%) // ******************************** // January Calculation *WHEN TIME.BASE_PERIOD *IS 012 *WHEN CATEGORY *IS TIME.PRIOR_CAT // Property that points to correct CATEGORY to look at *WHEN SEGMENTO *IS 8001 *WHEN CUENTAS *IS BCE_0420 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = NA) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = 8000900, CUENTAS = 8700001) *ELSE *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = NA, CUENTAS = BCE_0450) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = 8000900, CUENTAS = 8700001, ) *ENDWHEN // CUENTAS *FOR %SEG% = %SEGS% *IS %SEG% *WHEN CUENTAS *IS BCE_0420 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = NA) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = %SEG%601, CUENTAS = 8700001) *ELSE *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = NA, CUENTAS = BCE_0450) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CATEGORY = %CATEGORY_SET%, CEBE = %SEG%601, CUENTAS = 8700001) *ENDWHEN // CUENTAS *NEXT *ENDWHEN // SEGMENTO *ENDWHEN // CATEGORY *ENDWHEN // TIME // ******************************** // Calculation for the rest of the year *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotalIFRS), AjustedeGestión *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET% *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *WHEN TIME.BASE_PERIOD *IS <> 012 *WHEN SEGMENTO *IS 8001 *WHEN CUENTAS *IS BCE_0420 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = NA) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = 8000900, CUENTAS = 8700001) *IS <> BCE_0420, BCE_0480 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = NA, CUENTAS = BCE_0450) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = 8000900, CUENTAS = 8700001) *ENDWHEN // CUENTAS *FOR %SEG% = %SEGS% *IS %SEG% *WHEN CUENTAS *IS BCE_0420 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = NA) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = %SEG%601, CUENTAS = 8700001) *IS <> BCE_0420, BCE_0480 *REC(FACTOR = C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = NA, CUENTAS = BCE_0450) *REC(FACTOR = -C_IPC, TIME = %T%, F_AUDITTRAIL = CMNormaMes, CEBE = %SEG%601, CUENTAS = 8700001) *ENDWHEN // CUENTAS *NEXT *ENDWHEN // SEGMENTO *ENDWHEN // TIME
Code for:
00CONSTANTS.LGF
*FUNCTION C_IMPUESTO = ([CEBE].[NA],[F_AUDITTRAIL].[Input],[INTERCO].[I_NA],[RPTCURRENCY].[NA],[TIME].[%T%],[CUENTAS].[Z01_IMPUESTO]) *FUNCTION C_IPC = ([CEBE].[NA],[F_AUDITTRAIL].[Input],[INTERCO].[I_NA],[RPTCURRENCY].[NA],[TIME].[%T%],[CUENTAS].[Z05_IPC]) *FUNCTION C_IMPMINIQ = ([CEBE].[NA],[F_AUDITTRAIL].[Input],[INTERCO].[I_NA],[RPTCURRENCY].[NA],[CUENTAS].[Z02_INT_MINOR_IQUIQUE]) *FUNCTION C_IMPMINND = ([CEBE].[NA],[F_AUDITTRAIL].[Input],[INTERCO].[I_NA],[RPTCURRENCY].[NA],[CUENTAS].[Z03_INT_MINOR_CONS_ND])
00VARIABLES.LGF
*SELECT(%YS%, YEAR, TIME, ID = %TIME_SET%) *SELECT(%TIMEID%, TIMEID, TIME, ID = %TIME_SET%) *SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *SELECT(%CATS%, ID, CATEGORY, CALC = N) *SELECT(%RptC%, ID, RPTCURRENCY, REPORTING = Y)
Thank you again.
Best regards,
Joaquín.
Upgrade to some recent SP and test.
Hi Vadim.
Our IT Staff told me that there is an SP upgrade planned by the end of september as we are migrating to HEC. Is there any other possible solution that could be implemented? As I need this piece of code in production on the first week of september.
Thanks again!
Best regards,
Joaquín.
Hi again.
Sorry for the bump, but any other idea?
Best regards,
Joaquín.
Continuing testing I've narrowed the problem to a single *FOR cycle in the second part of the logic (*FOR %SEG% = %SEGS%...). If I remove the *FOR loop and hardcode it, the error is gone.
I've raised an incident with SAP, but any help would be great!
Best regards,
Joaquín.
Please demonstrate the simple test code to illustrate the error!
Hi Vadim...
Simplified code without error:
*SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *XDIM_MEMBERSET CATEGORY = %CATS% *XDIM_MEMBERSET SEGMENTO = BAS(B_Pza_Chile) *XDIM_MEMBERSET CUENTAS = BAS(Patrimonio) *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotaldeGestión) *XDIM_MEMBERSET RPTCURRENCY = LC *FOR %T% = %TIME_SET% *XDIM_MEMBERSET TIME = TMVL(-1, %T%) // ******************************** // Calc for january *WHEN TIME.BASE_PERIOD *IS 012 *WHEN SEGMENTO *IS 8001 (...) *FOR %SEG% = %SEGS% *IS %SEG% (...) *NEXT *ENDWHEN // SEGMENTO *ENDWHEN // TIME // ******************************** // Calc for the rest of the year *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotalIFRS), AjustedeGestión *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET% *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *WHEN TIME.BASE_PERIOD *IS <> 012 *WHEN SEGMENTO *IS 8001 (...) *IS 1101 (...) *IS 1201 (...) *IS 1301 (...) *ENDWHEN // SEGMENTO *ENDWHEN // TIME *COMMIT *NEXT
Simplified code with error
*SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *XDIM_MEMBERSET CATEGORY = %CATS% *XDIM_MEMBERSET SEGMENTO = BAS(B_Pza_Chile) *XDIM_MEMBERSET CUENTAS = BAS(Patrimonio) *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotaldeGestión) *XDIM_MEMBERSET RPTCURRENCY = LC *FOR %T% = %TIME_SET% *XDIM_MEMBERSET TIME = TMVL(-1, %T%) // ******************************** // Calc for january *WHEN TIME.BASE_PERIOD *IS 012 *WHEN SEGMENTO *IS 8001 (...) *FOR %SEG% = %SEGS% *IS %SEG% (...) *NEXT *ENDWHEN // SEGMENTO *ENDWHEN // TIME // ******************************** // Calc for the rest of the year *XDIM_MEMBERSET F_AUDITTRAIL = BAS(TotalIFRS), AjustedeGestión *XDIM_MEMBERSET CATEGORY = %CATEGORY_SET% *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *WHEN TIME.BASE_PERIOD *IS <> 012 *WHEN SEGMENTO *IS 8001 (...) *FOR %SEG% = %SEGS% *IS %SEG% (...) *NEXT *ENDWHEN // SEGMENTO *ENDWHEN // TIME *COMMIT *NEXT
Best regards,
Joaquín.
The code is not looking like simple :)
Remove everything not related to the issue and test simple code in UJKT.
Post UJKT results!
I found the error by removing all complexity and adding WHENs and FORs step by step until I came into that conclusion... Sorry, but I don't understand what you are asking me to do :(... Want me to post every step of that process?
Best regards,
Joaquín.
Remove COMMIT!!!
I've read a lot of your replys recomending to remove it, but I added it at the end of every script in this logic to force reset of scope and start clear in each step.
Now i've removed it and same result: Invalid when/endwhen.
Best regards,
Joaquín.
Use different loop variables in 2 loops:
*FOR %SEG% = %SEGS% *IS %SEG% ... *FOR %SEG1% = %SEGS% *IS %SEG1% ...
I've tried it... same result.
UJK_VALIDATION_EXCEPTION:Invalid when/endwhen
Best regards,
Joaquín.
Test SIMPLE code:
*SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *FOR %T% = 2017.01,2017.02 //Provide some fixed members *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *FOR %SEG% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG% *NEXT *FOR %SEG1% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG1% *NEXT *NEXT
Validate it and show validation result!
Vadim
LGX: ------------------------------------------------------------------------------------------------------------------------------------- LOG: FILE:\ROOT\WEBFOLDERS\xxx \ADMINAPP\xxx\TEST.LGF USER:JPRICE APPSET:xxx APPLICATION:xxx UJK_VALIDATION_EXCEPTION:Line 3: Unknown or unimplemented keyword "*FOR %SEG1% = 1001,1101,1102,1109,1201,1202,1209,1"<br>
Log of the UJKT! Do you understand that I don't see your screen :)
Here it goes... It's a long one and I can't attach a txt file.
I've removed part of the log because of the 10.000 character limit.
LGX: ------------------------------------------------------------------------------------------------------------------------------------- LOG: FILE:\ROOT\WEBFOLDERS\xxx\ADMINAPP\xxx\TEST.LGF USER:JPRICE APPSET:xxx APPLICATION:xxx [INFO] GET_DIM_LIST(): I_APPL_ID="Financiero", #dimensions=10 CATEGORY,CEBE,CUENTAS,F_AUDITTRAIL,INTERCO,MEASURES,RPTCURRENCY,SEGMENTO,SOCIEDAD,TIME #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. ************ [REMOVED] ************ #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. #dim_memberset=6 CATEGORY:Actual_BudgetRate,Actual_LYOwnership,FCSTA_16_14NOV,FCST_15 Dir1012,FCST_15 Dir2511,...69 in total. SEGMENTO:1001,1101,1102,1109,1201,...35 in total. CUENTAS:BCE_0420,BCE_0430,BCE_0440,BCE_0450,BCE_0460,...7 in total. F_AUDITTRAIL:Ajuste_Consolidacion,AjustedeGestión,AjustedeGestiónMes,AjustesManuales,CMNormaEjercicio,...13 in total. RPTCURRENCY:LC,1 in total. TIME:2017.01,1 in total. UJK_VALIDATION_EXCEPTION:Invalid when/endwhen - Line #10 : Invalid when/endwhen
Best regards,
Joaquín.
LGX:
is missing - nothing to discuss!
Test my simple code and show validation result!
In my system the script:
*SELECT(%SEGS%, ID, FUNCTIONAL_AREA, CALC = N AND ID <> FA_NONE) *XDIM_MEMBERSET FUNCTIONAL_AREA=%SEGS% *FOR %T% = 2017.01,2017.02 //Provide some fixed members *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *FOR %SEG% = %SEGS% *XDIM_MEMBERSET FUNCTIONAL_AREA=%SEG% *NEXT *FOR %SEG1% = %SEGS% *XDIM_MEMBERSET FUNCTIONAL_AREA=%SEG1% *NEXT *NEXT
Generates the following lgx after Execute simulate:
LGX: *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_0001,FA_600000,FA_610001,FA_610002,FA_610003,FA_610100,FA_610200,FA_610210,FA_610300,FA_610400,FA_640000,FA_66000T,FA_69000T,FA_700000,FA_72000T,FA_73000T,FA_74000T,FA_75000T,FA_75100T,FA_76000T,FA_77000T,FA_78000T,FA_999998,FA_999999,FA_PL00-WAW,FA_PL00-WRO *XDIM_MEMBERSET TIME = 2016.12 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_0001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_600000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610002 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610003 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610100 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610200 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610210 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610300 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610400 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_640000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_66000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_69000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_700000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_72000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_73000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_74000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75100T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_76000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_77000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_78000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999998 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999999 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WAW *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WRO *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_0001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_600000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610002 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610003 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610100 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610200 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610210 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610300 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610400 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_640000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_66000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_69000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_700000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_72000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_73000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_74000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75100T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_76000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_77000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_78000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999998 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999999 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WAW *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WRO *XDIM_MEMBERSET TIME = 2017.01 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_0001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_600000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610002 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610003 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610100 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610200 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610210 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610300 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610400 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_640000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_66000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_69000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_700000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_72000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_73000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_74000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75100T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_76000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_77000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_78000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999998 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999999 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WAW *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WRO *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_0001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_600000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610001 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610002 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610003 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610100 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610200 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610210 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610300 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_610400 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_640000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_66000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_69000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_700000 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_72000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_73000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_74000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_75100T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_76000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_77000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_78000T *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999998 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_999999 *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WAW *XDIM_MEMBERSET FUNCTIONAL_AREA=FA_PL00-WRO ------------------------------------------------------------------------------------------------------------------------------------- LOG:
You can see that all loops are working fine!
It doesn't compile on my system...
Code:
*SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *XDIM_MEMBERSET SEGMENTO=%SEGS% *FOR %T% = 2017.01,2017.02 //Provide some fixed members *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *FOR %SEG% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG% *NEXT *FOR %SEG1% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG1% *NEXT *NEXT
Log:
LGX: ------------------------------------------------------------------------------------------------------------------------------------- LOG: FILE:\ROOT\WEBFOLDERS\xxx \ADMINAPP\xxx\TEST.LGF USER:JPRICE APPSET:xxx APPLICATION:xxx UJK_VALIDATION_EXCEPTION:Line 4: Unknown or unimplemented keyword "*FOR %SEG1% = 1001,1101,1102,1109,1201,1202,1209,1"
I'll add this thread to the incident I've raised with SAP.
Do you have any other recomendation to follow?
Thanks a lot, Vadim!
Best regards,
Joaquín.
I have already told you at the very beginning - upgrade of BPC is required. The same proposal you will get from SAP support.
Hi Vadim,
We had an upgrade to SP5 (still old!) and it didn't fix the issue.
I've searched the notes included in every newer SP and didn't find anything related to this... I'm hoping that SAP at least can tell me exactly to which SP upgrade to.
SP05 is definitely old! Upgrade to the latest...
And in some cases it's not easy to find the exact SP level when the issue is solved.
May be your issue is related to the length of string:
1001,1101,1102,1109,1201,1202,1209,1...
IT answer is that further SP upgrade is not possible in the short term due to migration to HEC (DEV : end of september || PRD : november). The thing is that I need this working on the second week of september!
So if SAP can give me anything more specific on how to solve the issue then I can convince IT to implement it.
I'll be in touch when I hear back from SAP.
Thanks again!!!
Best regards,
Joaquín.
Can you show me the Execute simulate of this 2 lines:
*SELECT(%SEGS%, ID, SEGMENTO, CALC = N AND ID <> 8001) *XDIM_MEMBERSET SEGMENTO=%SEGS%
to see the string length
P.S. Another option to find the issue is to debug in ABAP script execution.
Not a lot of members! Try some small set like:
*SELECT(%SEGS%, ID, SEGMENTO, ID=1001,1101,1102,1109,1201,1202,1209) *XDIM_MEMBERSET SEGMENTO=%SEGS% *FOR %T% = 2017.01,2017.02 //Provide some fixed members *XDIM_MEMBERSET TIME = TMVL(-1, %T%) *FOR %SEG% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG% *NEXT *FOR %SEG1% = %SEGS% *XDIM_MEMBERSET SEGMENTO=%SEG1% *NEXT *NEXT
"I've just tried with only one ID on the SELECT statement and results in the same error." - then only SP upgrade! I see no notes directly related to this issue...
On which SP are you working on? Just to have it as a reference.
Best regards,
Joaquín.
I am on BW 750 SP06 with integrated BPC 10.1 (no separate BPC SP)