SAP FCOM_EXP_PRIMARY_COSTS_POST Function Module for
FCOM_EXP_PRIMARY_COSTS_POST is a standard fcom exp primary costs post SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 exp primary costs post FM, simply by entering the name FCOM_EXP_PRIMARY_COSTS_POST into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCOM_EXP
Program Name: SAPLFCOM_EXP
Main Program: SAPLFCOM_EXP
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function FCOM_EXP_PRIMARY_COSTS_POST 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_EXP_PRIMARY_COSTS_POST'".
EXPORTING
UNAME = "
KOKRS = "
FISC_YEAR = "
VERSION = "
OBART = "
* BLTXT = "
* RFC_DEST = "
* SCENARIO = "
* INSTANCE = "
IMPORTING
RETURN_CODE = "
TABLES
PLAN_DATA = "
TEXT_LINES = "
MESSAGE_RETURN = "
IMPORTING Parameters details for FCOM_EXP_PRIMARY_COSTS_POST
UNAME -
Data type: SY-UNAMEOptional: No
Call by Reference: No ( called with pass by value option)
KOKRS -
Data type: KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
FISC_YEAR -
Data type: TKA07-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
VERSION -
Data type: TKA09-VERSNOptional: No
Call by Reference: No ( called with pass by value option)
OBART -
Data type: J_OBARTOptional: No
Call by Reference: No ( called with pass by value option)
BLTXT -
Data type: COBK-BLTXTOptional: Yes
Call by Reference: No ( called with pass by value option)
RFC_DEST -
Data type: RFCDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
SCENARIO -
Data type: FPB_EXP_SCENARIOOptional: Yes
Call by Reference: No ( called with pass by value option)
INSTANCE -
Data type: FPB_EXP_INSTANCEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FCOM_EXP_PRIMARY_COSTS_POST
RETURN_CODE -
Data type: FCOM_PLAN_KSTAR_EXT-FLAGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FCOM_EXP_PRIMARY_COSTS_POST
PLAN_DATA -
Data type: FCOM_EXP_DTA_EXTOptional: No
Call by Reference: Yes
TEXT_LINES -
Data type: FCOM_PLAN_TEXT_LINEOptional: No
Call by Reference: Yes
MESSAGE_RETURN -
Data type: BAPIRETURN1Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FCOM_EXP_PRIMARY_COSTS_POST 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_uname | TYPE SY-UNAME, " | |||
| lt_plan_data | TYPE STANDARD TABLE OF FCOM_EXP_DTA_EXT, " | |||
| lv_return_code | TYPE FCOM_PLAN_KSTAR_EXT-FLAG, " | |||
| lv_kokrs | TYPE KOKRS, " | |||
| lt_text_lines | TYPE STANDARD TABLE OF FCOM_PLAN_TEXT_LINE, " | |||
| lv_fisc_year | TYPE TKA07-GJAHR, " | |||
| lt_message_return | TYPE STANDARD TABLE OF BAPIRETURN1, " | |||
| lv_version | TYPE TKA09-VERSN, " | |||
| lv_obart | TYPE J_OBART, " | |||
| lv_bltxt | TYPE COBK-BLTXT, " | |||
| lv_rfc_dest | TYPE RFCDEST, " | |||
| lv_scenario | TYPE FPB_EXP_SCENARIO, " | |||
| lv_instance | TYPE FPB_EXP_INSTANCE. " |
|   CALL FUNCTION 'FCOM_EXP_PRIMARY_COSTS_POST' " |
| EXPORTING | ||
| UNAME | = lv_uname | |
| KOKRS | = lv_kokrs | |
| FISC_YEAR | = lv_fisc_year | |
| VERSION | = lv_version | |
| OBART | = lv_obart | |
| BLTXT | = lv_bltxt | |
| RFC_DEST | = lv_rfc_dest | |
| SCENARIO | = lv_scenario | |
| INSTANCE | = lv_instance | |
| IMPORTING | ||
| RETURN_CODE | = lv_return_code | |
| TABLES | ||
| PLAN_DATA | = lt_plan_data | |
| TEXT_LINES | = lt_text_lines | |
| MESSAGE_RETURN | = lt_message_return | |
| . " FCOM_EXP_PRIMARY_COSTS_POST | ||
ABAP code using 7.40 inline data declarations to call FM FCOM_EXP_PRIMARY_COSTS_POST
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 UNAME FROM SY INTO @DATA(ld_uname). | ||||
| "SELECT single FLAG FROM FCOM_PLAN_KSTAR_EXT INTO @DATA(ld_return_code). | ||||
| "SELECT single GJAHR FROM TKA07 INTO @DATA(ld_fisc_year). | ||||
| "SELECT single VERSN FROM TKA09 INTO @DATA(ld_version). | ||||
| "SELECT single BLTXT FROM COBK INTO @DATA(ld_bltxt). | ||||
Search for further information about these or an SAP related objects