Skip to Content

Infotype 0008 & User Exit

Hi,

I am trying to default value for wagetype & TRFAR and TRFGB in user exit Include ZXPADU01 (before output).

But INNNN does not contain any information except PERNR and Dates inside the user exit.

But on PA30/PA40 screen I can see default values for TRFAR, TRFGB & LGA01, LGA02, etc.

I have already done the code for user exit so that is not the issue but values itself are not available.

Am I missing some place to check?

Please advise.

Regards,

Amit

1.JPG (25.3 kB)
2.JPG (28.4 kB)
3.JPG (43.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 17, 2013 at 05:31 AM

    Hi Amit Khare  ,

    The user exit ZXPADU01 is triggered only when you are opening an infotype for an employee in PA30 in create mode. It is not triggered in edit mode or display mode.

    Andwhen creating the infotype, obviously, the only fields that are there would be PERNR, and the current date other than infotype number.You can however default your vales by using the casting method.

    INNN is a generic structure and hence will not contain infotype specific information like trfgb, trfar, bet01, lga01 etc. To access these fields, you need to cast them the innn structure to specific infotype structure as mentioned above.

    To default values, pass values to the infotype structure and  cast it back to the generic structure using the reverse of the above method.


    CASE innnn-infty.

    when '0008'.

    *--Cast generic structure to specific structure

    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
           EXPORTING
             prelp = innnn
           IMPORTING
             pnnnn = v_0008.

          v_0008-trfar =

          v_0008-trfgb =

         v_0008-lga01 =

        v_0008-bet01 =

    etc ( I guess you must have already done this)

    *--Cast specific structure to generic structure
         CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
           EXPORTING
             pnnnn = v_0008
           IMPORTING
             prelp = innnn.

    You will get your values defaulted.

    If you want to get the already existing values of these fields, when you will obviously be in edit mode, then you need to implement the BADI HRPAD00INFTY which will be triggered on editing any infotype.


    Add comment
    10|10000 characters needed characters exceeded

    • Hi ,

      I am facing the  problem.

      calculated all values but in display mode it is not reflecting the calculated value ..

      i m trying to use your code :

      >     if sy-ucomm ne 'UPD' and sy-ucomm ne 'UPDL'.

      >       show_data_again = 'X'.

      >     endif.

      but still not getting.



      AFTER CALCULATING IT IS SHOWING VALUE IN CHANGE MODE..

      BUT AGAIN WHEN WE DISPLAY IT IS NOT REFLECTING..

      .

      need to display

      1spl wage type(bet06) and total amount (sumbb)

      please guide....

  • avatar image
    Former Member
    Nov 18, 2013 at 01:19 AM

    Amit,

    I think you need to implement the Classic BAdI HRPAD00INFTY then use this Simplify & structure your Enhancements by using Switchable Kernel BAdIs to convert it into a Kernel BAdI / Enhancement Spot BAdI.

    The PBO FM of the enhancement PBAS0001 will only be called by system on INS (Create) mode and COP (Copy) mode. The INNNN is not populated in your case because it is simply not called by the system when you are in MOD (Change) mode.

    Cheers,

    Sougata.

    Add comment
    10|10000 characters needed characters exceeded

    • my issue is  not TRFAR, TRFGB  but LGA01, LGA02 as they are not showing any wage types.

      I am able to figure out that wage tye are populating via fetaure LGMST so they are not part here.

  • avatar image
    Former Member
    Nov 16, 2013 at 06:57 AM

    Declare a structure of type P0008.

    Call the below method.

          CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = innnn
          IMPORTING
            pnnnn = ls_0008.

    You will get all the required field values in ls_0008.

    Add comment
    10|10000 characters needed characters exceeded