Loading ...
Sorry, an error occurred while loading the content.
 

W4- Changes - Self Service

Expand Messages
  • khamsala
    Hi I have developed the below code for W4 changes 8.9/8.48, So that State Tax data gets updated from the W4 Fed tax changes page. When i try to save I get
    Message 1 of 1 , Aug 5 7:26 AM
      Hi
      I have developed the below code for W4 changes 8.9/8.48, So that
      State Tax data gets updated from the W4 Fed tax changes page. When i
      try to save I get error "data being added conflicts with existing
      Data". This means, I am inserting the same values into state tax
      table. When employee effdt is same as todays date then I want to do
      update instead of insert.How should I do .I have this code in
      PY_IC_W4_FTX_VW.EMPLID save edit.

      If &PRIOR_EFFDT = &NEW_EFFDT Then

      CopyFields(1, Record.PY_IC_W4_STX_VW, 1, 1,
      Record.STATE_TAX_DATA, 1);
      UpdateValue(STATE_TAX_DATA.STATE, 1, &state);
      UpdateValue(STATE_TAX_DATA.SWT_ALLOWANCES, 1, &swt_allow);
      UpdateValue(STATE_TAX_DATA.SWT_ADDL_AMT, 1, &swt_ad_amt);
      &sdi_stus = FetchValue(Record.PY_IC_W4_STX_VW, 1,
      PY_IC_W4_STX_VW.SDI_STATUS);
      UpdateValue(STATE_TAX_DATA.SDI_STATUS, 1, &sdi_stus);

      If None(&swt_mar_st) Then
      &SWT_MAR_STAT = FetchValue(Record.PY_IC_W4_STX_VW, 1,
      PY_IC_W4_STX_VW.SWT_MAR_STATUS);
      UpdateValue(STATE_TAX_DATA.SWT_MAR_STATUS, 1, &SWT_MAR_STAT);
      Else
      UpdateValue(STATE_TAX_DATA.SWT_MAR_STATUS, 1, &swt_mar_st);
      End-If

      Else

      CopyFields(1, Record.PY_IC_W4_STX_VW, 1, 1,
      Record.STATE_TAX_DATA, 1);
      UpdateValue(STATE_TAX_DATA.EMPLID, 1, PY_IC_W4_FTX_VW.EMPLID);
      UpdateValue(STATE_TAX_DATA.COMPANY, 1, &company1);
      UpdateValue(STATE_TAX_DATA.STATE, 1, &state);
      UpdateValue(STATE_TAX_DATA.EFFDT, 1, &NEW_EFFDT);
      UpdateValue(STATE_TAX_DATA.SWT_ALLOWANCES, 1, &swt_allow);
      UpdateValue(STATE_TAX_DATA.SWT_ADDL_AMT, 1, &swt_ad_amt);
      UpdateValue(STATE_TAX_DATA.SWT_MAR_STATUS, 1, &swt_mar_st);
      UpdateValue(STATE_TAX_DATA.CREATION_DT, 1, %Date);

      End-If;


      When I do updatevalue, How peoplesoft performs Insert statement in
      peoplecode that thoughs me error.

      Thanks
      kri
    Your message has been successfully submitted and would be delivered to recipients shortly.