SAP RP_GET_EMP_REF Function Module for Get Employer Reference number (Malaysia)









RP_GET_EMP_REF is a standard rp get emp ref SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Employer Reference number (Malaysia) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rp get emp ref FM, simply by entering the name RP_GET_EMP_REF into the relevant SAP transaction such as SE37 or SE38.

Function Group: RPL0
Program Name: SAPLRPL0
Main Program: SAPLRPL0
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RP_GET_EMP_REF pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RP_GET_EMP_REF'"Get Employer Reference number (Malaysia)
EXPORTING
ST001 = "Structure of the valid Infotype 01 record
TYPE = "Type 'S'-SOCSO, 'T'-Tax and 'E'-EPF.
* BEG_DATE = SY-DATUM "Begin of validity period
* END_DATE = SY-DATUM "End of validity period
* TX_OFF_CODE = "Tax office code for Malaysia

IMPORTING
EMP_REF_NO = "Employer reference number
PAY_KEY = "Payee key for transfers
PAYEE_TEXT = "Payee name

EXCEPTIONS
TABLE_ENTRY_NOT_FOUND = 1 TYPE_ERROR = 2
.



IMPORTING Parameters details for RP_GET_EMP_REF

ST001 - Structure of the valid Infotype 01 record

Data type: P0001
Optional: No
Call by Reference: No ( called with pass by value option)

TYPE - Type 'S'-SOCSO, 'T'-Tax and 'E'-EPF.

Data type: T5LSR-CTGRY
Optional: No
Call by Reference: No ( called with pass by value option)

BEG_DATE - Begin of validity period

Data type: T5LSR-BEGDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

END_DATE - End of validity period

Data type: T5LSR-ENDDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

TX_OFF_CODE - Tax office code for Malaysia

Data type: T5LTO-TXOFF
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RP_GET_EMP_REF

EMP_REF_NO - Employer reference number

Data type: T5LSP-ERRNS
Optional: No
Call by Reference: No ( called with pass by value option)

PAY_KEY - Payee key for transfers

Data type: T5LSP-EMFSL
Optional: No
Call by Reference: No ( called with pass by value option)

PAYEE_TEXT - Payee name

Data type: T521B-EMFNA
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

TABLE_ENTRY_NOT_FOUND - Entry not found in table T5LSP

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TYPE_ERROR - Type undefined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RP_GET_EMP_REF Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_st001  TYPE P0001, "   
lv_emp_ref_no  TYPE T5LSP-ERRNS, "   
lv_table_entry_not_found  TYPE T5LSP, "   
lv_type  TYPE T5LSR-CTGRY, "   
lv_pay_key  TYPE T5LSP-EMFSL, "   
lv_type_error  TYPE T5LSP, "   
lv_beg_date  TYPE T5LSR-BEGDA, "   SY-DATUM
lv_payee_text  TYPE T521B-EMFNA, "   
lv_end_date  TYPE T5LSR-ENDDA, "   SY-DATUM
lv_tx_off_code  TYPE T5LTO-TXOFF. "   

  CALL FUNCTION 'RP_GET_EMP_REF'  "Get Employer Reference number (Malaysia)
    EXPORTING
         ST001 = lv_st001
         TYPE = lv_type
         BEG_DATE = lv_beg_date
         END_DATE = lv_end_date
         TX_OFF_CODE = lv_tx_off_code
    IMPORTING
         EMP_REF_NO = lv_emp_ref_no
         PAY_KEY = lv_pay_key
         PAYEE_TEXT = lv_payee_text
    EXCEPTIONS
        TABLE_ENTRY_NOT_FOUND = 1
        TYPE_ERROR = 2
. " RP_GET_EMP_REF




ABAP code using 7.40 inline data declarations to call FM RP_GET_EMP_REF

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single ERRNS FROM T5LSP INTO @DATA(ld_emp_ref_no).
 
 
"SELECT single CTGRY FROM T5LSR INTO @DATA(ld_type).
 
"SELECT single EMFSL FROM T5LSP INTO @DATA(ld_pay_key).
 
 
"SELECT single BEGDA FROM T5LSR INTO @DATA(ld_beg_date).
DATA(ld_beg_date) = SY-DATUM.
 
"SELECT single EMFNA FROM T521B INTO @DATA(ld_payee_text).
 
"SELECT single ENDDA FROM T5LSR INTO @DATA(ld_end_date).
DATA(ld_end_date) = SY-DATUM.
 
"SELECT single TXOFF FROM T5LTO INTO @DATA(ld_tx_off_code).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!