Skip to Content
avatar image
Former Member

Script logic not generating multple records

*SELECT(%CURR_YR%,[ID],TIME,"[PERIOD] = 'PACYR'")
*SELECT(%EXISTING_INC%,[ID],EMPLOYEE,"[EMPL_STATUS]='Active' AND [MERIT_ELG]<>''")


*XDIM_MEMBERSET TIME=%CURR_YR%
*XDIM_MEMBERSET ACCOUNT=INCREASEMNTH
*XDIM_MEMBERSET WBSE= NO_WBSE
*XDIM_MEMBERSET COMPANY = NO_COMPANY
*XDIM_MEMBERSET COSTCENTER= NO_COSTCENTER
*XDIM_MEMBERSET DATASRC= CNB_INPUT
*XDIM_MEMBERSET EMPLOYEE = %EXISTING_INC%
*XDIM_MEMBERSET PROFITCTR= NO_PROFITCTR
*XDIM_MEMBERSET RPTCURRENCY= USD
*XDIM_MEMBERSET VERSION=2018.PACING01
*XDIM_MEMBERSET WAGETYPE=NO_WAGETYPE
*XDIM_MEMBERSET ROLE=NO_ROLE
*XDIM_MEMBERSET ROLESTATUS=NO_ROLESTATUS

*WHEN EMPLOYEE
*IS %EXISTING_INC%
*REC(EXPRESSION=([COSTCENTER].[NO_COSTCENTER],[COMPANY].[NO_COMPANY],[WAGETYPE].[NO_WAGETYPE],[ROLESTATUS].[NO_ROLESTATUS],[ROLE].[NO_ROLE],[EMPLOYEE].[NO_EMPLOYEE],[PROFITCTR].[NO_PROFITCTR],[DATASRC].[CNB_INPUT],[ACCOUNT].[INCREASEMNTH],[TIME].[2018.INPUT]),ACCOUNT=INCREASEMNTH)
*ENDWHEN
*COMMIT

Result:

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 0 RECORDS QUERIED OUT.

QUERY REFERENCE DATA

QUERY TIME : 0.00 ms. 1 RECORDS QUERIED OUT.

CALCULATION TIME IN TOTAL :0.00 ms.

NO RECORDS GENERATED.

CALCULATION END.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 08 at 04:24 PM

    Instead of source you are trying to loop empty destination - no records selected - no result!

    The best way to copy single value to multiple members is to use *RUNALLOCATION:

    SELECT(%CURR_YR%,[ID],TIME,"[PERIOD] = 'PACYR'")
    *SELECT(%EXISTING_INC%,[ID],EMPLOYEE,"[EMPL_STATUS]='Active' AND [MERIT_ELG]<>''")
    
    *XDIM_MEMBERSET ACCOUNT=INCREASEMNTH
    *XDIM_MEMBERSET WBSE= NO_WBSE
    *XDIM_MEMBERSET COMPANY = NO_COMPANY
    *XDIM_MEMBERSET COSTCENTER= NO_COSTCENTER
    *XDIM_MEMBERSET DATASRC= CNB_INPUT
    *XDIM_MEMBERSET EMPLOYEE = %EXISTING_INC%
    *XDIM_MEMBERSET PROFITCTR= NO_PROFITCTR
    *XDIM_MEMBERSET RPTCURRENCY= USD
    *XDIM_MEMBERSET VERSION=2018.PACING01
    *XDIM_MEMBERSET WAGETYPE=NO_WAGETYPE
    *XDIM_MEMBERSET ROLE=NO_ROLE
    *XDIM_MEMBERSET ROLESTATUS=NO_ROLESTATUS
    
    *RUNALLOCATION
    *FACTOR=1
    *DIM TIME WHAT=2018.INPUT; WHERE=%CURR_YR%; USING=<<<; TOTAL=<<<
    *DIM EMPLOYEE WHAT=NO_EMPLOYEE; WHERE=%EXISTING_INC%; USING=<<< TOTAL=<<<
    *ENDALLOCATION
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 08 at 02:15 PM

    Sorry, but what do you mean by: "Script logic not generating multple records"???

    Please read: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

    And explain everything if you want an answer, including data sample and required calculation logic!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 08 at 02:51 PM

    Hi Vadin,

    Thank you for the details.

    In my script I am trying to copy NO_EMPLOYEE , meritincrease value to all active employees

    (%EXISTING_INC%) .

    In debug mode , I am not getting any records generated .And no error msgs.

    Please let me know if I am missing anything in the logic. I am trying simple copy to all employees.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 08 at 08:48 PM

    Hi Valdir,

    Thank you so much for your help.

    Regards,

    Venu

    Add comment
    10|10000 characters needed characters exceeded