Skip to Content

Script Logic Run time Error / sytax Error

Hello Gurus,

I developed a Script Logic. The objective of the Script logic is the next.

- The user captures in a template, by working position, once the salary and other information. I need to calculate the payroll for all the months in MXN currency also the Building (hotel) is dinamic and the CompanyCode (sociedad) is also dynamic. I am in BPC 10.1 sp 009.

I share the script. (Is the error because it is very long What seems to be the error if I validate it and it is validated ok in the admin but in Tcode UJKT seems like there is an error. )

//SCOPE

*XDIM_MEMBERSET CATEGORIA = Real

*XDIM_MEMBERSET MONEDA = NA_MONEDA

*XDIM_MEMBERSET CUENTAS= 0000611010

*XDIM_MEMBERSET ZRELACIONCTACEBE= NA_ZREL

*XDIM_MEMBERSET ZSTAGL= NA_ES

*XDIM_MEMBERSET SOCIEDAD= %SOCIEDAD_SET%

*XDIM_MEMBERSET OP_SUPUESTOS= NA_SUP

*XDIM_MEMBERSET HOTEL= %HOTEL_SET%

//seleccionar Diciembre para supuestos guardados

*SELECT(%YRS%,"[YEAR]",PERIODO,"[ID]='%PERIODO_SET%'")

*SELECT(%MNTH12%,"[ID]",PERIODO,"[YEAR]='%YRS%' AND [PERIOD]='DEC'")

*SELECT(%YR%,"[YEAR]",PERIODO,"[ID]='%MNTH12%'")

//SCOPE Dic años seleccionado donde está guardada la info

*XDIM_MEMBERSET PERIODO= 12.%YR%

*WHEN SUPNOM // CALCULO DEL SD DEL AÑO PRESUPUESTADO MAS EL .035% DE COMISIÓN

*IS SDI0

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION=%VALUE%*.035*([PERIODO].[%YR%],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[INCREMENTO SUELDOS],[HOTEL].[%H%]), MONEDA="MXN" ,PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM // CALCULO DEL SDI

*IS SDI0

*WHEN MONEDA

*IS MXN

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION=%VALUE%*([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SSDI],[HOTEL].[%H%]), MONEDA="MXN",PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*ENDWHEN

*WHEN SUPNOM // CÁLCULO DEL SUELDO

*IS SDI0

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION= %VALUE%*30.4, SUPNOM=INGR, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM //PRIMA DOMINICAL, SAR , INFONAVIT

*IS SDII

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION= %VALUE%, MONEDA="MXN", SUPNOM="PDOM",PERIODO=%T%)

*REC(EXPRESSION= (%VALUE% < ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*25)? %VALUE%*30*.002:([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*25*.002, MONEDA="MXN",SUPNOM= SAR0,PERIODO=%T%)

*REC(EXPRESSION= (%VALUE% < ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*25)? %VALUE%*30*.005:([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*25*.005, MONEDA="MXN",SUPNOM= INFO,PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM //VALES DE DESPENSA

*IS DESP

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION=(%VALUE% * 1.1 < ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*30)? %VALUE% *1.1 : ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*30, MONEDA="MXN",PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM // COMEDOR EMPLEADOS

*IS COEM

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION=%VALUEUE%*0 + ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*30, MONEDA="MXN",PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM // AGUINALDO

*IS INGR

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUEUE%/24, MONEDA="MXN", SUPNOM="AGUI",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // TIEMPO EXTRA

*IS TEXT

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * 1, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // PRIMA VACACIONAL y CUARTOS EXTRA

*IS SDI0

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .25 * [SUPNOM].[DIAV], MONEDA="MXN", SUPNOM="PVAC")

*REC(EXPRESSION=%VALUE% *.5833, MONEDA="MXN", SUPNOM="PVAC",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM //COMISIONES

*IS COMS

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE%*1, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // FONDO DE AHORRO

*IS INGR

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*REC(EXPRESSION=(%VALUE% * .1 < ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*1.3*30.41)? %VALUE% *.1 : ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*1.3*30.41, MONEDA="MXN",SUPNOM=FOAH,PERIODO=%T%)

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM // DIAS FESTIVOS

*IS DFES

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE%, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // COMISIONES

*IS COMS

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE%, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // IMPUESTO NOMINA

*IS INOM

*WHEN MONEDA

*IS MXN

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION= %VALUE%*0 ([SUPNOM].[INGR] + [SUPNOM].[PDOM] + [SUPNOM].[TEXT] + [SUPNOM].[PVAC] + [SUPNOM].[DFES] + [SUPNOM].[CEXT] + [SUPNOM].[COMS]), MONEDA=MXN,PERIODO=%T%)

*NEXT

*ENDWHEN

*ENDWHEN

*WHEN SUPNOM // FACTOR PARA OBENER COMPONENTES DEL IMSS

*IS SDII

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*FOR %H% = %HOTEL_SET%

*FOR %IMSS%= EYMD, EYME, CFIX, INVE, RESP, GUAR, RIES, CESA

*REC(EXPRESSION= (%VALUE% < ([PERIODO].[%YR%],[SOCIEDAD].[NA_CCC],[CATEGORIA].[Real],[CeBe].[NA_CeBe],[CECO].[NA_CECO],[CUENTAS].[NA_ACC],[MONEDA].[MXN],[OP_RRHH].[NA_RH],[SUPNOM].[NA_SUPRH],[ZSTAGL].[NA_ES],[ZRELACIONCTACEBE].[NA_ZREL],[OP_SUPUESTOS].[SALARIO MÍNIMO LOCAL],[HOTEL].[%H%])*25)? 30: %VALUE% *25, SUPNOM=%IMSS%,PERIODO=%T%)

*NEXT

*NEXT

*NEXT

*ENDWHEN

*WHEN SUPNOM //EYM DINERO

*IS EYMD

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .007 , MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM //EYM ESPECIE

*IS EYME

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .0025, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // CUOTA FIJA

*IS CFIX

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .204, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // INVALIDEZ Y VEJEZ

*IS INVE

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .0063, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM //RESERVA PENSIÓN

*IS RESP

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .0038, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // GUARDERIA

*IS GUAR

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .01, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM //RIESTO TRABAJADOR

*IS RIES

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .0095, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // CESANTÍA Y VEJEZ

*IS CESA

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION=%VALUE% * .0315, MONEDA="MXN",PERIODO=%T%)

*NEXT

*ENDWHEN

*WHEN SUPNOM // CÁLCULO DEL IMSS EN MXN

*IS IMSS

*WHEN MONEDA

*IS MXN

*FOR %T%= 01.%YR%, 02.%YR% ,03.%YR%, 04.%YR%, 05.%YR%, 06.%YR%, 07.%YR%, 08.%YR%, 09.%YR%, 10.%YR%, 11.%YR%, 12.%YR%

*REC(EXPRESSION= %VALUE%*0 + ([SUPNOM].[EYMD] + [SUPNOM].[EYME] + [SUPNOM].[CFIX] + [SUPNOM].[INVE] + [SUPNOM].[RESP] + [SUPNOM].[GUAR] + [SUPNOM].[RIES] + [SUPNOM].[CESA])/30, MONEDA=MXN,PERIODO=%T%)

*NEXT

*ENDWHEN

*ENDWHEN

Thanks for the posts.

Best regards.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 14, 2016 at 04:43 PM

    Sorry, but what is the error? Where is the error screenshot?

    And you can always check parts of this script to find the code with issue!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.