SAP BAPI_LPHSRVAPS_GETDETAIL Function Module for Read Location Product Hierarchy
BAPI_LPHSRVAPS_GETDETAIL is a standard bapi lphsrvaps getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Location Product Hierarchy 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 bapi lphsrvaps getdetail FM, simply by entering the name BAPI_LPHSRVAPS_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: 10015
Program Name: SAPL10015
Main Program: SAPL10015
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BAPI_LPHSRVAPS_GETDETAIL 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 'BAPI_LPHSRVAPS_GETDETAIL'"Read Location Product Hierarchy.
EXPORTING
NAME = "Name of Location Product Hierarchy
LOGICAL_SYSTEM = "Logical System from which Message Originates
* BUSINESS_SYSTEM_GROUP = "Business System Group
IMPORTING
HIERARCHY_INFO = "Header Data for Location Product Hierarchy
TABLES
* HIERARCHY_NODES = "Hierarchy Node
* RETURN = "Return Parameters
* EXTENSION_IN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSION_OUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
IMPORTING Parameters details for BAPI_LPHSRVAPS_GETDETAIL
NAME - Name of Location Product Hierarchy
Data type: BAPI10015GENFIELDS-LOC_PRD_HIERARCHYOptional: No
Call by Reference: No ( called with pass by value option)
LOGICAL_SYSTEM - Logical System from which Message Originates
Data type: BAPISCMBGENFIELDS-LOGICAL_SYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
BUSINESS_SYSTEM_GROUP - Business System Group
Data type: BAPISCMBGENFIELDS-LOGQSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_LPHSRVAPS_GETDETAIL
HIERARCHY_INFO - Header Data for Location Product Hierarchy
Data type: BAPI10015LPHOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_LPHSRVAPS_GETDETAIL
HIERARCHY_NODES - Hierarchy Node
Data type: BAPI10015LPHNODEOOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXTENSION_IN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
EXTENSION_OUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_LPHSRVAPS_GETDETAIL 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_name | TYPE BAPI10015GENFIELDS-LOC_PRD_HIERARCHY, " | |||
| lv_hierarchy_info | TYPE BAPI10015LPHO, " | |||
| lt_hierarchy_nodes | TYPE STANDARD TABLE OF BAPI10015LPHNODEO, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_logical_system | TYPE BAPISCMBGENFIELDS-LOGICAL_SYSTEM, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_business_system_group | TYPE BAPISCMBGENFIELDS-LOGQS, " | |||
| lt_extension_out | TYPE STANDARD TABLE OF BAPIPAREX. " |
|   CALL FUNCTION 'BAPI_LPHSRVAPS_GETDETAIL' "Read Location Product Hierarchy |
| EXPORTING | ||
| NAME | = lv_name | |
| LOGICAL_SYSTEM | = lv_logical_system | |
| BUSINESS_SYSTEM_GROUP | = lv_business_system_group | |
| IMPORTING | ||
| HIERARCHY_INFO | = lv_hierarchy_info | |
| TABLES | ||
| HIERARCHY_NODES | = lt_hierarchy_nodes | |
| RETURN | = lt_return | |
| EXTENSION_IN | = lt_extension_in | |
| EXTENSION_OUT | = lt_extension_out | |
| . " BAPI_LPHSRVAPS_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_LPHSRVAPS_GETDETAIL
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 LOC_PRD_HIERARCHY FROM BAPI10015GENFIELDS INTO @DATA(ld_name). | ||||
| "SELECT single LOGICAL_SYSTEM FROM BAPISCMBGENFIELDS INTO @DATA(ld_logical_system). | ||||
| "SELECT single LOGQS FROM BAPISCMBGENFIELDS INTO @DATA(ld_business_system_group). | ||||
Search for further information about these or an SAP related objects