User exit on HR14

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author
Messages
Balaji
Advanced Member
Posts: 20
Advanced Member

    we have written a begin user exit for HR14 to avoid the users from adding any new payrates for some pay codes, we want the users to use our custom forms to make any changes to pay rates. This works fine in LID, for some reason the user exit is never triggered from portal. we are on 803 env and 810 apps on a windows server.
     Is it possible to animate a program from portal? i have never done it before. Any info on this would be very helpful.

    Thanks

    Balaji
    Gary Davies
    Veteran Member
    Posts: 248
    Veteran Member
      Portal is a presentation layer, while you can add functionality with Design Studio on forms displayed in Portal, it does not remove any functionality from how a form behaves in LID. Even if you could animate a LID program from Portal it would not show any result different than from within LID.

      What may be different from LID and Portal is security setup for the pay fields.



      Balaji
      Advanced Member
      Posts: 20
      Advanced Member
        Thanks for the quick response Gary, i do understand that design studio can be used to add functionality to forms in portal but i am kind of curious to know why portal and LID would exhibit diff behaviour for the same code, clearly there are not taking the same path thats why i wanted to know if we could animate using portal. I wanted to debug the code line by line and find out  the path that LID and portal is using.
        Balaji
        Ragu Raghavan
        Veteran Member
        Posts: 468
        Veteran Member
          After you tested the user exit in LID, did you do a IOSCacheRefresh ? I find that necessary sometimes for the LID changes to become visible in Portal.
          John Henley
          Senior Member
          Posts: 3348
          Senior Member
            Another thing to do is 'tmcontrol -rp HR14' which will reload HR14 into memory. Depending on how long ago you added your user exit and were doing your testing in Portal, LATM may be using an old (pre-user-exit) copy of HR14.
            Thanks for using the LawsonGuru.com forums!
            John
            John Henley
            Senior Member
            Posts: 3348
            Senior Member
              It is possible to debug programs (including user exits) that are run via portal. You need to start the ladebug server (setting the $LAWDIR/system/ladebug.cfg ENABLEDBG parameter to TRUE and running startladebug). You then compile HR14 and HR14B with -D and start the debugger/animator. When a Portal session executes HR14 your debugger session should catch it, and you can walk thru the program. It's, of course, easier said than done, but it is possible.
              Thanks for using the LawsonGuru.com forums!
              John
              Balaji
              Advanced Member
              Posts: 20
              Advanced Member
                Thanks John and Ragu,
                  

                1. I did run the IOSCacheRefresh, that was the first thing i tried.
                2. i have tried the tmmon solution, i tried it on multiple productlines just to make sure it was not executing the same program loaded in the memory. It was still behaving the same way

                I am able to animate it using lapm, i used the same method to animate it in portal as you have mentioned John but it does not catch the portal session, its able to catch the LID session. Thats why i was wondering if the method to animate from portal was different. Would the display statments work in online programs? because that does not seem to be working on online forms either. I am struck and i am not sure how to troubleshoot this further.
                Balaji
                John Henley
                Senior Member
                Posts: 3348
                Senior Member
                  Did you try the ladebug server? Display statements (and/or compiling in -T trace mode) are an option; they will write to the lapm.* files in $LAWDIR/system/joblog
                  Thanks for using the LawsonGuru.com forums!
                  John
                  Balaji
                  Advanced Member
                  Posts: 20
                  Advanced Member
                    Yes, ladebug is running. I did not compile it using the trace option, i only compiled it using -d option. Will try the trace and update you.

                    Thanks
                    Balaji
                    Balaji
                    Advanced Member
                    Posts: 20
                    Advanced Member
                      I think display statement are written to the job log only if its a batch program. correct me if i am wrong there is no log for online programs.
                      Balaji
                      John Henley
                      Senior Member
                      Posts: 3348
                      Senior Member
                        For debug, are you using -D [good] or -d [bad]?
                        Thanks for using the LawsonGuru.com forums!
                        John
                        Balaji
                        Advanced Member
                        Posts: 20
                        Advanced Member
                          Sorry it was typo in the previous comment, i am using -D. It would throw a syntax error if i use -d.
                          Balaji
                          Ben Coonfield
                          Veteran Member
                          Posts: 146
                          Veteran Member
                            Balaji ,

                            Actually there is a "job log" for online programs too.  It can easily be unnoticed because it is usually empty, and it is deleted automatically and quickly.  You can see one for sessions that are still in progress and occasionally it contains a useful error message. 
                            Balaji
                            Advanced Member
                            Posts: 20
                            Advanced Member
                              Thanks Ben, i noticed after i compiled it with trace option as per John's suggestion. lapm logs disappear when i close the lapm session but  portal is using the same process pts.exe which will not go down until we shut down rmi server, those logs did have the DISPLAY messages, only problem is it is only confirming my understanding that portal is not triggering the user exit. i had a DISPLAY message in the first line of user exit and the last line of the user exit, when i run it from LID these message alone shows in the log but when i run it from portal these message dont show up, it shows all the other display messages that i have in the code.
                              Balaji
                              John Henley
                              Senior Member
                              Posts: 3348
                              Senior Member
                                Put these DISPLAY statements in your program at the top of the 400-PROCESS-TRAN paragragh:

                                DISPLAY "WS-BEG-UE-PGM: " WS-BEG-UE-PGM.
                                DISPLAY "WS-BEG-UE-FOUND: " WS-BEG-UE-FOUND.

                                Thanks for using the LawsonGuru.com forums!
                                John
                                Balaji
                                Advanced Member
                                Posts: 20
                                Advanced Member
                                  This is from portal hr14 form

                                  WS-BEG-UE-PGM: D:\LINTE\APPS/test2/usrobj/HR14B
                                  WS-BEG-UE-FOUND: Y


                                  This is from LID

                                  *****  HR14 EXIT ROUTINE  *****
                                  *****  HR14 EXIT END  *****
                                  WS-BEG-UE-PGM: D:\LINTE\APPS/test2/usrobj/HR14B
                                  WS-BEG-UE-FOUND: Y
                                  Balaji
                                  John Henley
                                  Senior Member
                                  Posts: 3348
                                  Senior Member
                                    Well, that's progress...at least your user exit is recognized in HR14. ;)
                                    Thanks for using the LawsonGuru.com forums!
                                    John
                                    Balaji
                                    Advanced Member
                                    Posts: 20
                                    Advanced Member
                                      What do you make of this situation. I still cannot understand why portal would not execute this user exit.
                                      Balaji
                                      Balaji
                                      Advanced Member
                                      Posts: 20
                                      Advanced Member
                                        Well it is definetly progress, but i still cannot understand why portal would not execute that user exit. As you could see from the DISPLAY messages clearly LID gets in to the exit routine but portal does not. I am still troubleshooting this. I will let you guys know if i find something.
                                        Balaji
                                        John Henley
                                        Senior Member
                                        Posts: 3348
                                        Senior Member
                                          What is your user exit doing? When you put the DISPLAY messages in there...where did you put them? If you want to attached a copy of HR14BPD, I can look at it.
                                          Thanks for using the LawsonGuru.com forums!
                                          John
                                          Balaji
                                          Advanced Member
                                          Posts: 20
                                          Advanced Member

                                            Here is the HR14 user exit that we have in place.

                                                   HR14BS1-TRANSACTION    SECTION.
                                                   HR14BS1-START.

                                                       DISPLAY "*****  HR14 EXIT ROUTINE  *****  ".
                                                      
                                                       PERFORM
                                                       VARYING I1 FROM 1 BY 1
                                                         UNTIL (I1 > 14)
                                                            OR (CRT-ERROR-NBR NOT = ZEROES)
                                                           IF (HR14F1-LINE-FC (I1) = "A")
                                                               IF    (HR14F1-PRR-PAY-CODE (I1)     > "599")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1)     < "700")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "630")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "631")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "632")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "633")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "634")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "635")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "630C")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "631C")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "632C")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "633C")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "634C")
                                                                 AND (HR14F1-PRR-PAY-CODE (I1) NOT = "635C")
                                                                   MOVE 900        TO CRT-ERROR-NBR
                                                                   MOVE HR14F1-PRR-PAY-CODE-FN (I1)
                                                                                   TO CRT-FIELD-NBR
                                                               END-IF
                                                           END-IF
                                                       END-PERFORM.
                                                       DISPLAY "*****  HR14 EXIT END  *****  ".

                                                   HR14BS1-TRANSACTION-END.

                                            Balaji
                                            Balaji
                                            Advanced Member
                                            Posts: 20
                                            Advanced Member
                                              I think i have found out why user exit is not getting triggered, i am researching to why incorrect values are comming thru from portal.

                                              This is from the cbl file

                                              CALL WS-BEG-UE-PGM USING CRT-CONTROL,
                                              000638                                  CRT-TRANSACTION

                                                   IF CRT-TRANSACTION(1:6) = "HR14.1"
                                              000646         MOVE "HR14B.1" TO CRT-TOKEN
                                              000647         PERFORM HR14BS1-TRANSACTION
                                              000648         GO TO SP-CONTINUE.

                                              user exit is triggered only when CRT-TRANSACTION's first 6 charecters in HR14.1 but portal is sending this as HR14.2. when i execute it from LID it is sending it as HR14.1. This is the reason why user exit is not triggered from portal.
                                              Balaji
                                              Balaji
                                              Advanced Member
                                              Posts: 20
                                              Advanced Member

                                                I have found out the root cause of the issue, this is because of a coding mistake in HR14.scr, i beleive. you can see the entry for HR14.2 below, thats why user exit is not getting triggered from portal, i beleive ags is using this feild. It baffles me as to why someone would have HR14.2 there particularly when no such form exists.

                                                ******* HR14.scr 5 <158480073>
                                                *******************************************************************************
                                                *                            SCREEN   HR14  (1)
                                                *******************************************************************************
                                                $FORM      HR141    S
                                                $KEYFCS    C
                                                $DATAFCS   AC
                                                $ADDFCS    A
                                                $DELFCS
                                                $LREQFCS   AC
                                                $LDATAFCS  AC
                                                $LADDFCS   A
                                                $FCPAIRS   AA,CA,CC,CD
                                                $LINEDUPS
                                                $TITLE
                                                $ROW       8
                                                *        1    1    2    2    3    3    4    4    5    5    6    6    7    7   7
                                                *...5....0....5....0....5....0....5....0....5....0....5....0....5....0....5...9
                                                *------------------------------------------------------------------------------
                                                $SCREEN    HR141    S
                                                +HR14.2][ ]               ?Alternate Pay Rates
                                                                 +0000]

                                                |   Employee:;         :                                                 ;

                                                                       ^Proc ]                          ^Pay  ^Effective^End ]
                                                |FC|    Pay Rate |Curr |Level|Dept |Position  |Job Code |Code |Date     |Date]

                                                Balaji
                                                Balaji
                                                Advanced Member
                                                Posts: 20
                                                Advanced Member
                                                  Appreciate  all your responses, if you guys had not told me about the DISPLAY statement in the logs i am pretty sure i would not have figured this out. Really good forum.
                                                  Balaji
                                                  Balaji
                                                  Advanced Member
                                                  Posts: 20
                                                  Advanced Member
                                                    I need one more help, can someone who has 81 apps and 90 apps confirm that it has the same HR14.scr file with reference to HR14.2 in it.

                                                    Thanks
                                                    Balaji
                                                    You are not authorized to post a reply.
                                                    Page 1 of 212 > >>