SAP CUSTOMER_PAYMENT_HISTORY Function Module for Payment History at Control Area Level









CUSTOMER_PAYMENT_HISTORY is a standard customer payment history SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Payment History at Control Area Level 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 customer payment history FM, simply by entering the name CUSTOMER_PAYMENT_HISTORY into the relevant SAP transaction such as SE37 or SE38.

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



Function CUSTOMER_PAYMENT_HISTORY 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 'CUSTOMER_PAYMENT_HISTORY'"Payment History at Control Area Level
EXPORTING
* I_KKBER = "Control area
I_KUNNR = "Customer

TABLES
T_KNB4 = "Payment history
* T_BUKTAB = "Company Codes

EXCEPTIONS
NO_BUKRS = 1 NO_PAYMENT_HISTORY = 2 INVALID_CALL = 3
.



IMPORTING Parameters details for CUSTOMER_PAYMENT_HISTORY

I_KKBER - Control area

Data type: T014-KKBER
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KUNNR - Customer

Data type: KNA1-KUNNR
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CUSTOMER_PAYMENT_HISTORY

T_KNB4 - Payment history

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

T_BUKTAB - Company Codes

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

EXCEPTIONS details

NO_BUKRS - Customer created in no company code

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

NO_PAYMENT_HISTORY - Record entry payment history not active

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

INVALID_CALL -

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

Copy and paste ABAP code example for CUSTOMER_PAYMENT_HISTORY 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_knb4  TYPE STANDARD TABLE OF IKNB4, "   
lv_i_kkber  TYPE T014-KKBER, "   
lv_no_bukrs  TYPE T014, "   
lv_i_kunnr  TYPE KNA1-KUNNR, "   
lt_t_buktab  TYPE STANDARD TABLE OF T001CM, "   
lv_no_payment_history  TYPE T001CM, "   
lv_invalid_call  TYPE T001CM. "   

  CALL FUNCTION 'CUSTOMER_PAYMENT_HISTORY'  "Payment History at Control Area Level
    EXPORTING
         I_KKBER = lv_i_kkber
         I_KUNNR = lv_i_kunnr
    TABLES
         T_KNB4 = lt_t_knb4
         T_BUKTAB = lt_t_buktab
    EXCEPTIONS
        NO_BUKRS = 1
        NO_PAYMENT_HISTORY = 2
        INVALID_CALL = 3
. " CUSTOMER_PAYMENT_HISTORY




ABAP code using 7.40 inline data declarations to call FM CUSTOMER_PAYMENT_HISTORY

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 KKBER FROM T014 INTO @DATA(ld_i_kkber).
 
 
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_i_kunnr).
 
 
 
 


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!