SAP SD_COND_STATISTICS_READ Function Module for NOTRANSL: Lesen von Statistiken zu einem Konditionssatz









SD_COND_STATISTICS_READ is a standard sd cond statistics read 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: Lesen von Statistiken zu einem Konditionssatz 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 sd cond statistics read FM, simply by entering the name SD_COND_STATISTICS_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function SD_COND_STATISTICS_READ 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 'SD_COND_STATISTICS_READ'"NOTRANSL: Lesen von Statistiken zu einem Konditionssatz
EXPORTING
* BUFFER_READ = 'X' "'X' to display if buffer data, ' ' otherwise
CONDITION_ITEM = "Serial number of condition (-> KONP-KOPOS)
CONDITION_NUMBER = "Number condition record (-> KONP-KNUMH)
* SALES_ORDER = ' ' "Sales document (-> S071-AUNR1)
* S071_NOT_READ = ' ' "Flag whether S071 is not to be read
* S060_NOT_READ = 'X' "Flag whether S060 is not to be read

IMPORTING
KAWRT_SUM = "Total of the condition base values
KMEIN_S060 = "
KZBZG_S060 = "
KONMS_S060 = "
KONWS_S060 = "
KRECH_S060 = "
KWERT_SUM = "Total of the condition values
NMB_OF_SALES_ORDERS = "No. of different sales documents in selection
SALES_ORDER_EXISTS = "'X', if SALES_ORDER appears in selection
KWERT_S060 = "Cumulative condition value from billing document
KAWRT_S060 = "Cumulative condition base value from billing document
KSTBS_S060 = "Cumulative scale base value from billing document
STWAE = "
KWAEH_S060 = "
.



IMPORTING Parameters details for SD_COND_STATISTICS_READ

BUFFER_READ - 'X' to display if buffer data, ' ' otherwise

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

CONDITION_ITEM - Serial number of condition (-> KONP-KOPOS)

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

CONDITION_NUMBER - Number condition record (-> KONP-KNUMH)

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

SALES_ORDER - Sales document (-> S071-AUNR1)

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

S071_NOT_READ - Flag whether S071 is not to be read

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

S060_NOT_READ - Flag whether S060 is not to be read

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

EXPORTING Parameters details for SD_COND_STATISTICS_READ

KAWRT_SUM - Total of the condition base values

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

KMEIN_S060 -

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

KZBZG_S060 -

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

KONMS_S060 -

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

KONWS_S060 -

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

KRECH_S060 -

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

KWERT_SUM - Total of the condition values

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

NMB_OF_SALES_ORDERS - No. of different sales documents in selection

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

SALES_ORDER_EXISTS - 'X', if SALES_ORDER appears in selection

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

KWERT_S060 - Cumulative condition value from billing document

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

KAWRT_S060 - Cumulative condition base value from billing document

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

KSTBS_S060 - Cumulative scale base value from billing document

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

STWAE -

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

KWAEH_S060 -

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

Copy and paste ABAP code example for SD_COND_STATISTICS_READ 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_kawrt_sum  TYPE S071-KAWRT, "   
lv_buffer_read  TYPE S071, "   'X'
lv_kmein_s060  TYPE KVMEI, "   
lv_kzbzg_s060  TYPE KZBZG, "   
lv_konms_s060  TYPE KONMS, "   
lv_konws_s060  TYPE KONWS, "   
lv_krech_s060  TYPE KRECH, "   
lv_kwert_sum  TYPE S071-KWERT, "   
lv_condition_item  TYPE KONP-KOPOS, "   
lv_condition_number  TYPE KONP-KNUMH, "   
lv_nmb_of_sales_orders  TYPE KONP, "   
lv_sales_order  TYPE S071-AUNR1, "   ' '
lv_sales_order_exists  TYPE S071, "   
lv_kwert_s060  TYPE S060-KWERT_K, "   
lv_s071_not_read  TYPE S060, "   ' '
lv_kawrt_s060  TYPE S060-KAWRT_K, "   
lv_s060_not_read  TYPE S060, "   'X'
lv_kstbs_s060  TYPE S060-KSTBS, "   
lv_stwae  TYPE STWAE, "   
lv_kwaeh_s060  TYPE KWAEH. "   

  CALL FUNCTION 'SD_COND_STATISTICS_READ'  "NOTRANSL: Lesen von Statistiken zu einem Konditionssatz
    EXPORTING
         BUFFER_READ = lv_buffer_read
         CONDITION_ITEM = lv_condition_item
         CONDITION_NUMBER = lv_condition_number
         SALES_ORDER = lv_sales_order
         S071_NOT_READ = lv_s071_not_read
         S060_NOT_READ = lv_s060_not_read
    IMPORTING
         KAWRT_SUM = lv_kawrt_sum
         KMEIN_S060 = lv_kmein_s060
         KZBZG_S060 = lv_kzbzg_s060
         KONMS_S060 = lv_konms_s060
         KONWS_S060 = lv_konws_s060
         KRECH_S060 = lv_krech_s060
         KWERT_SUM = lv_kwert_sum
         NMB_OF_SALES_ORDERS = lv_nmb_of_sales_orders
         SALES_ORDER_EXISTS = lv_sales_order_exists
         KWERT_S060 = lv_kwert_s060
         KAWRT_S060 = lv_kawrt_s060
         KSTBS_S060 = lv_kstbs_s060
         STWAE = lv_stwae
         KWAEH_S060 = lv_kwaeh_s060
. " SD_COND_STATISTICS_READ




ABAP code using 7.40 inline data declarations to call FM SD_COND_STATISTICS_READ

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 KAWRT FROM S071 INTO @DATA(ld_kawrt_sum).
 
DATA(ld_buffer_read) = 'X'.
 
 
 
 
 
 
"SELECT single KWERT FROM S071 INTO @DATA(ld_kwert_sum).
 
"SELECT single KOPOS FROM KONP INTO @DATA(ld_condition_item).
 
"SELECT single KNUMH FROM KONP INTO @DATA(ld_condition_number).
 
 
"SELECT single AUNR1 FROM S071 INTO @DATA(ld_sales_order).
DATA(ld_sales_order) = ' '.
 
 
"SELECT single KWERT_K FROM S060 INTO @DATA(ld_kwert_s060).
 
DATA(ld_s071_not_read) = ' '.
 
"SELECT single KAWRT_K FROM S060 INTO @DATA(ld_kawrt_s060).
 
DATA(ld_s060_not_read) = 'X'.
 
"SELECT single KSTBS FROM S060 INTO @DATA(ld_kstbs_s060).
 
 
 


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!