SAP FCML4H_RUN_STATUS_SET Function Module for Set Run Status
FCML4H_RUN_STATUS_SET is a standard fcml4h run status set SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Set Run Status 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 fcml4h run status set FM, simply by entering the name FCML4H_RUN_STATUS_SET into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCML4H_RUN_MASTER
Program Name: SAPLFCML4H_RUN_MASTER
Main Program: SAPLFCML4H_RUN_MASTER
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FCML4H_RUN_STATUS_SET 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 'FCML4H_RUN_STATUS_SET'"Set Run Status.
EXPORTING
I_TRANSACTION = "Transaction
I_STATUS = "Status (to be set)
I_KALNR = "Material/Activity
* I_NEXT_STATUS = ' ' "Material/Activity is relevant for Settlement
* I_NEXT_RUNREF = ' ' "Reference to Costing Run
* I_NEXT_JAHRPER = "Period/year
* I_XOUT = ' ' "Output Material
* I_CNT_SETTLELINES = 0 "Number of Settlement Lines
EXCEPTIONS
WRONG_CALL = 1
IMPORTING Parameters details for FCML4H_RUN_STATUS_SET
I_TRANSACTION - Transaction
Data type: ML4H_S_STRG-TRANSACTIONOptional: No
Call by Reference: Yes
I_STATUS - Status (to be set)
Data type: ML4H_XSETTLEOptional: No
Call by Reference: Yes
I_KALNR - Material/Activity
Data type: CK_KALNROptional: No
Call by Reference: Yes
I_NEXT_STATUS - Material/Activity is relevant for Settlement
Data type: ML4H_XRELEVANTDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_NEXT_RUNREF - Reference to Costing Run
Data type: ML4H_RUNREFDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_NEXT_JAHRPER - Period/year
Data type: JAHRPEROptional: Yes
Call by Reference: Yes
I_XOUT - Output Material
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
I_CNT_SETTLELINES - Number of Settlement Lines
Data type: ML4H_CNT_SETTLELINESOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
WRONG_CALL - Wrong Call
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FCML4H_RUN_STATUS_SET 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_wrong_call | TYPE STRING, " | |||
| lv_i_transaction | TYPE ML4H_S_STRG-TRANSACTION, " | |||
| lv_i_status | TYPE ML4H_XSETTLE, " | |||
| lv_i_kalnr | TYPE CK_KALNR, " | |||
| lv_i_next_status | TYPE ML4H_XRELEVANT, " SPACE | |||
| lv_i_next_runref | TYPE ML4H_RUNREF, " SPACE | |||
| lv_i_next_jahrper | TYPE JAHRPER, " | |||
| lv_i_xout | TYPE XFELD, " SPACE | |||
| lv_i_cnt_settlelines | TYPE ML4H_CNT_SETTLELINES. " 0 |
|   CALL FUNCTION 'FCML4H_RUN_STATUS_SET' "Set Run Status |
| EXPORTING | ||
| I_TRANSACTION | = lv_i_transaction | |
| I_STATUS | = lv_i_status | |
| I_KALNR | = lv_i_kalnr | |
| I_NEXT_STATUS | = lv_i_next_status | |
| I_NEXT_RUNREF | = lv_i_next_runref | |
| I_NEXT_JAHRPER | = lv_i_next_jahrper | |
| I_XOUT | = lv_i_xout | |
| I_CNT_SETTLELINES | = lv_i_cnt_settlelines | |
| EXCEPTIONS | ||
| WRONG_CALL = 1 | ||
| . " FCML4H_RUN_STATUS_SET | ||
ABAP code using 7.40 inline data declarations to call FM FCML4H_RUN_STATUS_SET
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 TRANSACTION FROM ML4H_S_STRG INTO @DATA(ld_i_transaction). | ||||
| DATA(ld_i_next_status) | = ' '. | |||
| DATA(ld_i_next_runref) | = ' '. | |||
| DATA(ld_i_xout) | = ' '. | |||
Search for further information about these or an SAP related objects