SAP FCOM_INTORDER_GET_COST_DATA Function Module for Reads cost data for internal orders
FCOM_INTORDER_GET_COST_DATA is a standard fcom intorder get cost 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 cost data for internal orders 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 fcom intorder get cost data FM, simply by entering the name FCOM_INTORDER_GET_COST_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCOM_MONITOR_RFC
Program Name: SAPLFCOM_MONITOR_RFC
Main Program: SAPLFCOM_MONITOR_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function FCOM_INTORDER_GET_COST_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 'FCOM_INTORDER_GET_COST_DATA'"Reads cost data for internal orders.
EXPORTING
* ID_PERIOD_CODE = '03' "Logical time range
* ID_VERSN = "Plan Version (if initial personalization is used)
TABLES
* IT_ORDER = "Orders which to be read
* IT_ORDER_GROUP = "Order groups to be read
* IT_COSTELEMENT = "Cost element to be read
* IT_COSTELEMENT_GROUP = "Cost element groups to be read
* ET_DATA = "Result Data: Costs on internal orders
* ET_TOTAL = "Totals per order
* ET_RETURN = "Return Parameter
IMPORTING Parameters details for FCOM_INTORDER_GET_COST_DATA
ID_PERIOD_CODE - Logical time range
Data type: APPLSEF_RELATIVE_PERIOD_CODEDefault: '03'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ID_VERSN - Plan Version (if initial personalization is used)
Data type: VERSNOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FCOM_INTORDER_GET_COST_DATA
IT_ORDER - Orders which to be read
Data type: FCOM_S_AUFNROptional: Yes
Call by Reference: Yes
IT_ORDER_GROUP - Order groups to be read
Data type: FCOM_S_AUFGROptional: Yes
Call by Reference: Yes
IT_COSTELEMENT - Cost element to be read
Data type: FCOM_S_KSTAR1Optional: Yes
Call by Reference: Yes
IT_COSTELEMENT_GROUP - Cost element groups to be read
Data type: FCOM_S_KAGRUOptional: Yes
Call by Reference: Yes
ET_DATA - Result Data: Costs on internal orders
Data type: FCOM_S_IO_COST_DATAOptional: Yes
Call by Reference: Yes
ET_TOTAL - Totals per order
Data type: FCOM_S_IO_COST_DATAOptional: Yes
Call by Reference: Yes
ET_RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for FCOM_INTORDER_GET_COST_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_it_order | TYPE STANDARD TABLE OF FCOM_S_AUFNR, " | |||
| lv_id_period_code | TYPE APPLSEF_RELATIVE_PERIOD_CODE, " '03' | |||
| lv_id_versn | TYPE VERSN, " | |||
| lt_it_order_group | TYPE STANDARD TABLE OF FCOM_S_AUFGR, " | |||
| lt_it_costelement | TYPE STANDARD TABLE OF FCOM_S_KSTAR1, " | |||
| lt_it_costelement_group | TYPE STANDARD TABLE OF FCOM_S_KAGRU, " | |||
| lt_et_data | TYPE STANDARD TABLE OF FCOM_S_IO_COST_DATA, " | |||
| lt_et_total | TYPE STANDARD TABLE OF FCOM_S_IO_COST_DATA, " | |||
| lt_et_return | TYPE STANDARD TABLE OF BAPIRET2. " |
|   CALL FUNCTION 'FCOM_INTORDER_GET_COST_DATA' "Reads cost data for internal orders |
| EXPORTING | ||
| ID_PERIOD_CODE | = lv_id_period_code | |
| ID_VERSN | = lv_id_versn | |
| TABLES | ||
| IT_ORDER | = lt_it_order | |
| IT_ORDER_GROUP | = lt_it_order_group | |
| IT_COSTELEMENT | = lt_it_costelement | |
| IT_COSTELEMENT_GROUP | = lt_it_costelement_group | |
| ET_DATA | = lt_et_data | |
| ET_TOTAL | = lt_et_total | |
| ET_RETURN | = lt_et_return | |
| . " FCOM_INTORDER_GET_COST_DATA | ||
ABAP code using 7.40 inline data declarations to call FM FCOM_INTORDER_GET_COST_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.| DATA(ld_id_period_code) | = '03'. | |||
Search for further information about these or an SAP related objects