SAP TB_EVALUATION_OPTION_SHORT Function Module for Treasury: Valuation of Put Options









TB_EVALUATION_OPTION_SHORT is a standard tb evaluation option short SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Treasury: Valuation of Put Options 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 tb evaluation option short FM, simply by entering the name TB_EVALUATION_OPTION_SHORT into the relevant SAP transaction such as SE37 or SE38.

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



Function TB_EVALUATION_OPTION_SHORT 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 'TB_EVALUATION_OPTION_SHORT'"Treasury: Valuation of Put Options
EXPORTING
DEAL = "
STICHTAG = "
* BARWERTART = "
* POPUP_DERIVAT = 'X' "
* SAME_AS_OPTLONG = "

IMPORTING
ANSCHAFFUNGSWERT_HW = "Payment Amount in LC
ANSCHAFFUNGSWERT_FW = "Payment Amnt in Pmnt Crcy
STICHTAGSWERT_HW = "Payment Amount in LC
STICHTAGSWERT_FW = "Payment Amnt in Pmnt Crcy
BUCHWERT_HW = "Payment Amount in LC
BUCHWERT_FW = "Payment Amnt in Pmnt Crcy
FREMDWAEHRUNG = "Currency Key
HAUSWAEHRUNG = "Currency Key

TABLES
BESTEHENDE_BEWEGUNGEN = "
ERZEUGTE_BEWEGUNGEN = "

EXCEPTIONS
WRONG_KEY_DATE = 1 ERROR_DEAL = 2 NO_NPV = 3
.



IMPORTING Parameters details for TB_EVALUATION_OPTION_SHORT

DEAL -

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

STICHTAG -

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

BARWERTART -

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

POPUP_DERIVAT -

Data type: C
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SAME_AS_OPTLONG -

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

EXPORTING Parameters details for TB_EVALUATION_OPTION_SHORT

ANSCHAFFUNGSWERT_HW - Payment Amount in LC

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

ANSCHAFFUNGSWERT_FW - Payment Amnt in Pmnt Crcy

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

STICHTAGSWERT_HW - Payment Amount in LC

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

STICHTAGSWERT_FW - Payment Amnt in Pmnt Crcy

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

BUCHWERT_HW - Payment Amount in LC

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

BUCHWERT_FW - Payment Amnt in Pmnt Crcy

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

FREMDWAEHRUNG - Currency Key

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

HAUSWAEHRUNG - Currency Key

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

TABLES Parameters details for TB_EVALUATION_OPTION_SHORT

BESTEHENDE_BEWEGUNGEN -

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

ERZEUGTE_BEWEGUNGEN -

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

EXCEPTIONS details

WRONG_KEY_DATE -

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

ERROR_DEAL -

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

NO_NPV -

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

Copy and paste ABAP code example for TB_EVALUATION_OPTION_SHORT 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_deal  TYPE VTBFHA, "   
lv_wrong_key_date  TYPE VTBFHA, "   
lv_anschaffungswert_hw  TYPE VTBFHAPO-BHWBETR, "   
lt_bestehende_bewegungen  TYPE STANDARD TABLE OF VTBFHAPO, "   
lv_stichtag  TYPE SY-DATUM, "   
lv_error_deal  TYPE SY, "   
lv_anschaffungswert_fw  TYPE VTBFHAPO-BZBETR, "   
lt_erzeugte_bewegungen  TYPE STANDARD TABLE OF VTBFHAPO, "   
lv_no_npv  TYPE VTBFHAPO, "   
lv_barwertart  TYPE VTVBAR-OKUART, "   
lv_stichtagswert_hw  TYPE VTBFHAPO-BHWBETR, "   
lv_popup_derivat  TYPE C, "   'X'
lv_stichtagswert_fw  TYPE VTBFHAPO-BZBETR, "   
lv_buchwert_hw  TYPE VTBFHAPO-BHWBETR, "   
lv_same_as_optlong  TYPE C, "   
lv_buchwert_fw  TYPE VTBFHAPO-BZBETR, "   
lv_fremdwaehrung  TYPE TCURC-WAERS, "   
lv_hauswaehrung  TYPE TCURC-WAERS. "   

  CALL FUNCTION 'TB_EVALUATION_OPTION_SHORT'  "Treasury: Valuation of Put Options
    EXPORTING
         DEAL = lv_deal
         STICHTAG = lv_stichtag
         BARWERTART = lv_barwertart
         POPUP_DERIVAT = lv_popup_derivat
         SAME_AS_OPTLONG = lv_same_as_optlong
    IMPORTING
         ANSCHAFFUNGSWERT_HW = lv_anschaffungswert_hw
         ANSCHAFFUNGSWERT_FW = lv_anschaffungswert_fw
         STICHTAGSWERT_HW = lv_stichtagswert_hw
         STICHTAGSWERT_FW = lv_stichtagswert_fw
         BUCHWERT_HW = lv_buchwert_hw
         BUCHWERT_FW = lv_buchwert_fw
         FREMDWAEHRUNG = lv_fremdwaehrung
         HAUSWAEHRUNG = lv_hauswaehrung
    TABLES
         BESTEHENDE_BEWEGUNGEN = lt_bestehende_bewegungen
         ERZEUGTE_BEWEGUNGEN = lt_erzeugte_bewegungen
    EXCEPTIONS
        WRONG_KEY_DATE = 1
        ERROR_DEAL = 2
        NO_NPV = 3
. " TB_EVALUATION_OPTION_SHORT




ABAP code using 7.40 inline data declarations to call FM TB_EVALUATION_OPTION_SHORT

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 BHWBETR FROM VTBFHAPO INTO @DATA(ld_anschaffungswert_hw).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_stichtag).
 
 
"SELECT single BZBETR FROM VTBFHAPO INTO @DATA(ld_anschaffungswert_fw).
 
 
 
"SELECT single OKUART FROM VTVBAR INTO @DATA(ld_barwertart).
 
"SELECT single BHWBETR FROM VTBFHAPO INTO @DATA(ld_stichtagswert_hw).
 
DATA(ld_popup_derivat) = 'X'.
 
"SELECT single BZBETR FROM VTBFHAPO INTO @DATA(ld_stichtagswert_fw).
 
"SELECT single BHWBETR FROM VTBFHAPO INTO @DATA(ld_buchwert_hw).
 
 
"SELECT single BZBETR FROM VTBFHAPO INTO @DATA(ld_buchwert_fw).
 
"SELECT single WAERS FROM TCURC INTO @DATA(ld_fremdwaehrung).
 
"SELECT single WAERS FROM TCURC INTO @DATA(ld_hauswaehrung).
 


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!