SAP HR_NO_GET_LAST_ORG_DATA Function Module for reads company data









HR_NO_GET_LAST_ORG_DATA is a standard hr no get last org data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for reads company data 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 hr no get last org data FM, simply by entering the name HR_NO_GET_LAST_ORG_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_NO_GET_LAST_ORG_DATA 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 'HR_NO_GET_LAST_ORG_DATA'"reads company data
EXPORTING
IN_WERKS = "Personnel Area
IN_BTRTL = "Personnel Subarea
IN_BEGDA = "Start Date
IN_ENDDA = "End Date

IMPORTING
P_COMP_NAME = "Name of the company code or company
P_RATE_DEVIATION = "Maximum exchange rate deviation in percent
P_ADDRESS = "Address
P_VAT_REG_NO = "VAT registration number
BEDR_NR = "Firm org. number (bedriftsnummer)
JUR_NR = "Legal org. number (juridisk nummer)
REPORTING_NR = "Organizations number used for tax and ERC reporting
MUNICC_BEDR = "Municipality Number
MUNICC_JUR = "Municipality Number
ADDRESS_INFO = "Address Management: Company Data
P_CITY = "City
P_COUNTRY = "Country key
P_CURRENCY = "Currency Key
P_LANGU = "Language key
P_CHRT_ACCTS = "Chart of accounts
P_FY_VARIANT = "Fiscal year variant
P_FI_MANAGEMENTAREA = "Financial management area
P_JURISDICTION = "Jurisdiction for tax calculation - tax jurisdiction code

TABLES
* ERROR = "Transfer table for HR error handling

EXCEPTIONS
WRONG_IMPORT_PARAMETER = 1 ERROR_IN_ORG_ASSIGNMENT = 2 NO_FIRM_ORG_NUMBER = 3
.



IMPORTING Parameters details for HR_NO_GET_LAST_ORG_DATA

IN_WERKS - Personnel Area

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

IN_BTRTL - Personnel Subarea

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

IN_BEGDA - Start Date

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

IN_ENDDA - End Date

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

EXPORTING Parameters details for HR_NO_GET_LAST_ORG_DATA

P_COMP_NAME - Name of the company code or company

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

P_RATE_DEVIATION - Maximum exchange rate deviation in percent

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

P_ADDRESS - Address

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

P_VAT_REG_NO - VAT registration number

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

BEDR_NR - Firm org. number (bedriftsnummer)

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

JUR_NR - Legal org. number (juridisk nummer)

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

REPORTING_NR - Organizations number used for tax and ERC reporting

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

MUNICC_BEDR - Municipality Number

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

MUNICC_JUR - Municipality Number

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

ADDRESS_INFO - Address Management: Company Data

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

P_CITY - City

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

P_COUNTRY - Country key

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

P_CURRENCY - Currency Key

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

P_LANGU - Language key

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

P_CHRT_ACCTS - Chart of accounts

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

P_FY_VARIANT - Fiscal year variant

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

P_FI_MANAGEMENTAREA - Financial management area

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

P_JURISDICTION - Jurisdiction for tax calculation - tax jurisdiction code

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

TABLES Parameters details for HR_NO_GET_LAST_ORG_DATA

ERROR - Transfer table for HR error handling

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

EXCEPTIONS details

WRONG_IMPORT_PARAMETER - Function module called with missing parameters.

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

ERROR_IN_ORG_ASSIGNMENT - Error handling in table ERROR

Data type:
Optional: No
Call by Reference: Yes

NO_FIRM_ORG_NUMBER - No firm org. number is found

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

Copy and paste ABAP code example for HR_NO_GET_LAST_ORG_DATA 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:
lt_error  TYPE STANDARD TABLE OF HRERROR, "   
lv_in_werks  TYPE PERSA, "   
lv_p_comp_name  TYPE BUTXT, "   
lv_wrong_import_parameter  TYPE BUTXT, "   
lv_p_rate_deviation  TYPE WAABW_001, "   
lv_p_address  TYPE ADRNR, "   
lv_p_vat_reg_no  TYPE STCEG, "   
lv_bedr_nr  TYPE P20_ORGBE, "   
lv_jur_nr  TYPE P20_ORGJU, "   
lv_reporting_nr  TYPE P20_REPNR, "   
lv_municc_bedr  TYPE P20_MUNICC, "   
lv_municc_jur  TYPE P20_MUNICC, "   
lv_address_info  TYPE SADR, "   
lv_p_city  TYPE ORT01, "   
lv_in_btrtl  TYPE BTRTL_001P, "   
lv_error_in_org_assignment  TYPE BTRTL_001P, "   
lv_in_begda  TYPE BEGDA, "   
lv_p_country  TYPE LAND1, "   
lv_no_firm_org_number  TYPE LAND1, "   
lv_in_endda  TYPE ENDDA, "   
lv_p_currency  TYPE WAERS, "   
lv_p_langu  TYPE SPRAS, "   
lv_p_chrt_accts  TYPE KTOPL, "   
lv_p_fy_variant  TYPE PERIV, "   
lv_p_fi_managementarea  TYPE FIKRS, "   
lv_p_jurisdiction  TYPE TXJCD_NSTX. "   

  CALL FUNCTION 'HR_NO_GET_LAST_ORG_DATA'  "reads company data
    EXPORTING
         IN_WERKS = lv_in_werks
         IN_BTRTL = lv_in_btrtl
         IN_BEGDA = lv_in_begda
         IN_ENDDA = lv_in_endda
    IMPORTING
         P_COMP_NAME = lv_p_comp_name
         P_RATE_DEVIATION = lv_p_rate_deviation
         P_ADDRESS = lv_p_address
         P_VAT_REG_NO = lv_p_vat_reg_no
         BEDR_NR = lv_bedr_nr
         JUR_NR = lv_jur_nr
         REPORTING_NR = lv_reporting_nr
         MUNICC_BEDR = lv_municc_bedr
         MUNICC_JUR = lv_municc_jur
         ADDRESS_INFO = lv_address_info
         P_CITY = lv_p_city
         P_COUNTRY = lv_p_country
         P_CURRENCY = lv_p_currency
         P_LANGU = lv_p_langu
         P_CHRT_ACCTS = lv_p_chrt_accts
         P_FY_VARIANT = lv_p_fy_variant
         P_FI_MANAGEMENTAREA = lv_p_fi_managementarea
         P_JURISDICTION = lv_p_jurisdiction
    TABLES
         ERROR = lt_error
    EXCEPTIONS
        WRONG_IMPORT_PARAMETER = 1
        ERROR_IN_ORG_ASSIGNMENT = 2
        NO_FIRM_ORG_NUMBER = 3
. " HR_NO_GET_LAST_ORG_DATA




ABAP code using 7.40 inline data declarations to call FM HR_NO_GET_LAST_ORG_DATA

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!