8 Replies Latest reply: Jul 21, 2017 11:20 AM by David Forest RSS

    Issue with the sub

    Fawaz Qutami

      Dears,

       

      I'm trying to load the below script but I've got a message 'Field 'VST_ID' not found'!

       

      why is that? please help ..................

       

      Thank you

       

       

       

      Sub TPP_ROOT (VST_ID)

      VST_SUMM:

      LOAD

          Sum(SPAYER) as GUEST,

          Sum(CSHARE) as PAYER

          FROM C_REV where IH_EMR_VST_ID_MAS=VST_ID Group By IH_EMR_VST_ID_MAS;

      Store VST_ID,PAYER, GUEST from VST_SUMM into TPP_SUM;

      Drop Table VST_SUMM;

      EndSub

       

      Sub TPP_VST (VST_ID))

      VST_SUMM:

      LOAD

          Sum(SPAYER) as GUEST,

          Sum(CSHARE) as PAYER

          FROM C_REV

      (qvd) where IH_EMR_VST_ID=VST_ID Group By IH_EMR_VST_ID;

      Store VST_ID,PAYER, GUEST from VST_SUMM into TPP_SUM;

      Drop Table VST_SUMM;

      EndSub

       

       

      //------------------------------------------------

      OPV: LOAD*FROM OPV_Table

       

      For A=1 to NoOfRows('OPV')

      if NOTE_TYPE=0 then

      Call TPP_ROOT(IH_EMR_VST_ID);

      elseif NOTE_TYPE<>0 then

      Call TPP_VST(IH_EMR_VST_ID);

      Next A