SAP KR_CALC_DISTRIBUTION_VALUE Function Module for









KR_CALC_DISTRIBUTION_VALUE is a standard kr calc distribution value SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 kr calc distribution value FM, simply by entering the name KR_CALC_DISTRIBUTION_VALUE into the relevant SAP transaction such as SE37 or SE38.

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



Function KR_CALC_DISTRIBUTION_VALUE 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 'KR_CALC_DISTRIBUTION_VALUE'"
EXPORTING
I_BUKRS = "
I_AFABE = "
* I_BZDAT = SY-DATUM "
I_BUREG = "
* I_CALMT = 'A' "
* I_STLMT = 'P' "

TABLES
T_COBRB = "
T_ANEPK = "

EXCEPTIONS
NOT_FOUND = 1 NOT_SUPPORT = 2
.



IMPORTING Parameters details for KR_CALC_DISTRIBUTION_VALUE

I_BUKRS -

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

I_AFABE -

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

I_BZDAT -

Data type: ANEP-BZDAT
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BUREG -

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

I_CALMT -

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

I_STLMT -

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

TABLES Parameters details for KR_CALC_DISTRIBUTION_VALUE

T_COBRB -

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

T_ANEPK -

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

EXCEPTIONS details

NOT_FOUND -

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

NOT_SUPPORT -

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

Copy and paste ABAP code example for KR_CALC_DISTRIBUTION_VALUE 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_i_bukrs  TYPE T001-BUKRS, "   
lt_t_cobrb  TYPE STANDARD TABLE OF COBRB, "   
lv_not_found  TYPE COBRB, "   
lv_i_afabe  TYPE ANLB-AFABE, "   
lt_t_anepk  TYPE STANDARD TABLE OF V_ANEPK, "   
lv_not_support  TYPE V_ANEPK, "   
lv_i_bzdat  TYPE ANEP-BZDAT, "   SY-DATUM
lv_i_bureg  TYPE COBRB-BUREG, "   
lv_i_calmt  TYPE COBRB, "   'A'
lv_i_stlmt  TYPE COBRB. "   'P'

  CALL FUNCTION 'KR_CALC_DISTRIBUTION_VALUE'  "
    EXPORTING
         I_BUKRS = lv_i_bukrs
         I_AFABE = lv_i_afabe
         I_BZDAT = lv_i_bzdat
         I_BUREG = lv_i_bureg
         I_CALMT = lv_i_calmt
         I_STLMT = lv_i_stlmt
    TABLES
         T_COBRB = lt_t_cobrb
         T_ANEPK = lt_t_anepk
    EXCEPTIONS
        NOT_FOUND = 1
        NOT_SUPPORT = 2
. " KR_CALC_DISTRIBUTION_VALUE




ABAP code using 7.40 inline data declarations to call FM KR_CALC_DISTRIBUTION_VALUE

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 BUKRS FROM T001 INTO @DATA(ld_i_bukrs).
 
 
 
"SELECT single AFABE FROM ANLB INTO @DATA(ld_i_afabe).
 
 
 
"SELECT single BZDAT FROM ANEP INTO @DATA(ld_i_bzdat).
DATA(ld_i_bzdat) = SY-DATUM.
 
"SELECT single BUREG FROM COBRB INTO @DATA(ld_i_bureg).
 
DATA(ld_i_calmt) = 'A'.
 
DATA(ld_i_stlmt) = 'P'.
 


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!