SAP FKK_CREATE_DOC Function Module for
FKK_CREATE_DOC is a standard fkk create doc 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 FM, simply by entering the name FKK_CREATE_DOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKB0
Program Name: SAPLFKB0
Main Program: SAPLFKB0
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function FKK_CREATE_DOC 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'".
EXPORTING
I_FKKKO = "Document Header
* I_RESTRICT_NEGPO = ' ' "'X' Negative Posting Only for Selected Items
* I_ORIG_BUDAT = "Comparison Date as Supplement to I_RESTRICT_NEGPO
* I_NR_GROUP = '000' "
* I_UPDATE_TASK = "Indicator: Database Update in Update Task
* I_RESOB = "Reserved Object Type for Reconciliation Key
* I_RESKY = "Reserved Object Key for Reconciliation Key
* I_ADD_DOC = "'X' Additional Document
* I_TEST = ' ' "Test Call Only without Update/without FIKEY
* I_FKKOPL_CF = ' ' "'X' FKKOPL Only for Cash Forecast
* I_DIALOG = ' ' "'X' Dialog Boxes Permitted
* I_NO_4EYES = ' ' "'X' No Dual Control Principle Required
IMPORTING
E_OPBEL = "Assigned Document Number
E_C4EYE = "Reason for Required Confirmation
E_BUDAT = "Posting Date Used
E_BLDAT = "
TABLES
* T_FKKOP = "Line Items (Open Items)
* T_USTIN = "
* T_USTOUT = "
* T_FKKOPWH = "Withholding Tax Data for Business Partner Item
* T_FKKOPK = "Line Items (Offsetting Items)
* T_FKKOPW = "Line Items (Repetition Specifications)
* T_FKKOPL = "Blocking of Business Partner Items
* T_FKKOPC = "Authorization for Payment Card
* T_FKKOPKC = "Authorization for Payment Card
* T_FKKOPREL = "Object Relations for DFKKKO and DFKKOP
* T_FKKOP_ESR = "
IMPORTING Parameters details for FKK_CREATE_DOC
I_FKKKO - Document Header
Data type: FKKKOOptional: No
Call by Reference: No ( called with pass by value option)
I_RESTRICT_NEGPO - 'X' Negative Posting Only for Selected Items
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ORIG_BUDAT - Comparison Date as Supplement to I_RESTRICT_NEGPO
Data type: DOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NR_GROUP -
Data type: NUMC3Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_UPDATE_TASK - Indicator: Database Update in Update Task
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RESOB - Reserved Object Type for Reconciliation Key
Data type: DFKKSUMC-RESOBOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RESKY - Reserved Object Key for Reconciliation Key
Data type: DFKKSUMC-RESKYOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ADD_DOC - 'X' Additional Document
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TEST - Test Call Only without Update/without FIKEY
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FKKOPL_CF - 'X' FKKOPL Only for Cash Forecast
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DIALOG - 'X' Dialog Boxes Permitted
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_4EYES - 'X' No Dual Control Principle Required
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKK_CREATE_DOC
E_OPBEL - Assigned Document Number
Data type: FKKKO-OPBELOptional: No
Call by Reference: No ( called with pass by value option)
E_C4EYE - Reason for Required Confirmation
Data type: C4EYE_KKOptional: No
Call by Reference: No ( called with pass by value option)
E_BUDAT - Posting Date Used
Data type: BUDAT_KKOptional: No
Call by Reference: No ( called with pass by value option)
E_BLDAT -
Data type: BLDATOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FKK_CREATE_DOC
T_FKKOP - Line Items (Open Items)
Data type: FKKOPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_USTIN -
Data type: DFKKOPUSTAXIN00Optional: Yes
Call by Reference: Yes
T_USTOUT -
Data type: DFKKOPUSTAXOUT00Optional: Yes
Call by Reference: Yes
T_FKKOPWH - Withholding Tax Data for Business Partner Item
Data type: DFKKOPWHOptional: Yes
Call by Reference: Yes
T_FKKOPK - Line Items (Offsetting Items)
Data type: FKKOPKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKOPW - Line Items (Repetition Specifications)
Data type: FKKOPWOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKOPL - Blocking of Business Partner Items
Data type: FKKOPLOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FKKOPC - Authorization for Payment Card
Data type: DFKKOPCOptional: Yes
Call by Reference: Yes
T_FKKOPKC - Authorization for Payment Card
Data type: DFKKOPKCOptional: Yes
Call by Reference: Yes
T_FKKOPREL - Object Relations for DFKKKO and DFKKOP
Data type: FKKOPRELOptional: Yes
Call by Reference: Yes
T_FKKOP_ESR -
Data type: FKKOP_ESROptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for FKK_CREATE_DOC 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_e_opbel | TYPE FKKKO-OPBEL, " | |||
lv_i_fkkko | TYPE FKKKO, " | |||
lt_t_fkkop | TYPE STANDARD TABLE OF FKKOP, " | |||
lt_t_ustin | TYPE STANDARD TABLE OF DFKKOPUSTAXIN00, " | |||
lv_i_restrict_negpo | TYPE XFELD, " SPACE | |||
lt_t_ustout | TYPE STANDARD TABLE OF DFKKOPUSTAXOUT00, " | |||
lv_i_orig_budat | TYPE D, " | |||
lv_i_nr_group | TYPE NUMC3, " '000' | |||
lv_e_c4eye | TYPE C4EYE_KK, " | |||
lt_t_fkkopwh | TYPE STANDARD TABLE OF DFKKOPWH, " | |||
lv_i_update_task | TYPE BOOLE-BOOLE, " | |||
lv_e_budat | TYPE BUDAT_KK, " | |||
lv_i_resob | TYPE DFKKSUMC-RESOB, " | |||
lt_t_fkkopk | TYPE STANDARD TABLE OF FKKOPK, " | |||
lv_e_bldat | TYPE BLDAT, " | |||
lv_i_resky | TYPE DFKKSUMC-RESKY, " | |||
lt_t_fkkopw | TYPE STANDARD TABLE OF FKKOPW, " | |||
lt_t_fkkopl | TYPE STANDARD TABLE OF FKKOPL, " | |||
lv_i_add_doc | TYPE BOOLE-BOOLE, " | |||
lv_i_test | TYPE BOOLE-BOOLE, " SPACE | |||
lt_t_fkkopc | TYPE STANDARD TABLE OF DFKKOPC, " | |||
lt_t_fkkopkc | TYPE STANDARD TABLE OF DFKKOPKC, " | |||
lv_i_fkkopl_cf | TYPE BOOLE-BOOLE, " SPACE | |||
lv_i_dialog | TYPE BOOLE-BOOLE, " SPACE | |||
lt_t_fkkoprel | TYPE STANDARD TABLE OF FKKOPREL, " | |||
lv_i_no_4eyes | TYPE XFELD, " SPACE | |||
lt_t_fkkop_esr | TYPE STANDARD TABLE OF FKKOP_ESR. " |
  CALL FUNCTION 'FKK_CREATE_DOC' " |
