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

Function FKR2_CREATE_HEADER 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 'FKR2_CREATE_HEADER'".
EXPORTING
I_BUKRS = "Company Code
* I_APPLK = '*' "Application Indicator
I_BUDAT = "Posting Date
I_BLART = "Document Type
I_HERKF = "Origin
I_RLGRD = "Returns Reason
I_FIKEY = "Reconciliation Key
I_WAERS = "Document Currency
I_BLDAT = "Document date
I_XBLNR = "Reference Document Number
IMPORTING
E_FKKKO = "
EXCEPTIONS
FAILURE = 1
IMPORTING Parameters details for FKR2_CREATE_HEADER
I_BUKRS - Company Code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_APPLK - Application Indicator
Data type: DFKKRK-APPLKDefault: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BUDAT - Posting Date
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_BLART - Document Type
Data type: DFKKRK-BLARTOptional: No
Call by Reference: No ( called with pass by value option)
I_HERKF - Origin
Data type: DFKKRK-HERKFOptional: No
Call by Reference: No ( called with pass by value option)
I_RLGRD - Returns Reason
Data type: DFKKRP-RLGRDOptional: No
Call by Reference: No ( called with pass by value option)
I_FIKEY - Reconciliation Key
Data type: DFKKRK-FIKEYOptional: No
Call by Reference: No ( called with pass by value option)
I_WAERS - Document Currency
Data type: FKKKO-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
I_BLDAT - Document date
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_XBLNR - Reference Document Number
Data type: FKKKO-XBLNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKR2_CREATE_HEADER
E_FKKKO -
Data type: FKKKOOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FKR2_CREATE_HEADER 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_fkkko | TYPE FKKKO, " | |||
| lv_failure | TYPE FKKKO, " | |||
| lv_i_bukrs | TYPE T001-BUKRS, " | |||
| lv_i_applk | TYPE DFKKRK-APPLK, " '*' | |||
| lv_i_budat | TYPE SY-DATUM, " | |||
| lv_i_blart | TYPE DFKKRK-BLART, " | |||
| lv_i_herkf | TYPE DFKKRK-HERKF, " | |||
| lv_i_rlgrd | TYPE DFKKRP-RLGRD, " | |||
| lv_i_fikey | TYPE DFKKRK-FIKEY, " | |||
| lv_i_waers | TYPE FKKKO-WAERS, " | |||
| lv_i_bldat | TYPE SY-DATUM, " | |||
| lv_i_xblnr | TYPE FKKKO-XBLNR. " |
|   CALL FUNCTION 'FKR2_CREATE_HEADER' " |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_APPLK | = lv_i_applk | |
| I_BUDAT | = lv_i_budat | |
| I_BLART | = lv_i_blart | |
| I_HERKF | = lv_i_herkf | |
| I_RLGRD | = lv_i_rlgrd | |
| I_FIKEY | = lv_i_fikey | |
| I_WAERS | = lv_i_waers | |
| I_BLDAT | = lv_i_bldat | |
| I_XBLNR | = lv_i_xblnr | |
| IMPORTING | ||
| E_FKKKO | = lv_e_fkkko | |
| EXCEPTIONS | ||
| FAILURE = 1 | ||
| . " FKR2_CREATE_HEADER | ||
ABAP code using 7.40 inline data declarations to call FM FKR2_CREATE_HEADER
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 T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single APPLK FROM DFKKRK INTO @DATA(ld_i_applk). | ||||
| DATA(ld_i_applk) | = '*'. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_budat). | ||||
| "SELECT single BLART FROM DFKKRK INTO @DATA(ld_i_blart). | ||||
| "SELECT single HERKF FROM DFKKRK INTO @DATA(ld_i_herkf). | ||||
| "SELECT single RLGRD FROM DFKKRP INTO @DATA(ld_i_rlgrd). | ||||
| "SELECT single FIKEY FROM DFKKRK INTO @DATA(ld_i_fikey). | ||||
| "SELECT single WAERS FROM FKKKO INTO @DATA(ld_i_waers). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_bldat). | ||||
| "SELECT single XBLNR FROM FKKKO INTO @DATA(ld_i_xblnr). | ||||
Search for further information about these or an SAP related objects