SAP V45CU_GET_COMPONENTS Function Module for NOTRANSL: Liefert alle Komponenten einer Instanz
V45CU_GET_COMPONENTS is a standard v45cu get components SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Liefert alle Komponenten einer Instanz 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 v45cu get components FM, simply by entering the name V45CU_GET_COMPONENTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: V45CU
Program Name: SAPLV45CU
Main Program: SAPLV45CU
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function V45CU_GET_COMPONENTS 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 'V45CU_GET_COMPONENTS'"NOTRANSL: Liefert alle Komponenten einer Instanz.
EXPORTING
IV_INSTANCE = "Configuration
IV_DATE = "Key date of the bill of material
IV_PLANT = "Plant (Own or External)
IV_QUANTITY = "Cumulative Order Quantity in Sales Units
TABLES
ET_STPO = "BOM Items (Extended for List Displays)
ET_INDEX = "Configuration: Instances for BOM Items
EXCEPTIONS
NOT_FOUND = 1 INTERNAL_ERROR = 2
IMPORTING Parameters details for V45CU_GET_COMPONENTS
IV_INSTANCE - Configuration
Data type: VBAP-CUOBJOptional: No
Call by Reference: No ( called with pass by value option)
IV_DATE - Key date of the bill of material
Data type: VBAP-STDATOptional: No
Call by Reference: No ( called with pass by value option)
IV_PLANT - Plant (Own or External)
Data type: VBAP-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
IV_QUANTITY - Cumulative Order Quantity in Sales Units
Data type: VBAP-KWMENGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for V45CU_GET_COMPONENTS
ET_STPO - BOM Items (Extended for List Displays)
Data type: STPOXOptional: No
Call by Reference: No ( called with pass by value option)
ET_INDEX - Configuration: Instances for BOM Items
Data type: API_STPO_IOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for V45CU_GET_COMPONENTS 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_et_stpo | TYPE STANDARD TABLE OF STPOX, " | |||
| lv_not_found | TYPE STPOX, " | |||
| lv_iv_instance | TYPE VBAP-CUOBJ, " | |||
| lv_iv_date | TYPE VBAP-STDAT, " | |||
| lt_et_index | TYPE STANDARD TABLE OF API_STPO_I, " | |||
| lv_internal_error | TYPE API_STPO_I, " | |||
| lv_iv_plant | TYPE VBAP-WERKS, " | |||
| lv_iv_quantity | TYPE VBAP-KWMENG. " |
|   CALL FUNCTION 'V45CU_GET_COMPONENTS' "NOTRANSL: Liefert alle Komponenten einer Instanz |
| EXPORTING | ||
| IV_INSTANCE | = lv_iv_instance | |
| IV_DATE | = lv_iv_date | |
| IV_PLANT | = lv_iv_plant | |
| IV_QUANTITY | = lv_iv_quantity | |
| TABLES | ||
| ET_STPO | = lt_et_stpo | |
| ET_INDEX | = lt_et_index | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| INTERNAL_ERROR = 2 | ||
| . " V45CU_GET_COMPONENTS | ||
ABAP code using 7.40 inline data declarations to call FM V45CU_GET_COMPONENTS
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 CUOBJ FROM VBAP INTO @DATA(ld_iv_instance). | ||||
| "SELECT single STDAT FROM VBAP INTO @DATA(ld_iv_date). | ||||
| "SELECT single WERKS FROM VBAP INTO @DATA(ld_iv_plant). | ||||
| "SELECT single KWMENG FROM VBAP INTO @DATA(ld_iv_quantity). | ||||
Search for further information about these or an SAP related objects