SAP CO_KO_ORDER_OK_CODE_EXT Function Module for NOTRANSL: Externe OK-Code Verarbeitung
CO_KO_ORDER_OK_CODE_EXT is a standard co ko order ok code ext 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: Externe OK-Code Verarbeitung 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 co ko order ok code ext FM, simply by entering the name CO_KO_ORDER_OK_CODE_EXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: COKO
Program Name: SAPLCOKO
Main Program: SAPLCOKO
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_KO_ORDER_OK_CODE_EXT 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 'CO_KO_ORDER_OK_CODE_EXT'"NOTRANSL: Externe OK-Code Verarbeitung.
EXPORTING
* FLG_OK_TERM = ' ' "Schedule Order
* FLG_OK_FREI = ' ' "Release Order
* FLG_OK_KOZE = ' ' "
* FLG_OK_VGUE = ' ' "
* FLG_OK_KPU2 = ' ' "
* FLG_OK_BU = ' ' "Save Order
* FLG_OK_CAPM = ' ' "
* FLG_OK_CTLK = ' ' "
EXCEPTIONS
UPDATE_REJECT = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCOKO1_001 Transfer of Order Data to Customer Enhancement
EXIT_SAPLCOKO1_002 Transfer of Data Changes from Customer Enhancement
EXIT_SAPLCOKO1_004 Check whether changes to order header/item are allowed in the dialog
EXIT_SAPLCOKO_001 Check Exit for Process Order Change from Assembly Order
EXIT_SAPLCOKO_002 Derive External Network Number from WBS Number
EXIT_SAPLCOKO_003 PS Customer Exit: User Specific Fields f. Network Header (SAP -> SUBSCR.)
EXIT_SAPLCOKO_004 PS Customer Exit: Network Header User Specific Fields (SUBSCREEN -> SAP)
EXIT_SAPLCOKO_005 Transfer of Order Data to Customer Enhancement
EXIT_SAPLCOKO_006 Transfer of Data Changes from Customer Enhancement
IMPORTING Parameters details for CO_KO_ORDER_OK_CODE_EXT
FLG_OK_TERM - Schedule Order
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_FREI - Release Order
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_KOZE -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_VGUE -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_KPU2 -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_BU - Save Order
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_CAPM -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OK_CTLK -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
UPDATE_REJECT -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CO_KO_ORDER_OK_CODE_EXT 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_flg_ok_term | TYPE STRING, " SPACE | |||
| lv_update_reject | TYPE STRING, " | |||
| lv_flg_ok_frei | TYPE STRING, " SPACE | |||
| lv_flg_ok_koze | TYPE STRING, " SPACE | |||
| lv_flg_ok_vgue | TYPE STRING, " SPACE | |||
| lv_flg_ok_kpu2 | TYPE STRING, " SPACE | |||
| lv_flg_ok_bu | TYPE STRING, " SPACE | |||
| lv_flg_ok_capm | TYPE STRING, " SPACE | |||
| lv_flg_ok_ctlk | TYPE STRING. " SPACE |
|   CALL FUNCTION 'CO_KO_ORDER_OK_CODE_EXT' "NOTRANSL: Externe OK-Code Verarbeitung |
| EXPORTING | ||
| FLG_OK_TERM | = lv_flg_ok_term | |
| FLG_OK_FREI | = lv_flg_ok_frei | |
| FLG_OK_KOZE | = lv_flg_ok_koze | |
| FLG_OK_VGUE | = lv_flg_ok_vgue | |
| FLG_OK_KPU2 | = lv_flg_ok_kpu2 | |
| FLG_OK_BU | = lv_flg_ok_bu | |
| FLG_OK_CAPM | = lv_flg_ok_capm | |
| FLG_OK_CTLK | = lv_flg_ok_ctlk | |
| EXCEPTIONS | ||
| UPDATE_REJECT = 1 | ||
| . " CO_KO_ORDER_OK_CODE_EXT | ||
ABAP code using 7.40 inline data declarations to call FM CO_KO_ORDER_OK_CODE_EXT
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_flg_ok_term) | = ' '. | |||
| DATA(ld_flg_ok_frei) | = ' '. | |||
| DATA(ld_flg_ok_koze) | = ' '. | |||
| DATA(ld_flg_ok_vgue) | = ' '. | |||
| DATA(ld_flg_ok_kpu2) | = ' '. | |||
| DATA(ld_flg_ok_bu) | = ' '. | |||
| DATA(ld_flg_ok_capm) | = ' '. | |||
| DATA(ld_flg_ok_ctlk) | = ' '. | |||
Search for further information about these or an SAP related objects