SAP PRICES_CHANGE Function Module for
PRICES_CHANGE is a standard prices change 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 prices change FM, simply by entering the name PRICES_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CKM_PRICECHANGES_2
Program Name: SAPLCKM_PRICECHANGES_2
Main Program: SAPLCKM_PRICECHANGES_2
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function PRICES_CHANGE 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 'PRICES_CHANGE'".
EXPORTING
ACTUAL_BDATJ = "
ACTUAL_POPER = "
BUKRS = "
* IGNORE_KALKL = "
* SUBS_DBT = "
* BUDAT = "
* ACCOUNT_MODIFICATION = "
* S_PRICE_PROP_CTRL = "Control Toolbar for the Module Prices_purpose
* XBLNR = "Reference Document Number
TABLES
T_MATPR = "
* T_MATPR_REF = "
EXCEPTIONS
INVALID_PERIOD = 1
IMPORTING Parameters details for PRICES_CHANGE
ACTUAL_BDATJ -
Data type: CKMLPP-BDATJOptional: No
Call by Reference: No ( called with pass by value option)
ACTUAL_POPER -
Data type: CKMLPP-POPEROptional: No
Call by Reference: No ( called with pass by value option)
BUKRS -
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
IGNORE_KALKL -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
SUBS_DBT -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
BUDAT -
Data type: ACCIT-BUDATOptional: Yes
Call by Reference: No ( called with pass by value option)
ACCOUNT_MODIFICATION -
Data type: CKMPR_F_ACCOUNT_DETOptional: Yes
Call by Reference: Yes
S_PRICE_PROP_CTRL - Control Toolbar for the Module Prices_purpose
Data type: PRICE_PROP_CTRLOptional: Yes
Call by Reference: No ( called with pass by value option)
XBLNR - Reference Document Number
Data type: ACCIT-XBLNROptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PRICES_CHANGE
T_MATPR -
Data type: CKMPR_MAT_PRICEOptional: No
Call by Reference: No ( called with pass by value option)
T_MATPR_REF -
Data type: CKMPR_MAT_PRICEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INVALID_PERIOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PRICES_CHANGE 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_matpr | TYPE STANDARD TABLE OF CKMPR_MAT_PRICE, " | |||
lv_actual_bdatj | TYPE CKMLPP-BDATJ, " | |||
lv_invalid_period | TYPE CKMLPP, " | |||
lt_t_matpr_ref | TYPE STANDARD TABLE OF CKMPR_MAT_PRICE, " | |||
lv_actual_poper | TYPE CKMLPP-POPER, " | |||
lv_bukrs | TYPE T001-BUKRS, " | |||
lv_ignore_kalkl | TYPE BOOLE-BOOLE, " | |||
lv_subs_dbt | TYPE BOOLE-BOOLE, " | |||
lv_budat | TYPE ACCIT-BUDAT, " | |||
lv_account_modification | TYPE CKMPR_F_ACCOUNT_DET, " | |||
lv_s_price_prop_ctrl | TYPE PRICE_PROP_CTRL, " | |||
lv_xblnr | TYPE ACCIT-XBLNR. " |
  CALL FUNCTION 'PRICES_CHANGE' " |
EXPORTING | ||
ACTUAL_BDATJ | = lv_actual_bdatj | |
ACTUAL_POPER | = lv_actual_poper | |
BUKRS | = lv_bukrs | |
IGNORE_KALKL | = lv_ignore_kalkl | |
SUBS_DBT | = lv_subs_dbt | |
BUDAT | = lv_budat | |
ACCOUNT_MODIFICATION | = lv_account_modification | |
S_PRICE_PROP_CTRL | = lv_s_price_prop_ctrl | |
XBLNR | = lv_xblnr | |
TABLES | ||
T_MATPR | = lt_t_matpr | |
T_MATPR_REF | = lt_t_matpr_ref | |
EXCEPTIONS | ||
INVALID_PERIOD = 1 | ||
. " PRICES_CHANGE |
ABAP code using 7.40 inline data declarations to call FM PRICES_CHANGE
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 BDATJ FROM CKMLPP INTO @DATA(ld_actual_bdatj). | ||||
"SELECT single POPER FROM CKMLPP INTO @DATA(ld_actual_poper). | ||||
"SELECT single BUKRS FROM T001 INTO @DATA(ld_bukrs). | ||||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_ignore_kalkl). | ||||
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_subs_dbt). | ||||
"SELECT single BUDAT FROM ACCIT INTO @DATA(ld_budat). | ||||
"SELECT single XBLNR FROM ACCIT INTO @DATA(ld_xblnr). | ||||
Search for further information about these or an SAP related objects