SAP APAR_CREDIT_MEMO_CLEARING Function Module for Clear credit memos with invoices









APAR_CREDIT_MEMO_CLEARING is a standard apar credit memo clearing SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Clear credit memos with invoices 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 apar credit memo clearing FM, simply by entering the name APAR_CREDIT_MEMO_CLEARING into the relevant SAP transaction such as SE37 or SE38.

Function Group: APAR_EBPP_IMPL
Program Name: SAPLAPAR_EBPP_IMPL
Main Program: SAPLAPAR_EBPP_IMPL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function APAR_CREDIT_MEMO_CLEARING 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 'APAR_CREDIT_MEMO_CLEARING'"Clear credit memos with invoices
EXPORTING
* I_XSET_PAY_AMNT_DEB = ' ' "Zahlbetrag auf Rechnungen setzen
* I_XSET_PAY_AMNT_CRE = ' ' "Zahlbetrag auf Gutschriften setzen
* I_XCOR_PAY_AMNT_DEB = ' ' "Zahlbetrag Rechnung entsprechend Verrechnung anpassen
* I_XCOR_PAY_AMNT_CRE = 'X' "Zahlbetrag Gutschrift entsprechend Verrechnung anpassen

IMPORTING
E_PAID_CREDITS = "Verrechnete Gutschriften
E_PAID_DEBITS = "Verrechnete Rechnungen
E_ALL_CREDITS_ASSIGNED = "Alle Gutschriften konnten verrechnet werden

TABLES
T_INVOICES = "BillerDirect: Rechnungsdaten
T_CLR_CRE_PART = "EBPP: Zuordnung Gutschrift zu Rechnung bei Teilverrechnung
.



IMPORTING Parameters details for APAR_CREDIT_MEMO_CLEARING

I_XSET_PAY_AMNT_DEB - Zahlbetrag auf Rechnungen setzen

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_XSET_PAY_AMNT_CRE - Zahlbetrag auf Gutschriften setzen

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_XCOR_PAY_AMNT_DEB - Zahlbetrag Rechnung entsprechend Verrechnung anpassen

Data type: BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_XCOR_PAY_AMNT_CRE - Zahlbetrag Gutschrift entsprechend Verrechnung anpassen

Data type: BOOLEAN
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for APAR_CREDIT_MEMO_CLEARING

E_PAID_CREDITS - Verrechnete Gutschriften

Data type: WRBTR
Optional: No
Call by Reference: Yes

E_PAID_DEBITS - Verrechnete Rechnungen

Data type: WRBTR
Optional: No
Call by Reference: Yes

E_ALL_CREDITS_ASSIGNED - Alle Gutschriften konnten verrechnet werden

Data type: BOOLEAN
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for APAR_CREDIT_MEMO_CLEARING

T_INVOICES - BillerDirect: Rechnungsdaten

Data type: APAREBPP_INVOICE
Optional: No
Call by Reference: Yes

T_CLR_CRE_PART - EBPP: Zuordnung Gutschrift zu Rechnung bei Teilverrechnung

Data type: APAREBPP_CLR_CRE_PART
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for APAR_CREDIT_MEMO_CLEARING 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_invoices  TYPE STANDARD TABLE OF APAREBPP_INVOICE, "   
lv_e_paid_credits  TYPE WRBTR, "   
lv_i_xset_pay_amnt_deb  TYPE BOOLEAN, "   SPACE
lv_e_paid_debits  TYPE WRBTR, "   
lt_t_clr_cre_part  TYPE STANDARD TABLE OF APAREBPP_CLR_CRE_PART, "   
lv_i_xset_pay_amnt_cre  TYPE BOOLEAN, "   SPACE
lv_i_xcor_pay_amnt_deb  TYPE BOOLEAN, "   SPACE
lv_e_all_credits_assigned  TYPE BOOLEAN, "   
lv_i_xcor_pay_amnt_cre  TYPE BOOLEAN. "   'X'

  CALL FUNCTION 'APAR_CREDIT_MEMO_CLEARING'  "Clear credit memos with invoices
    EXPORTING
         I_XSET_PAY_AMNT_DEB = lv_i_xset_pay_amnt_deb
         I_XSET_PAY_AMNT_CRE = lv_i_xset_pay_amnt_cre
         I_XCOR_PAY_AMNT_DEB = lv_i_xcor_pay_amnt_deb
         I_XCOR_PAY_AMNT_CRE = lv_i_xcor_pay_amnt_cre
    IMPORTING
         E_PAID_CREDITS = lv_e_paid_credits
         E_PAID_DEBITS = lv_e_paid_debits
         E_ALL_CREDITS_ASSIGNED = lv_e_all_credits_assigned
    TABLES
         T_INVOICES = lt_t_invoices
         T_CLR_CRE_PART = lt_t_clr_cre_part
. " APAR_CREDIT_MEMO_CLEARING




ABAP code using 7.40 inline data declarations to call FM APAR_CREDIT_MEMO_CLEARING

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_xset_pay_amnt_deb) = ' '.
 
 
 
DATA(ld_i_xset_pay_amnt_cre) = ' '.
 
DATA(ld_i_xcor_pay_amnt_deb) = ' '.
 
 
DATA(ld_i_xcor_pay_amnt_cre) = 'X'.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!