<form id="nxl51"><thead id="nxl51"><menuitem id="nxl51"></menuitem></thead></form>

    <listing id="nxl51"><address id="nxl51"><video id="nxl51"></video></address></listing>
    <menuitem id="nxl51"><meter id="nxl51"></meter></menuitem>
      <track id="nxl51"></track><th id="nxl51"></th>

      <nobr id="nxl51"></nobr>
      <em id="nxl51"><dfn id="nxl51"><noframes id="nxl51">

        || 您當前的位置:首頁 > SAP HR資源網

        HR開發中常用的FM

        來源:SAP HR資源網  作者:小彭  (查看評論)

        1、RH_STRUC_GET 用于獲取組織單元下的職位及人員信息

        CALL FUNCTION ‘RH_STRUC_GET’ ” 獲取人員信息
        EXPORTING
        ACT_OTYPE = ‘O’
        ACT_OBJID = PNPOBJID-LOW
        ACT_WEGID = ‘O-O-P’
        * ACT_INT_FLAG =
        ACT_PLVAR = ‘01′
        ACT_BEGDA = PNPDISBD ” 這個時間以前的有效的組織單元和人
        ACT_ENDDA = PNPDISED
        ACT_TDEPTH = 0
        ACT_TFLAG = ‘X’
        ACT_VFLAG = ‘X’
        AUTHORITY_CHECK = ‘X’
        TABLES
        RESULT_TAB = RESULT_TAB
        * RESULT_OBJEC = TAB_ORG
        * RESULT_STRUC =
        EXCEPTIONS
        NO_PLVAR_FOUND = 1
        NO_ENTRY_FOUND = 2
        OTHERS = 3.

        2、CU_READ_RGDIR 獲取期間
        CALL FUNCTION ‘CU_READ_RGDIR’
        EXPORTING
        PERSNR = ZPERNR
        TABLES
        IN_RGDIR = RGDIR
        EXCEPTIONS
        NO_RECORD_FOUND = 1
        OTHERS = 2.

        3、PYXX_READ_PAYROLL_RESULT
        * 根據索引號得到工資數
        CALL FUNCTION ‘PYXX_READ_PAYROLL_RESULT’
        EXPORTING
        CLUSTERID = ‘CN’
        EMPLOYEENUMBER = IT_WERKS-PERNR
        SEQUENCENUMBER = I_SEQNR-SEQNR
        CHANGING
        PAYROLL_RESULT = I_RT.
        IF SY-SUBRC 0.
        ENDIF.

        4、F4幫助 用于屏幕中的F4 幫助
        CALL FUNCTION ‘F4IF_INT_TABLE_VALUE_REQUEST’
        EXPORTING
        RETFIELD = ‘ZVARNAME’
        DYNPPROG = SY-REPID
        DYNPNR = SY-DYNNR
        DYNPROFIELD = ‘ZVAR’
        VALUE_ORG = ‘S’
        TABLES
        VALUE_TAB = IT_VARMC
        RETURN_TAB = SELECTED_TABLE
        EXCEPTIONS
        PARAMETER_ERROR = 1
        NO_VALUES_FOUND = 2
        OTHERS = 3.

        5、進行工資模擬核算
        * Simulation run payroll
        SUBMIT HCNCALC0 ” 薪資核算
        * VIA SELECTION-SCREEN
        WITH PNPTIMRA EQ ‘X’
        * with pnppermo eq pn/permo
        WITH PNPPERNR EQ PERNR-PERNR
        WITH PNPXABKR EQ PNPXABKR
        WITH PNPPABRP EQ PNPDISBD+4(2) “Month
        WITH PNPPABRJ EQ PNPDISBD+0(4) “Year
        * WITH pnpabkrs EQ pnpxabkr
        WITH SCHEMA EQ ‘ZM01′ ” 蒙東電力工資核算模式
        WITH TEST EQ ‘NOUPD/RT/OFF’
        WITH TST_ON EQ ‘X’
        WITH PRT_PROT EQ ‘ ‘
        WITH ECALLED EQ ‘X’
        WITH SW_SPOOL EQ ‘ ‘
        AND RETURN.

        IMPORT RT FROM MEMORY ID ‘RT’.
        FREE MEMORY ID ‘RT’.
        6、動態內表
        CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
        IT_FIELDCATALOG = IT_STRUCTURE
        IMPORTING
        EP_TABLE = DY_TABLE.
        *設定指向 dy_table
        ASSIGN DY_TABLE->* TO .

        ” 賦值
        CREATE DATA DY_LINE LIKE LINE OF .
        ASSIGN DY_LINE->* TO .
        DATA: INDEX LIKE SY-TABIX .

        7、獲取最一個月的后一天
        CALL FUNCTION ‘RP_LAST_DAY_OF_MONTHS’
        EXPORTING
        DAY_IN = W_BEGDA
        IMPORTING
        LAST_DAY_OF_MONTH = W_ENDDA
        EXCEPTIONS
        DAY_IN_NO_DATE = 1
        OTHERS = 2.
        8、 彈出消息框 (這個FMABAP中用的比較多)
        CALL FUNCTION ‘POPUP_TO_CONFIRM_WITH_MESSAGE’
        EXPORTING
        DEFAULTOPTION = ‘N’
        DIAGNOSETEXT1 = TEXT-020 “warning against inconsistency
        DIAGNOSETEXT2 = TEXT-021
        DIAGNOSETEXT3 = TEXT-022 “red = already booked!
        TEXTLINE1 = ‘ ‘
        TEXTLINE2 = TEXT-023 “delete nevertheless?
        TITEL = ‘Delete?’(026)
        START_COLUMN = 25
        START_ROW = 6
        IMPORTING
        ANSWER = ANSWER
        EXCEPTIONS
        OTHERS = 1.
        IF SY-SUBRC NE 0.
        MESSAGE E241(57) “error in function module &1 with return code &2
        WITH ‘POPUP_TO_CONFIRM_WITH_MESSAGE’ SY-SUBRC.
        ENDIF.
        IF ANSWER = ‘J’.

        ENDIF

        9、 CALL FUNCTION ‘REBUILD_PAYROLL_DIRECTORY’ 很少用 (參照程序: PUDEL20)

        10、HR_GET_TIME_BETWEEN_DATES 獲取日期 年月差
        CALL FUNCTION ‘HR_GET_TIME_BETWEEN_DATES’
        EXPORTING
        BEG_DATE = IT_WERKS-ZRZRQ
        END_DATE = SY-DATUM
        IMPORTING
        * DAYS =
        MONTHS = L_MONTH
        YEARS = L_YEAR .

        11、RH_GET_PERNR_WITHOUT_POSITION

        12、RH_OBJID_REQUEST 這個用的比較多,用于獲取HR組織構架結構圖的F4幫助

        13、HR_HCP_READ_OBJECT_TEXT 獲取對象文本

        14、RP_GET_HIRE_DATE 通過時間類型找對應的日期 常用語0041 中

        考試輔導
        最近更新內容
        Google廣告
        国产午夜福利毛片AⅤ在线看
        <form id="nxl51"><thead id="nxl51"><menuitem id="nxl51"></menuitem></thead></form>

          <listing id="nxl51"><address id="nxl51"><video id="nxl51"></video></address></listing>
          <menuitem id="nxl51"><meter id="nxl51"></meter></menuitem>
            <track id="nxl51"></track><th id="nxl51"></th>

            <nobr id="nxl51"></nobr>
            <em id="nxl51"><dfn id="nxl51"><noframes id="nxl51">