SAP UPDATE_REPL_COST_PRICE Function Module for DE-EN-LANG-SWITCH-NO-TRANSLATION









UPDATE_REPL_COST_PRICE is a standard update repl cost price SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DE-EN-LANG-SWITCH-NO-TRANSLATION 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 update repl cost price FM, simply by entering the name UPDATE_REPL_COST_PRICE into the relevant SAP transaction such as SE37 or SE38.

Function Group: J1AM
Program Name: SAPLJ1AM
Main Program: SAPLJ1AM
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1



Function UPDATE_REPL_COST_PRICE 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 'UPDATE_REPL_COST_PRICE'"DE-EN-LANG-SWITCH-NO-TRANSLATION
EXPORTING
I_MATNR = "Material Number
I_BWKEY = "Valuation area
I_BWTAR = "Valuation type
I_NEW_PRICE = "Replacement Cost - Current
* I_FLAG_VORPERIODE = "Post profit/loss from previous periods

EXCEPTIONS
MATNR_INITIAL = 1 BWKEY_INITIAL = 2 REPL_PRICE_INITIAL = 3 J_1AINFMBW_UPDATE_ERROR = 4
.



IMPORTING Parameters details for UPDATE_REPL_COST_PRICE

I_MATNR - Material Number

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

I_BWKEY - Valuation area

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

I_BWTAR - Valuation type

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

I_NEW_PRICE - Replacement Cost - Current

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

I_FLAG_VORPERIODE - Post profit/loss from previous periods

Data type: T877-VJANTEIL
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

MATNR_INITIAL -

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

BWKEY_INITIAL -

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

REPL_PRICE_INITIAL -

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

J_1AINFMBW_UPDATE_ERROR -

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

Copy and paste ABAP code example for UPDATE_REPL_COST_PRICE 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_matnr  TYPE MBEW-MATNR, "   
lv_matnr_initial  TYPE MBEW, "   
lv_i_bwkey  TYPE MBEW-BWKEY, "   
lv_bwkey_initial  TYPE MBEW, "   
lv_i_bwtar  TYPE MBEW-BWTAR, "   
lv_repl_price_initial  TYPE MBEW, "   
lv_i_new_price  TYPE J_1AINFMBW-J_1ARPLCPC, "   
lv_j_1ainfmbw_update_error  TYPE J_1AINFMBW, "   
lv_i_flag_vorperiode  TYPE T877-VJANTEIL. "   

  CALL FUNCTION 'UPDATE_REPL_COST_PRICE'  "DE-EN-LANG-SWITCH-NO-TRANSLATION
    EXPORTING
         I_MATNR = lv_i_matnr
         I_BWKEY = lv_i_bwkey
         I_BWTAR = lv_i_bwtar
         I_NEW_PRICE = lv_i_new_price
         I_FLAG_VORPERIODE = lv_i_flag_vorperiode
    EXCEPTIONS
        MATNR_INITIAL = 1
        BWKEY_INITIAL = 2
        REPL_PRICE_INITIAL = 3
        J_1AINFMBW_UPDATE_ERROR = 4
. " UPDATE_REPL_COST_PRICE




ABAP code using 7.40 inline data declarations to call FM UPDATE_REPL_COST_PRICE

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 MATNR FROM MBEW INTO @DATA(ld_i_matnr).
 
 
"SELECT single BWKEY FROM MBEW INTO @DATA(ld_i_bwkey).
 
 
"SELECT single BWTAR FROM MBEW INTO @DATA(ld_i_bwtar).
 
 
"SELECT single J_1ARPLCPC FROM J_1AINFMBW INTO @DATA(ld_i_new_price).
 
 
"SELECT single VJANTEIL FROM T877 INTO @DATA(ld_i_flag_vorperiode).
 


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!