[SAP ABAP] - HR Funtion Module for Get Standard Text


FUNCTION zsapifm_get_text.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(E_BUKRS) TYPE  BUKRS OPTIONAL
*"     VALUE(E_WERKS) TYPE  PERSA OPTIONAL
*"     VALUE(E_BTRTL) TYPE  BTRTL OPTIONAL
*"     VALUE(E_ORGEH) TYPE  ORGEH OPTIONAL
*"     VALUE(E_PLANS) TYPE  PLANS OPTIONAL
*"     VALUE(E_GSBER) TYPE  GSBER OPTIONAL
*"     VALUE(E_STELL) TYPE  STELL OPTIONAL
*"     VALUE(E_ABKRS) TYPE  ABKRS OPTIONAL
*"     VALUE(E_PERSG) TYPE  PERSG OPTIONAL
*"     VALUE(E_PERSK) TYPE  PERSK OPTIONAL
*"     VALUE(E_BEGDA) TYPE  BEGDA OPTIONAL
*"     VALUE(E_ENDDA) TYPE  ENDDA OPTIONAL
*"  EXPORTING
*"     REFERENCE(I_BUTXT) TYPE  BUTXT
*"     REFERENCE(I_PBTXT) TYPE  PBTXT
*"     REFERENCE(I_BTRTX) TYPE  BTRTX
*"     REFERENCE(I_ORGTX) TYPE  ORGTX
*"     REFERENCE(I_PLSTX) TYPE  PLSTX
*"     REFERENCE(I_GTEXT) TYPE  GTEXT
*"     REFERENCE(I_STLTX) TYPE  STLTX
*"     REFERENCE(I_ABKTX) TYPE  ABKTX
*"     REFERENCE(I_PGTXT) TYPE  PGTXT
*"     REFERENCE(I_PKTXT) TYPE  PKTXT
*"----------------------------------------------------------------------

*Company Code
  CALL FUNCTION 'HRCA_COMPANYCODE_GETDETAIL'
    EXPORTING
      companycode       = e_bukrs
    IMPORTING
      comp_name         = i_butxt
*      fi_managementarea = hrca_company-fi_management
    EXCEPTIONS
      not_found         = 1
      OTHERS            = 2.

*
  CALL FUNCTION 'HRWPC_RFC_WERKS_TEXT_GET'
    EXPORTING
      werks      = e_werks
    IMPORTING
      werks_text = i_pbtxt.

  CALL FUNCTION 'HRWPC_RFC_BTRTL_TEXT_GET'
    EXPORTING
      werks      = e_werks
      btrtl      = e_btrtl
    IMPORTING
      btrtl_text = i_btrtx.

  CALL FUNCTION 'HRWPC_RFC_ORGEH_TEXT_GET'
    EXPORTING
      orgeh       = e_orgeh
      begda       = e_begda
      endda       = e_endda
      langu       = sy-langu
    IMPORTING
      orgeh_text1 = i_orgtx.
*     orgeh_text2        = .

  CALL FUNCTION 'HRWPC_RFC_PLANS_TEXT_GET'
    EXPORTING
      plans       = e_plans
      begda       = e_begda
      endda       = e_endda
      langu       = sy-langu
    IMPORTING
      plans_text1 = i_plstx.

  CALL FUNCTION 'HRWPC_RFC_ABKRS_TEXT_GET'
    EXPORTING
      abkrs      = e_abkrs
      langu      = sy-langu
    IMPORTING
      abkrs_text = i_abktx.

  CALL FUNCTION 'HRWPC_RFC_PERSG_TEXT_GET'
    EXPORTING
      persg      = e_persg
      langu      = sy-langu
    IMPORTING
      persg_text = i_pgtxt.

  CALL FUNCTION 'HRWPC_RFC_PERSK_TEXT_GET'
    EXPORTING
      persk      = e_persk
      langu      = sy-langu
    IMPORTING
      persk_text = i_pktxt.



ENDFUNCTION.

Comments