PA56 Ags to add pa comment

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Brianf
New Member
Posts: 3
New Member

    I'm trying to add a comment line to a personnel action with the following ags node:

    _PDL=TEST21&_TKN=PA56.1&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=Change&PAC-COMPANY=3200&PAC-EMPLOYEE=405&PAC-DATE=20080312&LINE-FC1=A&PAC-CMT-TEXT1=&PAC-ACTION-CODE-IND=STATUSCHG&PAC-ACTION-CODE=STATUSCHG&PT-ACTION-TYPE=E&PT-PAC-LN-NBR=1&_DELIM=%09&_OUT=TEXT&_EOT=TRUE

    This works fine if there is an existing comment line attached to the personnel action.  If there is no existing comment, I get the message "No comments exist for this action.  I've tried changing FC to Add as well.  What am I missing?  Any suggestions are appreciated. 

    Thanks,
    Brian

    Shane Jones
    Veteran Member
    Posts: 460
    Veteran Member

      This might be a little late but I might have a solution.   Query the PA56 file (Table) to see if there is a record ...   If there is a record then you can use a change function but if there are no records then you will want to use the add function.   My guess is that there is no PA56 record for the employee so you need to ADD the first one.

      After the query use a branch that looks for records using this variable name:  nodename_RECORD_COUNT ...  

      If the record count is greater than 0 then write the AGS to process a CHANGE, if it is = to 0 then use an AGS to ADD.

       

      Shane Jones
      Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
      Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
      ** Teach others to fish...
      Shane Jones
      Veteran Member
      Posts: 460
      Veteran Member
        BTW...

        I just looked and the file (Table) that you would query is PACOMMENTS.

        Good Luck!
        Shane Jones
        Tools: HR, Payroll, Benefits, PFI, Smart Office, BSI, Portal and Self-Service
        Systems: Lawson, Open Hire, Kronos, Crystal Reporting, SumTotal Learning
        ** Teach others to fish...