SAP TPM_SIMULATE_VALUATION Function Module for Simulate Valuation









TPM_SIMULATE_VALUATION is a standard tpm simulate valuation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Simulate Valuation 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 tpm simulate valuation FM, simply by entering the name TPM_SIMULATE_VALUATION into the relevant SAP transaction such as SE37 or SE38.

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



Function TPM_SIMULATE_VALUATION 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 'TPM_SIMULATE_VALUATION'"Simulate Valuation
EXPORTING
IM_COMPANY_CODE = "Company Code
IM_POSITION = "Treasury: Assessable Position
IM_KEY_DATE = "Key Date

IMPORTING
EX_TAB_MSG = "Application Log: Table with Messages
EX_BOOK_VAL_PC = "neuer Buchwert in Bestandswährung
EX_POSITION_CURR = "Position Currency
EX_BOOK_VAL_VC = "neuer Buchwert in Bewertungswährung
EX_VALUATION_CURR = "Valuation Currency
EX_BOOK_VAL_LC = "neuer Buchwert in Hauswährung
EX_LOCAL_CURR = "Local Currency
EX_TAB_VAL_FLOWS = "Bewegungstabelle, Bewertungsformat
EX_TAB_POSTING_ITEMS = "Table of Posting Items

EXCEPTIONS
FAILED = 1
.



IMPORTING Parameters details for TPM_SIMULATE_VALUATION

IM_COMPANY_CODE - Company Code

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

IM_POSITION - Treasury: Assessable Position

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

IM_KEY_DATE - Key Date

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

EXPORTING Parameters details for TPM_SIMULATE_VALUATION

EX_TAB_MSG - Application Log: Table with Messages

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

EX_BOOK_VAL_PC - neuer Buchwert in Bestandswährung

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

EX_POSITION_CURR - Position Currency

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

EX_BOOK_VAL_VC - neuer Buchwert in Bewertungswährung

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

EX_VALUATION_CURR - Valuation Currency

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

EX_BOOK_VAL_LC - neuer Buchwert in Hauswährung

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

EX_LOCAL_CURR - Local Currency

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

EX_TAB_VAL_FLOWS - Bewegungstabelle, Bewertungsformat

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

EX_TAB_POSTING_ITEMS - Table of Posting Items

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

EXCEPTIONS details

FAILED - Error Occurred

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TPM_SIMULATE_VALUATION 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_failed  TYPE STRING, "   
lv_ex_tab_msg  TYPE BAL_T_MSG, "   
lv_im_company_code  TYPE BUKRS, "   
lv_im_position  TYPE CL_POSITION_TRL, "   
lv_ex_book_val_pc  TYPE TPM_POSITION_AMT, "   
lv_im_key_date  TYPE TPM_POSITION_DATE, "   
lv_ex_position_curr  TYPE TPM_POSITION_CURR, "   
lv_ex_book_val_vc  TYPE TPM_POSITION_AMT, "   
lv_ex_valuation_curr  TYPE TPM_VALUATION_CURR, "   
lv_ex_book_val_lc  TYPE TPM_POSITION_AMT, "   
lv_ex_local_curr  TYPE TPM_LOCAL_CURR, "   
lv_ex_tab_val_flows  TYPE VALY_VALUATION_FLOW, "   
lv_ex_tab_posting_items  TYPE TRRY_POSTING_ITEM. "   

  CALL FUNCTION 'TPM_SIMULATE_VALUATION'  "Simulate Valuation
    EXPORTING
         IM_COMPANY_CODE = lv_im_company_code
         IM_POSITION = lv_im_position
         IM_KEY_DATE = lv_im_key_date
    IMPORTING
         EX_TAB_MSG = lv_ex_tab_msg
         EX_BOOK_VAL_PC = lv_ex_book_val_pc
         EX_POSITION_CURR = lv_ex_position_curr
         EX_BOOK_VAL_VC = lv_ex_book_val_vc
         EX_VALUATION_CURR = lv_ex_valuation_curr
         EX_BOOK_VAL_LC = lv_ex_book_val_lc
         EX_LOCAL_CURR = lv_ex_local_curr
         EX_TAB_VAL_FLOWS = lv_ex_tab_val_flows
         EX_TAB_POSTING_ITEMS = lv_ex_tab_posting_items
    EXCEPTIONS
        FAILED = 1
. " TPM_SIMULATE_VALUATION




ABAP code using 7.40 inline data declarations to call FM TPM_SIMULATE_VALUATION

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.

 
 
 
 
 
 
 
 
 
 
 
 
 


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!