SAP FKK_CREATE_DOC_FROM_LOGICAL Function Module for
FKK_CREATE_DOC_FROM_LOGICAL is a standard fkk create doc from logical 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 fkk create doc from logical FM, simply by entering the name FKK_CREATE_DOC_FROM_LOGICAL into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKW2
Program Name: SAPLFKW2
Main Program: SAPLFKW2
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_CREATE_DOC_FROM_LOGICAL 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 'FKK_CREATE_DOC_FROM_LOGICAL'".
EXPORTING
I_MODE = "
* I_ONCOMMIT = "
* I_SIMULATION = "
* I_NOOPT = "
* I_UPD_COLL_BILL = "
* I_CALL_1120 = "
* I_CHECK_MODE = "
I_ACCUMULATE = "
* IX_SAMPLE_FLAG = ' ' "
* I_OBJ = "Object Data
* I_MASS = "
* I_CHANGEDOC = 'X' "
* I_USE_TYPE = ' ' "
* I_UPDATE_TASK = ' ' "
* I_CALC_TAX = 'X' "Calculate tax
IMPORTING
E_BELNR = "Document Number
E_OBJ = "
TABLES
* I_MUSTERFKKOP = "
I_LOGFKKOP = "
* I_NEWMUSTERFKKOP = "
I_FKKKO = "Document header
* T_LOGTTAB = "
* T_FKKOPL = "
* T_NOREPS_FKKOP = "
* T_KEY_SFKKOP = "
* T_RETURN_LOGFKKOP = "
EXCEPTIONS
UPDATE_FAILED = 1 GENERAL_FAULT = 2
IMPORTING Parameters details for FKK_CREATE_DOC_FROM_LOGICAL
I_MODE -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
I_ONCOMMIT -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SIMULATION -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NOOPT -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_UPD_COLL_BILL -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CALL_1120 -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECK_MODE -
Data type: CHKMD_KKOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ACCUMULATE -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
IX_SAMPLE_FLAG -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OBJ - Object Data
Data type: FKKWH_WHGRPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MASS -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHANGEDOC -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_USE_TYPE -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_UPDATE_TASK -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CALC_TAX - Calculate tax
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKK_CREATE_DOC_FROM_LOGICAL
E_BELNR - Document Number
Data type: FKKKO-OPBELOptional: No
Call by Reference: No ( called with pass by value option)
E_OBJ -
Data type: FKKWH_WHGRPOptional: No
Call by Reference: Yes
TABLES Parameters details for FKK_CREATE_DOC_FROM_LOGICAL
I_MUSTERFKKOP -
Data type: FKKOPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_LOGFKKOP -
Data type: SFKKOPOptional: No
Call by Reference: No ( called with pass by value option)
I_NEWMUSTERFKKOP -
Data type: FKKOPOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FKKKO - Document header
Data type: FKKKOOptional: No
Call by Reference: No ( called with pass by value option)
T_LOGTTAB -
Data type: FKKWH_LOGTTABOptional: Yes
Call by Reference: Yes
T_FKKOPL -
Data type: FKKOPLOptional: Yes
Call by Reference: No ( called with pass by value option)
T_NOREPS_FKKOP -
Data type: SFKKOPOptional: Yes
Call by Reference: Yes
T_KEY_SFKKOP -
Data type: SFKKOPOptional: Yes
Call by Reference: Yes
T_RETURN_LOGFKKOP -
Data type: SFKKOPOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
UPDATE_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERAL_FAULT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FKK_CREATE_DOC_FROM_LOGICAL 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_i_mode | TYPE C, " | |||
| lv_e_belnr | TYPE FKKKO-OPBEL, " | |||
| lt_i_musterfkkop | TYPE STANDARD TABLE OF FKKOP, " | |||
| lv_update_failed | TYPE FKKOP, " | |||
| lv_i_oncommit | TYPE BOOLE-BOOLE, " | |||
| lv_i_simulation | TYPE BOOLE-BOOLE, " | |||
| lv_i_noopt | TYPE BOOLE-BOOLE, " | |||
| lv_i_upd_coll_bill | TYPE BOOLE-BOOLE, " | |||
| lv_i_call_1120 | TYPE BOOLE-BOOLE, " | |||
| lv_i_check_mode | TYPE CHKMD_KK, " | |||
| lv_e_obj | TYPE FKKWH_WHGRP, " | |||
| lt_i_logfkkop | TYPE STANDARD TABLE OF SFKKOP, " | |||
| lv_i_accumulate | TYPE C, " | |||
| lv_general_fault | TYPE C, " | |||
| lv_ix_sample_flag | TYPE BOOLE-BOOLE, " SPACE | |||
| lt_i_newmusterfkkop | TYPE STANDARD TABLE OF FKKOP, " | |||
| lv_i_obj | TYPE FKKWH_WHGRP, " | |||
| lt_i_fkkko | TYPE STANDARD TABLE OF FKKKO, " | |||
| lv_i_mass | TYPE C, " | |||
| lt_t_logttab | TYPE STANDARD TABLE OF FKKWH_LOGTTAB, " | |||
| lt_t_fkkopl | TYPE STANDARD TABLE OF FKKOPL, " | |||
| lv_i_changedoc | TYPE C, " 'X' | |||
| lv_i_use_type | TYPE BOOLE-BOOLE, " SPACE | |||
| lt_t_noreps_fkkop | TYPE STANDARD TABLE OF SFKKOP, " | |||
| lt_t_key_sfkkop | TYPE STANDARD TABLE OF SFKKOP, " | |||
| lv_i_update_task | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_calc_tax | TYPE BOOLE-BOOLE, " 'X' | |||
| lt_t_return_logfkkop | TYPE STANDARD TABLE OF SFKKOP. " |
|   CALL FUNCTION 'FKK_CREATE_DOC_FROM_LOGICAL' " |
| EXPORTING | ||
| I_MODE | = lv_i_mode | |
| I_ONCOMMIT | = lv_i_oncommit | |
| I_SIMULATION | = lv_i_simulation | |
| I_NOOPT | = lv_i_noopt | |
| I_UPD_COLL_BILL | = lv_i_upd_coll_bill | |
| I_CALL_1120 | = lv_i_call_1120 | |
| I_CHECK_MODE | = lv_i_check_mode | |
| I_ACCUMULATE | = lv_i_accumulate | |
| IX_SAMPLE_FLAG | = lv_ix_sample_flag | |
| I_OBJ | = lv_i_obj | |
| I_MASS | = lv_i_mass | |
| I_CHANGEDOC | = lv_i_changedoc | |
| I_USE_TYPE | = lv_i_use_type | |
| I_UPDATE_TASK | = lv_i_update_task | |
| I_CALC_TAX | = lv_i_calc_tax | |
| IMPORTING | ||
| E_BELNR | = lv_e_belnr | |
| E_OBJ | = lv_e_obj | |
| TABLES | ||
| I_MUSTERFKKOP | = lt_i_musterfkkop | |
| I_LOGFKKOP | = lt_i_logfkkop | |
| I_NEWMUSTERFKKOP | = lt_i_newmusterfkkop | |
| I_FKKKO | = lt_i_fkkko | |
| T_LOGTTAB | = lt_t_logttab | |
| T_FKKOPL | = lt_t_fkkopl | |
| T_NOREPS_FKKOP | = lt_t_noreps_fkkop | |
| T_KEY_SFKKOP | = lt_t_key_sfkkop | |
| T_RETURN_LOGFKKOP | = lt_t_return_logfkkop | |
| EXCEPTIONS | ||
| UPDATE_FAILED = 1 | ||
| GENERAL_FAULT = 2 | ||
| . " FKK_CREATE_DOC_FROM_LOGICAL | ||
ABAP code using 7.40 inline data declarations to call FM FKK_CREATE_DOC_FROM_LOGICAL
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 OPBEL FROM FKKKO INTO @DATA(ld_e_belnr). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_oncommit). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_simulation). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_noopt). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_upd_coll_bill). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_call_1120). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_ix_sample_flag). | ||||
| DATA(ld_ix_sample_flag) | = ' '. | |||
| DATA(ld_i_changedoc) | = 'X'. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_use_type). | ||||
| DATA(ld_i_use_type) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_update_task). | ||||
| DATA(ld_i_update_task) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_calc_tax). | ||||
| DATA(ld_i_calc_tax) | = 'X'. | |||
Search for further information about these or an SAP related objects