Support The Site

Thursday, February 4

FLSA Status Defaulting

I recently came across an SCN chat on a function I previous did not know. On the JOB, I knew there is an infotype 1610 - US Job Attribute that stored EEO and FLSA. It is a US specific infotype and maintain via table T5u13. 
-->

What I did not know is by having that value on infotype 1610, it can help drive the defaulting of FLSA status on a person infotype 0001. 

You can read more about it on SCN - https://scn.sap.com/thread/1883092

Essentially all of this is done through a simple function module MP00014U. 

Note: This is only applicable if you use infotype 1610 on the JOB and not position. Also, note that this infotype is US specific. I've seen people override the configuration and use this for other countries. 

*---------------------------------------------------------------------*
*   Subroutines for Infotype 0001. (NA Dynpros 2007, 2010)            *
*---------------------------------------------------------------------*
*   MODULE GET_EXEMPT reads table 5K13 or 5U13 and get the exempt/non-*
*   exempt indicator.                                                 *
*---------------------------------------------------------------------*
FORM GET_EXMPT USING TAB_PAR.
  DATA TEMP_DATE LIKE SY-DATUM.                         "XIYAHRK029358
  TEMP_DATE = SY-DATUM.                                     "
  IF P0001-ENDDA LT SY-DATUM.                               "
    TEMP_DATE = P0001-ENDDA.                                "
  ELSEIF P0001-BEGDA GT SY-DATUM.                           "
    TEMP_DATE = P0001-BEGDA.                                "
  ENDIF.                                                 "XIYAHRK029358
  CASE TAB_PAR.
    WHEN 'T5U13'.
      SELECT * FROM T5U13 WHERE STELL = P0001-STELL
*     AND   endda GE sy-datum ORDER BY PRIMARY KEY.      "XIYAHRK029358
        AND   ENDDA GE TEMP_DATE ORDER BY PRIMARY KEY.   "XIYAHRK029358
      ENDSELECT.
      IF SY-SUBRC EQ 0.
        Q0001-EXMPT = T5U13-EXMPT.
      ELSE.
*     MESSAGE W009(5U) WITH 'T5U13' P0001-STELL.      "VQLK11K025919
      ENDIF.
    WHEN 'T5K13'.
      SELECT * FROM T5K13 WHERE STELL = P0001-STELL
*          AND   ENDDA GE SY-DATUM ORDER BY PRIMARY KEY. "XIYAHRK029358
          AND   ENDDA GE TEMP_DATE ORDER BY PRIMARY KEY. "XIYAHRK029358
      ENDSELECT.
      IF SY-SUBRC EQ 0.
        Q0001-EXMPT = T5K13-EXMPT.
      ELSE.
*     MESSAGE W009(5K) WITH 'T5K13' P0001-STELL.      "VQLK11K025919
      ENDIF.
    WHEN OTHERS.
                                       "Do Nothing.
  ENDCASE.
ENDFORM.