Create TIMERECORD records

Sort:
You are not authorized to post a reply.
Author
Messages
maalimsimo
Veteran Member
Posts: 49
Veteran Member

    My organisation needs to create 2 extra records on TIMERECORD (before PR140 is run) from existing ones, for each employee that is enrolled in a Deferred Compensation plan (similar in nature to 401K). The two records will have positive and the other, negative Wage amounts to offset each other. The user has determined that Lawson cannot handle both 401k and this plan effectively without this customization. Has anyone here ever successfully created custom TIMERECORD records without compromising data integrity? 

    HAYES
    Basic Member
    Posts: 9
    Basic Member
      You can load additional time records using the PR530. You will need to create a csv file according to the layout provided on the Lawson website with the data for the timerecords. When you run the PR530, it will edit the data and create a batch of time records. PR530 creates a report you can review and when you are happy with the batch use you PR37 & PR38 to release and select the batch. You time records will then be ready to process.
      Ragu Raghavan
      Veteran Member
      Posts: 469
      Veteran Member
        I have done it at a couple of sites using the 4GL code without any issues.

        Use the 840-MODIFY or the 850-MODIFY routine to lock the record,
        use the 810-RECREATE to prepare for the new record,
        update the appropraite fields and do a 820-STORE to commit the new records.
        There are some things to watch out for:
        If you need to change the Pay Code , you willl also need to modify the PCD-SEQ-NBR.
        You will need to update the LAST-TIME-SEQ field in the PRSYSTEM table to be in sunc with the TIME-SEQ of the new record that you create.

        Or if you are uncomfortable doing direct updates to the tables, you can Invoke PR35 or PR36 from your custom code to add the new timerecord for you. Done that too.
        maalimsimo
        Veteran Member
        Posts: 49
        Veteran Member

          Thanks for the response. I appreciate your tips. Now, I am actually building 2 new records from existing records, not changing any existing ones. The process involves summming up wage amounts for specific Pay sum Grps for each enrolled employee's timerecords, then multiplying by the % from the PR14 (EMDEDMASTR) to compute the new record's Wage Amount. The 2nd record will have the wage Amount negated, and with a different paycode.

          However, PR35 and 36 have no provision for new Wage Amts. This only leaves me with the option to do a direct insert into the TIMERECORD. What are the potential pitfalls?

          tia.

           

          Ragu Raghavan
          Veteran Member
          Posts: 469
          Veteran Member
            Why do you need a new Wage Amt field on PR35/36 ? Why not just use the field called Rate ?

            here is a snippet from one of the codes I put together. In this example, I had cloned PR36 as M036 to allow Invoke.

            INITIALIZE M036F1.
            MOVE "A" TO M036F1-FC.
            MOVE WKA-COMPANY TO M036F1-TRD-COMPANY
            WKB-COMPANY.
            MOVE WKA-EMPLOYEE TO M036F1-TRD-EMPLOYEE
            WKB-EMPLOYEE.
            MOVE "A" TO M036F1-LINE-FC(1).
            MOVE WS-INVOKE-PAY-CODE TO M036F1-TRD-PAY-CODE(1).
            MOVE ZEROES TO M036F1-TRD-HOURS(1).
            MOVE WS-INVOKE-AMT TO M036F1-TRD-RATE(1).
            MOVE WS-SYSTEM-DATE-YMD TO M036F1-TRD-TR-DATE(1).
            MOVE "C" TO M036F1-TRD-STATUS(1).
            MOVE 01 TO M036F1-DETAIL-SIZE.
            MOVE ZEROES TO CRT-ERROR-NBR.
            INVOKE "M036.1".
            IF (ERROR-FOUND)


            If you are interested in a 4GL solution and are looking for a resource to help you do that, please contact me off-line. Thanks.

            Ragu Raghavan
            raghavan@inform-alservices.com
            You are not authorized to post a reply.