SAP MV_GET_CURRENT_KOKO Function Module for
MV_GET_CURRENT_KOKO is a standard mv get current koko 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 mv get current koko FM, simply by entering the name MV_GET_CURRENT_KOKO into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVI1
Program Name: SAPLFVI1
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MV_GET_CURRENT_KOKO 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 'MV_GET_CURRENT_KOKO'".
EXPORTING
BUKRS = "
* CURR_DATE = SY-DATUM "
* NLFD_ANG = '000' "
SMENR = "
SMIVE = "
SWENR = "
* IP_FIRST_HD = ' ' "
IMPORTING
E_VIKOKO = "
EXCEPTIONS
NO_KOKO_FOUND = 1
IMPORTING Parameters details for MV_GET_CURRENT_KOKO
BUKRS -
Data type: VIMIMV-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
CURR_DATE -
Data type: VIKOKO-DGUEL_KKDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
NLFD_ANG -
Data type: VIKOKO-NLFD_ANGDefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SMENR -
Data type: VIMIMV-SMENROptional: No
Call by Reference: No ( called with pass by value option)
SMIVE -
Data type: VIMIMV-SMIVEOptional: No
Call by Reference: No ( called with pass by value option)
SWENR -
Data type: VIMIMV-SWENROptional: No
Call by Reference: No ( called with pass by value option)
IP_FIRST_HD -
Data type: CDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MV_GET_CURRENT_KOKO
E_VIKOKO -
Data type: VIKOKOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_KOKO_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MV_GET_CURRENT_KOKO 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_bukrs | TYPE VIMIMV-BUKRS, " | |||
| lv_e_vikoko | TYPE VIKOKO, " | |||
| lv_no_koko_found | TYPE VIKOKO, " | |||
| lv_curr_date | TYPE VIKOKO-DGUEL_KK, " SY-DATUM | |||
| lv_nlfd_ang | TYPE VIKOKO-NLFD_ANG, " '000' | |||
| lv_smenr | TYPE VIMIMV-SMENR, " | |||
| lv_smive | TYPE VIMIMV-SMIVE, " | |||
| lv_swenr | TYPE VIMIMV-SWENR, " | |||
| lv_ip_first_hd | TYPE C. " ' ' |
|   CALL FUNCTION 'MV_GET_CURRENT_KOKO' " |
| EXPORTING | ||
| BUKRS | = lv_bukrs | |
| CURR_DATE | = lv_curr_date | |
| NLFD_ANG | = lv_nlfd_ang | |
| SMENR | = lv_smenr | |
| SMIVE | = lv_smive | |
| SWENR | = lv_swenr | |
| IP_FIRST_HD | = lv_ip_first_hd | |
| IMPORTING | ||
| E_VIKOKO | = lv_e_vikoko | |
| EXCEPTIONS | ||
| NO_KOKO_FOUND = 1 | ||
| . " MV_GET_CURRENT_KOKO | ||
ABAP code using 7.40 inline data declarations to call FM MV_GET_CURRENT_KOKO
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 BUKRS FROM VIMIMV INTO @DATA(ld_bukrs). | ||||
| "SELECT single DGUEL_KK FROM VIKOKO INTO @DATA(ld_curr_date). | ||||
| DATA(ld_curr_date) | = SY-DATUM. | |||
| "SELECT single NLFD_ANG FROM VIKOKO INTO @DATA(ld_nlfd_ang). | ||||
| DATA(ld_nlfd_ang) | = '000'. | |||
| "SELECT single SMENR FROM VIMIMV INTO @DATA(ld_smenr). | ||||
| "SELECT single SMIVE FROM VIMIMV INTO @DATA(ld_smive). | ||||
| "SELECT single SWENR FROM VIMIMV INTO @DATA(ld_swenr). | ||||
| DATA(ld_ip_first_hd) | = ' '. | |||
Search for further information about these or an SAP related objects