SAP Function Modules

PRICES_CHANGE SAP Function module







PRICES_CHANGE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name PRICES_CHANGE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CKM_PRICECHANGES_2
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PRICES_CHANGE - PRICES CHANGE





CALL FUNCTION 'PRICES_CHANGE' "
  EXPORTING
    actual_bdatj =              " ckmlpp-bdatj
    actual_poper =              " ckmlpp-poper
    bukrs =                     " t001-bukrs
*   ignore_kalkl =              " boole-boole
*   subs_dbt =                  " boole-boole
*   budat =                     " accit-budat
*   account_modification =      " ckmpr_f_account_det
*   s_price_prop_ctrl =         " price_prop_ctrl  Control Toolbar for the Module Prices_purpose
*   xblnr =                     " accit-xblnr   Reference Document Number
  TABLES
    t_matpr =                   " ckmpr_mat_price
*   t_matpr_ref =               " ckmpr_mat_price
  EXCEPTIONS
    INVALID_PERIOD = 1          "
    .  "  PRICES_CHANGE

ABAP code example for Function Module PRICES_CHANGE





The ABAP code below is a full code listing to execute function module PRICES_CHANGE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_t_matpr  TYPE STANDARD TABLE OF CKMPR_MAT_PRICE,"TABLES PARAM
wa_t_matpr  LIKE LINE OF it_t_matpr ,
it_t_matpr_ref  TYPE STANDARD TABLE OF CKMPR_MAT_PRICE,"TABLES PARAM
wa_t_matpr_ref  LIKE LINE OF it_t_matpr_ref .


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).


DATA(ld_ignore_kalkl) = some text here

DATA(ld_subs_dbt) = some text here

DATA(ld_budat) = 20210129
DATA(ld_account_modification) = 'Check type of data required'.
DATA(ld_s_price_prop_ctrl) = 'Check type of data required'.

DATA(ld_xblnr) = some text here

"populate fields of struture and append to itab
append wa_t_matpr to it_t_matpr.

"populate fields of struture and append to itab
append wa_t_matpr_ref to it_t_matpr_ref. . CALL FUNCTION 'PRICES_CHANGE' EXPORTING actual_bdatj = ld_actual_bdatj actual_poper = ld_actual_poper bukrs = ld_bukrs * ignore_kalkl = ld_ignore_kalkl * subs_dbt = ld_subs_dbt * budat = ld_budat * account_modification = ld_account_modification * s_price_prop_ctrl = ld_s_price_prop_ctrl * xblnr = ld_xblnr TABLES t_matpr = it_t_matpr * t_matpr_ref = it_t_matpr_ref EXCEPTIONS INVALID_PERIOD = 1 . " PRICES_CHANGE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_actual_bdatj  TYPE CKMLPP-BDATJ ,
it_t_matpr  TYPE STANDARD TABLE OF CKMPR_MAT_PRICE ,
wa_t_matpr  LIKE LINE OF it_t_matpr,
ld_actual_poper  TYPE CKMLPP-POPER ,
it_t_matpr_ref  TYPE STANDARD TABLE OF CKMPR_MAT_PRICE ,
wa_t_matpr_ref  LIKE LINE OF it_t_matpr_ref,
ld_bukrs  TYPE T001-BUKRS ,
ld_ignore_kalkl  TYPE BOOLE-BOOLE ,
ld_subs_dbt  TYPE BOOLE-BOOLE ,
ld_budat  TYPE ACCIT-BUDAT ,
ld_account_modification  TYPE CKMPR_F_ACCOUNT_DET ,
ld_s_price_prop_ctrl  TYPE PRICE_PROP_CTRL ,
ld_xblnr  TYPE ACCIT-XBLNR .


SELECT single BDATJ
FROM CKMLPP
INTO ld_actual_bdatj.


"populate fields of struture and append to itab
append wa_t_matpr to it_t_matpr.

SELECT single POPER
FROM CKMLPP
INTO ld_actual_poper.


"populate fields of struture and append to itab
append wa_t_matpr_ref to it_t_matpr_ref.

SELECT single BUKRS
FROM T001
INTO ld_bukrs.


ld_ignore_kalkl = some text here

ld_subs_dbt = some text here

ld_budat = 20210129
ld_account_modification = 'Check type of data required'.
ld_s_price_prop_ctrl = 'Check type of data required'.

ld_xblnr = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name PRICES_CHANGE or its description.