SAP GET_INVOICE_DOCUMENT_NUMBERS Function Module for
GET_INVOICE_DOCUMENT_NUMBERS is a standard get invoice document numbers 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 get invoice document numbers FM, simply by entering the name GET_INVOICE_DOCUMENT_NUMBERS into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCHK
Program Name: SAPLFCHK
Main Program: SAPLFCHK
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GET_INVOICE_DOCUMENT_NUMBERS 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 'GET_INVOICE_DOCUMENT_NUMBERS'".
EXPORTING
I_GJAHR = "Fiscal year of the payment documen
I_VBLNR = "Payment document number
I_XBUKR = "cross-company transaction
I_ZBUKR = "Paying company code
* I_FULL_SEARCH = "Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
TABLES
T_INVOICE = "Table with invoice documents/clear
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for GET_INVOICE_DOCUMENT_NUMBERS
I_GJAHR - Fiscal year of the payment documen
Data type: PAYR-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_VBLNR - Payment document number
Data type: PAYR-VBLNROptional: No
Call by Reference: No ( called with pass by value option)
I_XBUKR - cross-company transaction
Data type: PAYR-XBUKROptional: No
Call by Reference: No ( called with pass by value option)
I_ZBUKR - Paying company code
Data type: PAYR-ZBUKROptional: No
Call by Reference: No ( called with pass by value option)
I_FULL_SEARCH - Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GET_INVOICE_DOCUMENT_NUMBERS
T_INVOICE - Table with invoice documents/clear
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - No payment document found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GET_INVOICE_DOCUMENT_NUMBERS 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_gjahr | TYPE PAYR-GJAHR, " | |||
| lv_not_found | TYPE PAYR, " | |||
| lt_t_invoice | TYPE STANDARD TABLE OF PAYR, " | |||
| lv_i_vblnr | TYPE PAYR-VBLNR, " | |||
| lv_i_xbukr | TYPE PAYR-XBUKR, " | |||
| lv_i_zbukr | TYPE PAYR-ZBUKR, " | |||
| lv_i_full_search | TYPE BOOLE-BOOLE. " |
|   CALL FUNCTION 'GET_INVOICE_DOCUMENT_NUMBERS' " |
| EXPORTING | ||
| I_GJAHR | = lv_i_gjahr | |
| I_VBLNR | = lv_i_vblnr | |
| I_XBUKR | = lv_i_xbukr | |
| I_ZBUKR | = lv_i_zbukr | |
| I_FULL_SEARCH | = lv_i_full_search | |
| TABLES | ||
| T_INVOICE | = lt_t_invoice | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " GET_INVOICE_DOCUMENT_NUMBERS | ||
ABAP code using 7.40 inline data declarations to call FM GET_INVOICE_DOCUMENT_NUMBERS
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 GJAHR FROM PAYR INTO @DATA(ld_i_gjahr). | ||||
| "SELECT single VBLNR FROM PAYR INTO @DATA(ld_i_vblnr). | ||||
| "SELECT single XBUKR FROM PAYR INTO @DATA(ld_i_xbukr). | ||||
| "SELECT single ZBUKR FROM PAYR INTO @DATA(ld_i_zbukr). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_full_search). | ||||
Search for further information about these or an SAP related objects