SAP CREDIT_EXPOSURE Function Module for NOTRANSL: Kreditdaten: offene Werte: Auftrag, Lieferungen, offene Posten
CREDIT_EXPOSURE is a standard credit exposure SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Kreditdaten: offene Werte: Auftrag, Lieferungen, offene Posten 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 credit exposure FM, simply by entering the name CREDIT_EXPOSURE into the relevant SAP transaction such as SE37 or SE38.
Function Group: VKMP
Program Name: SAPLVKMP
Main Program: SAPLVKMP
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CREDIT_EXPOSURE 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 'CREDIT_EXPOSURE'"NOTRANSL: Kreditdaten: offene Werte: Auftrag, Lieferungen, offene Posten.
EXPORTING
KKBER = "Credit control area
KUNNR = "Customer
* DATE_CREDIT_EXPOSURE = '99991231' "
IMPORTING
CREDITLIMIT = "Credit limit
PERCENTAGE = "
SUM_OPENS = "Total of all open values
OPEN_ORDER_SECURE = "
OPEN_DELIVERY_SECURE = "
OPEN_INVOICE_SECURE = "
CMWAE = "
DELTA_TO_LIMIT = "Delta between credit limit and use
E_KNKK = "all fields credit customer (KNKK)
KNKLI = "Credit limit customer
OPEN_DELIVERY = "outstanding delivery values
OPEN_INVOICE = "open invoice values
OPEN_ITEMS = "Open Items
OPEN_ORDER = "outstanding order values
OPEN_SPECIALS = "open special G/L transactions
IMPORTING Parameters details for CREDIT_EXPOSURE
KKBER - Credit control area
Data type: T014-KKBEROptional: No
Call by Reference: No ( called with pass by value option)
KUNNR - Customer
Data type: KNKK-KUNNROptional: No
Call by Reference: No ( called with pass by value option)
DATE_CREDIT_EXPOSURE -
Data type: S066-SPTAGDefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CREDIT_EXPOSURE
CREDITLIMIT - Credit limit
Data type: KNKK-KLIMKOptional: No
Call by Reference: No ( called with pass by value option)
PERCENTAGE -
Data type: VBKRED-KLPRZOptional: No
Call by Reference: No ( called with pass by value option)
SUM_OPENS - Total of all open values
Data type: RF02L-OBLIGOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_ORDER_SECURE -
Data type: S066-AOEIWOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_DELIVERY_SECURE -
Data type: S067-AOLIWOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_INVOICE_SECURE -
Data type: S067-AOFAWOptional: No
Call by Reference: No ( called with pass by value option)
CMWAE -
Data type: T014-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
DELTA_TO_LIMIT - Delta between credit limit and use
Data type: KNKK-KLIMKOptional: No
Call by Reference: No ( called with pass by value option)
E_KNKK - all fields credit customer (KNKK)
Data type: KNKKOptional: No
Call by Reference: No ( called with pass by value option)
KNKLI - Credit limit customer
Data type: KNKK-KNKLIOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_DELIVERY - outstanding delivery values
Data type: S067-OLIKWOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_INVOICE - open invoice values
Data type: S067-OFAKWOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_ITEMS - Open Items
Data type: KNKK-SKFOROptional: No
Call by Reference: No ( called with pass by value option)
OPEN_ORDER - outstanding order values
Data type: S066-OEIKWOptional: No
Call by Reference: No ( called with pass by value option)
OPEN_SPECIALS - open special G/L transactions
Data type: KNKK-SSOBLOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CREDIT_EXPOSURE 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_kkber | TYPE T014-KKBER, " | |||
| lv_creditlimit | TYPE KNKK-KLIMK, " | |||
| lv_percentage | TYPE VBKRED-KLPRZ, " | |||
| lv_sum_opens | TYPE RF02L-OBLIG, " | |||
| lv_open_order_secure | TYPE S066-AOEIW, " | |||
| lv_open_delivery_secure | TYPE S067-AOLIW, " | |||
| lv_open_invoice_secure | TYPE S067-AOFAW, " | |||
| lv_cmwae | TYPE T014-WAERS, " | |||
| lv_kunnr | TYPE KNKK-KUNNR, " | |||
| lv_delta_to_limit | TYPE KNKK-KLIMK, " | |||
| lv_e_knkk | TYPE KNKK, " | |||
| lv_date_credit_exposure | TYPE S066-SPTAG, " '99991231' | |||
| lv_knkli | TYPE KNKK-KNKLI, " | |||
| lv_open_delivery | TYPE S067-OLIKW, " | |||
| lv_open_invoice | TYPE S067-OFAKW, " | |||
| lv_open_items | TYPE KNKK-SKFOR, " | |||
| lv_open_order | TYPE S066-OEIKW, " | |||
| lv_open_specials | TYPE KNKK-SSOBL. " |
|   CALL FUNCTION 'CREDIT_EXPOSURE' "NOTRANSL: Kreditdaten: offene Werte: Auftrag, Lieferungen, offene Posten |
| EXPORTING | ||
| KKBER | = lv_kkber | |
| KUNNR | = lv_kunnr | |
| DATE_CREDIT_EXPOSURE | = lv_date_credit_exposure | |
| IMPORTING | ||
| CREDITLIMIT | = lv_creditlimit | |
| PERCENTAGE | = lv_percentage | |
| SUM_OPENS | = lv_sum_opens | |
| OPEN_ORDER_SECURE | = lv_open_order_secure | |
| OPEN_DELIVERY_SECURE | = lv_open_delivery_secure | |
| OPEN_INVOICE_SECURE | = lv_open_invoice_secure | |
| CMWAE | = lv_cmwae | |
| DELTA_TO_LIMIT | = lv_delta_to_limit | |
| E_KNKK | = lv_e_knkk | |
| KNKLI | = lv_knkli | |
| OPEN_DELIVERY | = lv_open_delivery | |
| OPEN_INVOICE | = lv_open_invoice | |
| OPEN_ITEMS | = lv_open_items | |
| OPEN_ORDER | = lv_open_order | |
| OPEN_SPECIALS | = lv_open_specials | |
| . " CREDIT_EXPOSURE | ||
ABAP code using 7.40 inline data declarations to call FM CREDIT_EXPOSURE
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_kkber). | ||||
| "SELECT single KLIMK FROM KNKK INTO @DATA(ld_creditlimit). | ||||
| "SELECT single KLPRZ FROM VBKRED INTO @DATA(ld_percentage). | ||||
| "SELECT single OBLIG FROM RF02L INTO @DATA(ld_sum_opens). | ||||
| "SELECT single AOEIW FROM S066 INTO @DATA(ld_open_order_secure). | ||||
| "SELECT single AOLIW FROM S067 INTO @DATA(ld_open_delivery_secure). | ||||
| "SELECT single AOFAW FROM S067 INTO @DATA(ld_open_invoice_secure). | ||||
| "SELECT single WAERS FROM T014 INTO @DATA(ld_cmwae). | ||||
| "SELECT single KUNNR FROM KNKK INTO @DATA(ld_kunnr). | ||||
| "SELECT single KLIMK FROM KNKK INTO @DATA(ld_delta_to_limit). | ||||
| "SELECT single SPTAG FROM S066 INTO @DATA(ld_date_credit_exposure). | ||||
| DATA(ld_date_credit_exposure) | = '99991231'. | |||
| "SELECT single KNKLI FROM KNKK INTO @DATA(ld_knkli). | ||||
| "SELECT single OLIKW FROM S067 INTO @DATA(ld_open_delivery). | ||||
| "SELECT single OFAKW FROM S067 INTO @DATA(ld_open_invoice). | ||||
| "SELECT single SKFOR FROM KNKK INTO @DATA(ld_open_items). | ||||
| "SELECT single OEIKW FROM S066 INTO @DATA(ld_open_order). | ||||
| "SELECT single SSOBL FROM KNKK INTO @DATA(ld_open_specials). | ||||
Search for further information about these or an SAP related objects