SAP STOCK_SALES_PRICE_REVALUATION Function Module for NOTRANSL: Umbewertung des Bestandswertes zu Verkaufspreisen
STOCK_SALES_PRICE_REVALUATION is a standard stock sales price revaluation 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: Umbewertung des Bestandswertes zu Verkaufspreisen 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 stock sales price revaluation FM, simply by entering the name STOCK_SALES_PRICE_REVALUATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: WBW1
Program Name: SAPLWBW1
Main Program: SAPLWBW1
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function STOCK_SALES_PRICE_REVALUATION 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 'STOCK_SALES_PRICE_REVALUATION'"NOTRANSL: Umbewertung des Bestandswertes zu Verkaufspreisen.
EXPORTING
PI_VKPU_VORGA = "
* I_COST_VAL_MOD = "Purchase Value Changed by
IMPORTING
PE_VKU_BELEG = "
PE_VKU_JAHR = "
PE_MAT_BELEG = "
PE_EP_BELEG = "
PE_EP_KJAHR = "
PE_PP_CHANGE_ERROR = "
PE_USEG_POS = "
TABLES
* PIT_VKUMB = "
* PET_ERR_VKUMB = "Table with Error Messages
* PI_T_PVAEN = "
* PX_T_VKAEN = "
* PE_T_UKPF = "
* PE_T_USEG = "
* PE_T_VKUBL = "
* PI_T_XUSEG = "
EXCEPTIONS
NO_REVALUATION_NECESSARY = 1 ERRORS_OCCURRED = 2 OPTION_NOT_YET_IMPLEMENTED = 3
IMPORTING Parameters details for STOCK_SALES_PRICE_REVALUATION
PI_VKPU_VORGA -
Data type: RVKPU-VKPU_VORGAOptional: No
Call by Reference: No ( called with pass by value option)
I_COST_VAL_MOD - Purchase Value Changed by
Data type: MODIFIER_COST_VALOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for STOCK_SALES_PRICE_REVALUATION
PE_VKU_BELEG -
Data type: USEG-UBLNROptional: No
Call by Reference: No ( called with pass by value option)
PE_VKU_JAHR -
Data type: USEG-UBJAHROptional: No
Call by Reference: No ( called with pass by value option)
PE_MAT_BELEG -
Data type: MSEG-MBLNROptional: No
Call by Reference: No ( called with pass by value option)
PE_EP_BELEG -
Data type: MLCRP-BELNROptional: No
Call by Reference: No ( called with pass by value option)
PE_EP_KJAHR -
Data type: MLCRP-KJAHROptional: No
Call by Reference: No ( called with pass by value option)
PE_PP_CHANGE_ERROR -
Data type: SY-MARKYOptional: No
Call by Reference: No ( called with pass by value option)
PE_USEG_POS -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for STOCK_SALES_PRICE_REVALUATION
PIT_VKUMB -
Data type: VKUMBOptional: Yes
Call by Reference: No ( called with pass by value option)
PET_ERR_VKUMB - Table with Error Messages
Data type: VERROOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_PVAEN -
Data type: PVAENOptional: Yes
Call by Reference: No ( called with pass by value option)
PX_T_VKAEN -
Data type: VKAENOptional: Yes
Call by Reference: No ( called with pass by value option)
PE_T_UKPF -
Data type: SUKPFOptional: Yes
Call by Reference: No ( called with pass by value option)
PE_T_USEG -
Data type: SUSEGOptional: Yes
Call by Reference: No ( called with pass by value option)
PE_T_VKUBL -
Data type: VKUBLOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_T_XUSEG -
Data type: USEGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_REVALUATION_NECESSARY -
Data type:Optional: No
Call by Reference: Yes
ERRORS_OCCURRED -
Data type:Optional: No
Call by Reference: Yes
OPTION_NOT_YET_IMPLEMENTED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for STOCK_SALES_PRICE_REVALUATION 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_pit_vkumb | TYPE STANDARD TABLE OF VKUMB, " | |||
lv_pe_vku_beleg | TYPE USEG-UBLNR, " | |||
lv_pi_vkpu_vorga | TYPE RVKPU-VKPU_VORGA, " | |||
lv_no_revaluation_necessary | TYPE RVKPU, " | |||
lv_pe_vku_jahr | TYPE USEG-UBJAHR, " | |||
lt_pet_err_vkumb | TYPE STANDARD TABLE OF VERRO, " | |||
lv_i_cost_val_mod | TYPE MODIFIER_COST_VAL, " | |||
lv_errors_occurred | TYPE MODIFIER_COST_VAL, " | |||
lt_pi_t_pvaen | TYPE STANDARD TABLE OF PVAEN, " | |||
lv_pe_mat_beleg | TYPE MSEG-MBLNR, " | |||
lv_option_not_yet_implemented | TYPE MSEG, " | |||
lt_px_t_vkaen | TYPE STANDARD TABLE OF VKAEN, " | |||
lv_pe_ep_beleg | TYPE MLCRP-BELNR, " | |||
lt_pe_t_ukpf | TYPE STANDARD TABLE OF SUKPF, " | |||
lv_pe_ep_kjahr | TYPE MLCRP-KJAHR, " | |||
lt_pe_t_useg | TYPE STANDARD TABLE OF SUSEG, " | |||
lv_pe_pp_change_error | TYPE SY-MARKY, " | |||
lt_pe_t_vkubl | TYPE STANDARD TABLE OF VKUBL, " | |||
lv_pe_useg_pos | TYPE I, " | |||
lt_pi_t_xuseg | TYPE STANDARD TABLE OF USEG. " |
  CALL FUNCTION 'STOCK_SALES_PRICE_REVALUATION' "NOTRANSL: Umbewertung des Bestandswertes zu Verkaufspreisen |
