SAP ICL_DOC_CLEAR Function Module for Clearing of a Posting
ICL_DOC_CLEAR is a standard icl doc clear SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Clearing of a Posting 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 icl doc clear FM, simply by entering the name ICL_DOC_CLEAR into the relevant SAP transaction such as SE37 or SE38.
Function Group: ICL_CF_INT
Program Name: SAPLICL_CF_INT
Main Program: SAPLICL_CF_INT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ICL_DOC_CLEAR 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 'ICL_DOC_CLEAR'"Clearing of a Posting.
EXPORTING
* IV_OPBEL = "Number of a Contract Accounts Receivable and Payable Document
* IV_PAYPROTYPE = "Posting Transaction Type
IS_ICL_SCHEDPAY = "Entry Structure for CF/CD Interface
* IV_PROT = 'X' "Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
* IV_PROT_LEVEL = '4' "Single-Character Flag
IMPORTING
EV_OPBEL = "
EXCEPTIONS
CUSTOMIZING_ERROR = 1 POSTING_ERROR = 2 INT_ERROR = 3
IMPORTING Parameters details for ICL_DOC_CLEAR
IV_OPBEL - Number of a Contract Accounts Receivable and Payable Document
Data type: OPBEL_KKOptional: Yes
Call by Reference: Yes
IV_PAYPROTYPE - Posting Transaction Type
Data type: ICL_PAYPROTYPEOptional: Yes
Call by Reference: Yes
IS_ICL_SCHEDPAY - Entry Structure for CF/CD Interface
Data type: ICL_SCHEDPAYOptional: No
Call by Reference: Yes
IV_PROT - Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DDefault: 'X'
Optional: Yes
Call by Reference: Yes
IV_PROT_LEVEL - Single-Character Flag
Data type: CHAR1Default: '4'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ICL_DOC_CLEAR
EV_OPBEL -
Data type: OPBEL_KKOptional: No
Call by Reference: Yes
EXCEPTIONS details
CUSTOMIZING_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
POSTING_ERROR - Posting Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INT_ERROR - Internal Error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ICL_DOC_CLEAR 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_ev_opbel | TYPE OPBEL_KK, " | |||
| lv_iv_opbel | TYPE OPBEL_KK, " | |||
| lv_customizing_error | TYPE OPBEL_KK, " | |||
| lv_iv_payprotype | TYPE ICL_PAYPROTYPE, " | |||
| lv_posting_error | TYPE ICL_PAYPROTYPE, " | |||
| lv_int_error | TYPE ICL_PAYPROTYPE, " | |||
| lv_is_icl_schedpay | TYPE ICL_SCHEDPAY, " | |||
| lv_iv_prot | TYPE BOOLE_D, " 'X' | |||
| lv_iv_prot_level | TYPE CHAR1. " '4' |
|   CALL FUNCTION 'ICL_DOC_CLEAR' "Clearing of a Posting |
| EXPORTING | ||
| IV_OPBEL | = lv_iv_opbel | |
| IV_PAYPROTYPE | = lv_iv_payprotype | |
| IS_ICL_SCHEDPAY | = lv_is_icl_schedpay | |
| IV_PROT | = lv_iv_prot | |
| IV_PROT_LEVEL | = lv_iv_prot_level | |
| IMPORTING | ||
| EV_OPBEL | = lv_ev_opbel | |
| EXCEPTIONS | ||
| CUSTOMIZING_ERROR = 1 | ||
| POSTING_ERROR = 2 | ||
| INT_ERROR = 3 | ||
| . " ICL_DOC_CLEAR | ||
ABAP code using 7.40 inline data declarations to call FM ICL_DOC_CLEAR
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_iv_prot) | = 'X'. | |||
| DATA(ld_iv_prot_level) | = '4'. | |||
Search for further information about these or an SAP related objects