EXPORTING | ||
I_FKKKO | = lv_i_fkkko | |
I_RESTRICT_NEGPO | = lv_i_restrict_negpo | |
I_ORIG_BUDAT | = lv_i_orig_budat | |
I_NR_GROUP | = lv_i_nr_group | |
I_UPDATE_TASK | = lv_i_update_task | |
I_RESOB | = lv_i_resob | |
I_RESKY | = lv_i_resky | |
I_ADD_DOC | = lv_i_add_doc | |
I_TEST | = lv_i_test | |
I_FKKOPL_CF | = lv_i_fkkopl_cf | |
I_DIALOG | = lv_i_dialog | |
I_NO_4EYES | = lv_i_no_4eyes | |
IMPORTING | ||
E_OPBEL | = lv_e_opbel | |
E_C4EYE | = lv_e_c4eye | |
E_BUDAT | = lv_e_budat | |
E_BLDAT | = lv_e_bldat | |
TABLES | ||
T_FKKOP | = lt_t_fkkop | |
T_USTIN | = lt_t_ustin | |
T_USTOUT | = lt_t_ustout | |
T_FKKOPWH | = lt_t_fkkopwh | |
T_FKKOPK | = lt_t_fkkopk | |
T_FKKOPW | = lt_t_fkkopw | |
T_FKKOPL | = lt_t_fkkopl | |
T_FKKOPC | = lt_t_fkkopc | |
T_FKKOPKC | = lt_t_fkkopkc | |
T_FKKOPREL | = lt_t_fkkoprel | |
T_FKKOP_ESR | = lt_t_fkkop_esr | |
. " FKK_CREATE_DOC |
ABAP code using 7.40 inline data declarations to call FM FKK_CREATE_DOC
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_opbel). | ||||
DATA(ld_i_restrict_negpo) | = ' '. | |||
DATA(ld_i_nr_group) | = '000'. | |||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_update_task). | ||||
"SELECT single RESOB FROM DFKKSUMC INTO @DATA(ld_i_resob). | ||||
"SELECT single RESKY FROM DFKKSUMC INTO @DATA(ld_i_resky). | ||||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_add_doc). | ||||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_test). | ||||
DATA(ld_i_test) | = ' '. | |||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_fkkopl_cf). | ||||
DATA(ld_i_fkkopl_cf) | = ' '. | |||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_dialog). | ||||
DATA(ld_i_dialog) | = ' '. | |||
DATA(ld_i_no_4eyes) | = ' '. | |||
Search for further information about these or an SAP related objects