EXPORTING | ||
PI_VKPU_VORGA | = lv_pi_vkpu_vorga | |
I_COST_VAL_MOD | = lv_i_cost_val_mod | |
IMPORTING | ||
PE_VKU_BELEG | = lv_pe_vku_beleg | |
PE_VKU_JAHR | = lv_pe_vku_jahr | |
PE_MAT_BELEG | = lv_pe_mat_beleg | |
PE_EP_BELEG | = lv_pe_ep_beleg | |
PE_EP_KJAHR | = lv_pe_ep_kjahr | |
PE_PP_CHANGE_ERROR | = lv_pe_pp_change_error | |
PE_USEG_POS | = lv_pe_useg_pos | |
TABLES | ||
PIT_VKUMB | = lt_pit_vkumb | |
PET_ERR_VKUMB | = lt_pet_err_vkumb | |
PI_T_PVAEN | = lt_pi_t_pvaen | |
PX_T_VKAEN | = lt_px_t_vkaen | |
PE_T_UKPF | = lt_pe_t_ukpf | |
PE_T_USEG | = lt_pe_t_useg | |
PE_T_VKUBL | = lt_pe_t_vkubl | |
PI_T_XUSEG | = lt_pi_t_xuseg | |
EXCEPTIONS | ||
NO_REVALUATION_NECESSARY = 1 | ||
ERRORS_OCCURRED = 2 | ||
OPTION_NOT_YET_IMPLEMENTED = 3 | ||
. " STOCK_SALES_PRICE_REVALUATION |
ABAP code using 7.40 inline data declarations to call FM STOCK_SALES_PRICE_REVALUATION
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 UBLNR FROM USEG INTO @DATA(ld_pe_vku_beleg). | ||||
"SELECT single VKPU_VORGA FROM RVKPU INTO @DATA(ld_pi_vkpu_vorga). | ||||
"SELECT single UBJAHR FROM USEG INTO @DATA(ld_pe_vku_jahr). | ||||
"SELECT single MBLNR FROM MSEG INTO @DATA(ld_pe_mat_beleg). | ||||
"SELECT single BELNR FROM MLCRP INTO @DATA(ld_pe_ep_beleg). | ||||
"SELECT single KJAHR FROM MLCRP INTO @DATA(ld_pe_ep_kjahr). | ||||
"SELECT single MARKY FROM SY INTO @DATA(ld_pe_pp_change_error). | ||||
Search for further information about these or an SAP related objects