SAP FMED_GET_DOCLIST Function Module for Gives a list of header of document according selection criteria
FMED_GET_DOCLIST is a standard fmed get doclist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Gives a list of header of document according selection criteria processing and below is the pattern details for this FM, 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 fmed get doclist FM, simply by entering the name FMED_GET_DOCLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: FMED_DATABASE_ACCESS
Program Name: SAPLFMED_DATABASE_ACCESS
Main Program: SAPLFMED_DATABASE_ACCESS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FMED_GET_DOCLIST 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 'FMED_GET_DOCLIST'"Gives a list of header of document according selection criteria.
EXPORTING
I_FMAREA = "Financial management area
* I_MAX_NUMBER = "Maximum number of selected documents
IMPORTING
E_T_DOC_FMBH = "Table of header of entry documents (FMBH)
TABLES
* I_T_DOCYEAR = "Selection criteria for document year
* I_T_DOCSTATE = "Selection criteria for document status
* I_T_REVSTATE = "Selection criteria for reversal status
* I_T_REV_REFNR = "Selection criteria for reversal reference document number
* I_T_DOCTYPE = "Selection criteria for document type
* I_T_DOCFAM = "Selection criteria for document family
* I_T_TEXTNAME = "Selection criteria for standard text
* I_T_AWORG = "Selection criteria for reference organisational unit
* I_T_AWREF = "Selection criteria for reference document number
* I_T_AWSYS = "Selection criteria for logical system of source document
* I_T_AWTYP = "Selection criteria for reference procedure
* I_T_DOCNR = "Selection criteria for document number
* I_T_TECHORG = "Selection criteria for technical origin
* I_T_PROCESS_UI = "Selection criteria for process
* I_T_VERSION = "Structure of a Range Table for a 3 Character Field
* I_T_CRTUSER = "Selection criteria for user name
* I_T_CRTDATE = "Selection criteria for creation date
* I_T_DOCDATE = "Selection criteria for document date
* I_T_POSTDATE = "Selection criteria for posting date
* I_T_RESPPERS = "Selection criteria for responsible person
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for FMED_GET_DOCLIST
I_FMAREA - Financial management area
Data type: FIKRSOptional: No
Call by Reference: Yes
I_MAX_NUMBER - Maximum number of selected documents
Data type: IOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FMED_GET_DOCLIST
E_T_DOC_FMBH - Table of header of entry documents (FMBH)
Data type: FMED_T_FMBHOptional: No
Call by Reference: Yes
TABLES Parameters details for FMED_GET_DOCLIST
I_T_DOCYEAR - Selection criteria for document year
Data type: BAPI_0050_SELDOCYEAROptional: Yes
Call by Reference: Yes
I_T_DOCSTATE - Selection criteria for document status
Data type: BAPI_0050_SELDOCSTATEOptional: Yes
Call by Reference: Yes
I_T_REVSTATE - Selection criteria for reversal status
Data type: BAPI_0050_SELREVSTATEOptional: Yes
Call by Reference: Yes
I_T_REV_REFNR - Selection criteria for reversal reference document number
Data type: BAPI_0050_SELREFNROptional: Yes
Call by Reference: Yes
I_T_DOCTYPE - Selection criteria for document type
Data type: BAPI_0050_SELDOCTYPEOptional: Yes
Call by Reference: Yes
I_T_DOCFAM - Selection criteria for document family
Data type: BAPI_0050_SELDOCFAMOptional: Yes
Call by Reference: Yes
I_T_TEXTNAME - Selection criteria for standard text
Data type: BAPI_0050_SELSTDTXTOptional: Yes
Call by Reference: Yes
I_T_AWORG - Selection criteria for reference organisational unit
Data type: BAPI_0050_SELREFORGUNOptional: Yes
Call by Reference: Yes
I_T_AWREF - Selection criteria for reference document number
Data type: BAPI_0050_SELREFDOCOptional: Yes
Call by Reference: Yes
I_T_AWSYS - Selection criteria for logical system of source document
Data type: BAPI_0050_SELOBJSYSOptional: Yes
Call by Reference: Yes
I_T_AWTYP - Selection criteria for reference procedure
Data type: BAPI_0050_SELOBJTYPEOptional: Yes
Call by Reference: Yes
I_T_DOCNR - Selection criteria for document number
Data type: BAPI_0050_SELDOCNROptional: Yes
Call by Reference: Yes
I_T_TECHORG - Selection criteria for technical origin
Data type: BAPI_0050_SELTECHORGOptional: Yes
Call by Reference: Yes
I_T_PROCESS_UI - Selection criteria for process
Data type: BAPI_0050_SELPROCESSOptional: Yes
Call by Reference: Yes
I_T_VERSION - Structure of a Range Table for a 3 Character Field
Data type: BAPI_0050_SELVERSIONOptional: Yes
Call by Reference: Yes
I_T_CRTUSER - Selection criteria for user name
Data type: BAPI_0050_SELCRTUSEROptional: Yes
Call by Reference: Yes
I_T_CRTDATE - Selection criteria for creation date
Data type: BAPI_0050_SELCRTDATEOptional: Yes
Call by Reference: Yes
I_T_DOCDATE - Selection criteria for document date
Data type: BAPI_0050_SELDOCDATEOptional: Yes
Call by Reference: Yes
I_T_POSTDATE - Selection criteria for posting date
Data type: BAPI_0050_SELPOSTDATEOptional: Yes
Call by Reference: Yes
I_T_RESPPERS - Selection criteria for responsible person
Data type: BAPI_0050_SELRESPPERSOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND - No record found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FMED_GET_DOCLIST 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_fmarea | TYPE FIKRS, " | |||
| lv_not_found | TYPE FIKRS, " | |||
| lt_i_t_docyear | TYPE STANDARD TABLE OF BAPI_0050_SELDOCYEAR, " | |||
| lv_e_t_doc_fmbh | TYPE FMED_T_FMBH, " | |||
| lt_i_t_docstate | TYPE STANDARD TABLE OF BAPI_0050_SELDOCSTATE, " | |||
| lt_i_t_revstate | TYPE STANDARD TABLE OF BAPI_0050_SELREVSTATE, " | |||
| lt_i_t_rev_refnr | TYPE STANDARD TABLE OF BAPI_0050_SELREFNR, " | |||
| lt_i_t_doctype | TYPE STANDARD TABLE OF BAPI_0050_SELDOCTYPE, " | |||
| lt_i_t_docfam | TYPE STANDARD TABLE OF BAPI_0050_SELDOCFAM, " | |||
| lt_i_t_textname | TYPE STANDARD TABLE OF BAPI_0050_SELSTDTXT, " | |||
| lt_i_t_aworg | TYPE STANDARD TABLE OF BAPI_0050_SELREFORGUN, " | |||
| lt_i_t_awref | TYPE STANDARD TABLE OF BAPI_0050_SELREFDOC, " | |||
| lt_i_t_awsys | TYPE STANDARD TABLE OF BAPI_0050_SELOBJSYS, " | |||
| lt_i_t_awtyp | TYPE STANDARD TABLE OF BAPI_0050_SELOBJTYPE, " | |||
| lt_i_t_docnr | TYPE STANDARD TABLE OF BAPI_0050_SELDOCNR, " | |||
| lv_i_max_number | TYPE I, " | |||
| lt_i_t_techorg | TYPE STANDARD TABLE OF BAPI_0050_SELTECHORG, " | |||
| lt_i_t_process_ui | TYPE STANDARD TABLE OF BAPI_0050_SELPROCESS, " | |||
| lt_i_t_version | TYPE STANDARD TABLE OF BAPI_0050_SELVERSION, " | |||
| lt_i_t_crtuser | TYPE STANDARD TABLE OF BAPI_0050_SELCRTUSER, " | |||
| lt_i_t_crtdate | TYPE STANDARD TABLE OF BAPI_0050_SELCRTDATE, " | |||
| lt_i_t_docdate | TYPE STANDARD TABLE OF BAPI_0050_SELDOCDATE, " | |||
| lt_i_t_postdate | TYPE STANDARD TABLE OF BAPI_0050_SELPOSTDATE, " | |||
| lt_i_t_resppers | TYPE STANDARD TABLE OF BAPI_0050_SELRESPPERS. " |
|   CALL FUNCTION 'FMED_GET_DOCLIST' "Gives a list of header of document according selection criteria |
| EXPORTING | ||
| I_FMAREA | = lv_i_fmarea | |
| I_MAX_NUMBER | = lv_i_max_number | |
| IMPORTING | ||
| E_T_DOC_FMBH | = lv_e_t_doc_fmbh | |
| TABLES | ||
| I_T_DOCYEAR | = lt_i_t_docyear | |
| I_T_DOCSTATE | = lt_i_t_docstate | |
| I_T_REVSTATE | = lt_i_t_revstate | |
| I_T_REV_REFNR | = lt_i_t_rev_refnr | |
| I_T_DOCTYPE | = lt_i_t_doctype | |
| I_T_DOCFAM | = lt_i_t_docfam | |
| I_T_TEXTNAME | = lt_i_t_textname | |
| I_T_AWORG | = lt_i_t_aworg | |
| I_T_AWREF | = lt_i_t_awref | |
| I_T_AWSYS | = lt_i_t_awsys | |
| I_T_AWTYP | = lt_i_t_awtyp | |
| I_T_DOCNR | = lt_i_t_docnr | |
| I_T_TECHORG | = lt_i_t_techorg | |
| I_T_PROCESS_UI | = lt_i_t_process_ui | |
| I_T_VERSION | = lt_i_t_version | |
| I_T_CRTUSER | = lt_i_t_crtuser | |
| I_T_CRTDATE | = lt_i_t_crtdate | |
| I_T_DOCDATE | = lt_i_t_docdate | |
| I_T_POSTDATE | = lt_i_t_postdate | |
| I_T_RESPPERS | = lt_i_t_resppers | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " FMED_GET_DOCLIST | ||
ABAP code using 7.40 inline data declarations to call FM FMED_GET_DOCLIST
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.Search for further information about these or an SAP related objects