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

Function FKK_INVDOC_GET_BY_REFOBJ 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_INVDOC_GET_BY_REFOBJ'".
EXPORTING
* I_REFOBJNAME = "
* I_ACCEPT_REVERSAL = 'X' "
* I_REFOBJVALUE = "
* I_REFOBJVALUE_RANGES = "
* I_INVDOCNO_RANGES = "
* I_CRDATE_RANGES = "
* I_INVOICED = 'X' "
* I_ACCEPT_SIMULATED = ' ' "
* I_ACCEPT_PRELIMINARY = ' ' "
* I_ACCEPT_REVERSED = 'X' "
IMPORTING
E_INVDOCNO_TAB = "
E_FKKINVDOC_X_TAB = "
IMPORTING Parameters details for FKK_INVDOC_GET_BY_REFOBJ
I_REFOBJNAME -
Data type: INV_REFOBJNAME_KKOptional: Yes
Call by Reference: Yes
I_ACCEPT_REVERSAL -
Data type: XRVLDOC_SEL_KKDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_REFOBJVALUE -
Data type: INV_REFOBJVALUE_KKOptional: Yes
Call by Reference: Yes
I_REFOBJVALUE_RANGES -
Data type: FKK_RT_INV_REFOBJVALUEOptional: Yes
Call by Reference: Yes
I_INVDOCNO_RANGES -
Data type: FKK_RT_INVDOCNOOptional: Yes
Call by Reference: Yes
I_CRDATE_RANGES -
Data type: FKK_RT_CRDATEOptional: Yes
Call by Reference: Yes
I_INVOICED -
Data type: INV_POSTED_KKDefault: 'X'
Optional: Yes
Call by Reference: Yes
I_ACCEPT_SIMULATED -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: Yes
I_ACCEPT_PRELIMINARY -
Data type: XPRLDOC_SEL_KKDefault: ' '
Optional: Yes
Call by Reference: Yes
I_ACCEPT_REVERSED -
Data type: XREVDOC_SEL_KKDefault: 'X'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FKK_INVDOC_GET_BY_REFOBJ
E_INVDOCNO_TAB -
Data type: FKKINV_INVDOCNO_TABOptional: No
Call by Reference: Yes
E_FKKINVDOC_X_TAB -
Data type: FKKINVDOC_X_TABOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for FKK_INVDOC_GET_BY_REFOBJ 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_refobjname | TYPE INV_REFOBJNAME_KK, " | |||
| lv_e_invdocno_tab | TYPE FKKINV_INVDOCNO_TAB, " | |||
| lv_i_accept_reversal | TYPE XRVLDOC_SEL_KK, " 'X' | |||
| lv_i_refobjvalue | TYPE INV_REFOBJVALUE_KK, " | |||
| lv_e_fkkinvdoc_x_tab | TYPE FKKINVDOC_X_TAB, " | |||
| lv_i_refobjvalue_ranges | TYPE FKK_RT_INV_REFOBJVALUE, " | |||
| lv_i_invdocno_ranges | TYPE FKK_RT_INVDOCNO, " | |||
| lv_i_crdate_ranges | TYPE FKK_RT_CRDATE, " | |||
| lv_i_invoiced | TYPE INV_POSTED_KK, " 'X' | |||
| lv_i_accept_simulated | TYPE XFELD, " ' ' | |||
| lv_i_accept_preliminary | TYPE XPRLDOC_SEL_KK, " ' ' | |||
| lv_i_accept_reversed | TYPE XREVDOC_SEL_KK. " 'X' |
|   CALL FUNCTION 'FKK_INVDOC_GET_BY_REFOBJ' " |
| EXPORTING | ||
| I_REFOBJNAME | = lv_i_refobjname | |
| I_ACCEPT_REVERSAL | = lv_i_accept_reversal | |
| I_REFOBJVALUE | = lv_i_refobjvalue | |
| I_REFOBJVALUE_RANGES | = lv_i_refobjvalue_ranges | |
| I_INVDOCNO_RANGES | = lv_i_invdocno_ranges | |
| I_CRDATE_RANGES | = lv_i_crdate_ranges | |
| I_INVOICED | = lv_i_invoiced | |
| I_ACCEPT_SIMULATED | = lv_i_accept_simulated | |
| I_ACCEPT_PRELIMINARY | = lv_i_accept_preliminary | |
| I_ACCEPT_REVERSED | = lv_i_accept_reversed | |
| IMPORTING | ||
| E_INVDOCNO_TAB | = lv_e_invdocno_tab | |
| E_FKKINVDOC_X_TAB | = lv_e_fkkinvdoc_x_tab | |
| . " FKK_INVDOC_GET_BY_REFOBJ | ||
ABAP code using 7.40 inline data declarations to call FM FKK_INVDOC_GET_BY_REFOBJ
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_i_accept_reversal) | = 'X'. | |||
| DATA(ld_i_invoiced) | = 'X'. | |||
| DATA(ld_i_accept_simulated) | = ' '. | |||
| DATA(ld_i_accept_preliminary) | = ' '. | |||
| DATA(ld_i_accept_reversed) | = 'X'. | |||
Search for further information about these or an SAP related objects