SAP LOAN_DUNNING_CREATE Function Module for FI Dunning - Get Dunning Data for an Account
LOAN_DUNNING_CREATE is a standard loan dunning create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for FI Dunning - Get Dunning Data for an Account 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 loan dunning create FM, simply by entering the name LOAN_DUNNING_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVD_DUNN
Program Name: SAPLFVD_DUNN
Main Program: SAPLFVD_DUNN
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LOAN_DUNNING_CREATE 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 'LOAN_DUNNING_CREATE'"FI Dunning - Get Dunning Data for an Account.
EXPORTING
I_LAUFD = "Run Date
I_LAUFI = "Run ID
I_BUKRS = "Company Code
I_GRDAT = "Selection Date
I_AUSDT = "Date of Issue
I_TRACE = "KZ: Protokoll erzeugen?
I_MOUT = "KZ: Nachrichten im FB ausgeben
* I_OFI = 'X' "KZ: Open-FI ausführen
* I_CHECK_IN = ' ' "KZ: Von Mahnung Ändern aufgerufen
CHANGING
C_KUNNR = "Customer
C_LIFNR = "Vendor
TABLES
T_MHNK = "Dunning Header
T_MHND = "Dunning Lines
* T_MHNK_IN = "Mahnkopf von 'Mahnung Ändern'
* T_MHND_IN = "Positionen von 'Mahnung Ändern'
* T_FLDTAB = "Addl Selections
* T_ICCDBUKRS = "Dunning company code
* T_FIMSG = "Log
EXCEPTIONS
CUSTOMER_WO_PROCEDURE = 1 CUSTOMER_NOT_FOUND = 2 CUSTOMIZING_ERROR = 3 PARAMETER_ERROR = 4
IMPORTING Parameters details for LOAN_DUNNING_CREATE
I_LAUFD - Run Date
Data type: F150V-LAUFDOptional: No
Call by Reference: No ( called with pass by value option)
I_LAUFI - Run ID
Data type: F150V-LAUFIOptional: No
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_GRDAT - Selection Date
Data type: F150V-GRDATOptional: No
Call by Reference: No ( called with pass by value option)
I_AUSDT - Date of Issue
Data type: F150V-AUSDTOptional: No
Call by Reference: No ( called with pass by value option)
I_TRACE - KZ: Protokoll erzeugen?
Data type: BOOLE-BOOLEOptional: No
Call by Reference: No ( called with pass by value option)
I_MOUT - KZ: Nachrichten im FB ausgeben
Data type: BOOLE-BOOLEOptional: No
Call by Reference: No ( called with pass by value option)
I_OFI - KZ: Open-FI ausführen
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECK_IN - KZ: Von Mahnung Ändern aufgerufen
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for LOAN_DUNNING_CREATE
C_KUNNR - Customer
Data type: KNA1-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
C_LIFNR - Vendor
Data type: LFA1-LIFNROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for LOAN_DUNNING_CREATE
T_MHNK - Dunning Header
Data type: MHNKOptional: No
Call by Reference: No ( called with pass by value option)
T_MHND - Dunning Lines
Data type: MHNDOptional: No
Call by Reference: No ( called with pass by value option)
T_MHNK_IN - Mahnkopf von 'Mahnung Ändern'
Data type: MHNKOptional: Yes
Call by Reference: No ( called with pass by value option)
T_MHND_IN - Positionen von 'Mahnung Ändern'
Data type: MHNDOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FLDTAB - Addl Selections
Data type: IFLDTABOptional: Yes
Call by Reference: No ( called with pass by value option)
T_ICCDBUKRS - Dunning company code
Data type: IBKRTABOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FIMSG - Log
Data type: FIMSGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CUSTOMER_WO_PROCEDURE - Konto hat kein Mahnverfahren
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CUSTOMER_NOT_FOUND - Account not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CUSTOMIZING_ERROR - Customizing Settings Not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_ERROR - Kreditor und Debitor gefüllt -> ungültig
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LOAN_DUNNING_CREATE 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: | ||||
| lt_t_mhnk | TYPE STANDARD TABLE OF MHNK, " | |||
| lv_c_kunnr | TYPE KNA1-KUNNR, " | |||
| lv_i_laufd | TYPE F150V-LAUFD, " | |||
| lv_customer_wo_procedure | TYPE F150V, " | |||
| lt_t_mhnd | TYPE STANDARD TABLE OF MHND, " | |||
| lv_c_lifnr | TYPE LFA1-LIFNR, " | |||
| lv_i_laufi | TYPE F150V-LAUFI, " | |||
| lv_customer_not_found | TYPE F150V, " | |||
| lv_i_bukrs | TYPE T001-BUKRS, " | |||
| lt_t_mhnk_in | TYPE STANDARD TABLE OF MHNK, " | |||
| lv_customizing_error | TYPE MHNK, " | |||
| lv_i_grdat | TYPE F150V-GRDAT, " | |||
| lt_t_mhnd_in | TYPE STANDARD TABLE OF MHND, " | |||
| lv_parameter_error | TYPE MHND, " | |||
| lv_i_ausdt | TYPE F150V-AUSDT, " | |||
| lt_t_fldtab | TYPE STANDARD TABLE OF IFLDTAB, " | |||
| lv_i_trace | TYPE BOOLE-BOOLE, " | |||
| lt_t_iccdbukrs | TYPE STANDARD TABLE OF IBKRTAB, " | |||
| lv_i_mout | TYPE BOOLE-BOOLE, " | |||
| lt_t_fimsg | TYPE STANDARD TABLE OF FIMSG, " | |||
| lv_i_ofi | TYPE BOOLE-BOOLE, " 'X' | |||
| lv_i_check_in | TYPE BOOLE-BOOLE. " SPACE |
|   CALL FUNCTION 'LOAN_DUNNING_CREATE' "FI Dunning - Get Dunning Data for an Account |
| EXPORTING | ||
| I_LAUFD | = lv_i_laufd | |
| I_LAUFI | = lv_i_laufi | |
| I_BUKRS | = lv_i_bukrs | |
| I_GRDAT | = lv_i_grdat | |
| I_AUSDT | = lv_i_ausdt | |
| I_TRACE | = lv_i_trace | |
| I_MOUT | = lv_i_mout | |
| I_OFI | = lv_i_ofi | |
| I_CHECK_IN | = lv_i_check_in | |
| CHANGING | ||
| C_KUNNR | = lv_c_kunnr | |
| C_LIFNR | = lv_c_lifnr | |
| TABLES | ||
| T_MHNK | = lt_t_mhnk | |
| T_MHND | = lt_t_mhnd | |
| T_MHNK_IN | = lt_t_mhnk_in | |
| T_MHND_IN | = lt_t_mhnd_in | |
| T_FLDTAB | = lt_t_fldtab | |
| T_ICCDBUKRS | = lt_t_iccdbukrs | |
| T_FIMSG | = lt_t_fimsg | |
| EXCEPTIONS | ||
| CUSTOMER_WO_PROCEDURE = 1 | ||
| CUSTOMER_NOT_FOUND = 2 | ||
| CUSTOMIZING_ERROR = 3 | ||
| PARAMETER_ERROR = 4 | ||
| . " LOAN_DUNNING_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM LOAN_DUNNING_CREATE
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 KUNNR FROM KNA1 INTO @DATA(ld_c_kunnr). | ||||
| "SELECT single LAUFD FROM F150V INTO @DATA(ld_i_laufd). | ||||
| "SELECT single LIFNR FROM LFA1 INTO @DATA(ld_c_lifnr). | ||||
| "SELECT single LAUFI FROM F150V INTO @DATA(ld_i_laufi). | ||||
| "SELECT single BUKRS FROM T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single GRDAT FROM F150V INTO @DATA(ld_i_grdat). | ||||
| "SELECT single AUSDT FROM F150V INTO @DATA(ld_i_ausdt). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_trace). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_mout). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_ofi). | ||||
| DATA(ld_i_ofi) | = 'X'. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_check_in). | ||||
| DATA(ld_i_check_in) | = ' '. | |||
Search for further information about these or an SAP related objects