SAP FTR_GET_SEC_COLLATERAL Function Module for Calculation: Loaned Position, Collateral, Revenues









FTR_GET_SEC_COLLATERAL is a standard ftr get sec collateral SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Calculation: Loaned Position, Collateral, Revenues 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 ftr get sec collateral FM, simply by entering the name FTR_GET_SEC_COLLATERAL into the relevant SAP transaction such as SE37 or SE38.

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



Function FTR_GET_SEC_COLLATERAL 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 'FTR_GET_SEC_COLLATERAL'"Calculation: Loaned Position, Collateral, Revenues
EXPORTING
PI_WAERS = "Currency Key
PI_NUMBR = "Translation Type for Currency Translation into Displ. Crcy
PI_DSTICH = "Key Date
* PI_RHAPL = "Exchange
* PI_KSART = "Security Price Type
PI_SOSL = "Selection data
* PI_SOSECUR = "Collateral data
* PI_SOCONTR = "Control data

IMPORTING
PE_SL_OUTPUT = "Results of SL Reporting
PE_FHAPO = "Treasury: Table Type for VTBFHAPO
PE_FSEC = "Collateral from SL Reporting
PE_SL_MESSAGE = "Message table message collector

EXCEPTIONS
INVALID_SELECTION = 1
.



IMPORTING Parameters details for FTR_GET_SEC_COLLATERAL

PI_WAERS - Currency Key

Data type: WAERS
Optional: No
Call by Reference: Yes

PI_NUMBR - Translation Type for Currency Translation into Displ. Crcy

Data type: FTI_NUMBR
Optional: No
Call by Reference: Yes

PI_DSTICH - Key Date

Data type: VTBSODOKU-DSTICH
Optional: No
Call by Reference: Yes

PI_RHAPL - Exchange

Data type: TWH01-RHANDPL
Optional: Yes
Call by Reference: Yes

PI_KSART - Security Price Type

Data type: TW56-SKURSART
Optional: Yes
Call by Reference: Yes

PI_SOSL - Selection data

Data type: FTRW_SL_REP
Optional: No
Call by Reference: Yes

PI_SOSECUR - Collateral data

Data type: FTRW_SECUR_REP
Optional: Yes
Call by Reference: Yes

PI_SOCONTR - Control data

Data type: FTRW_CONTR_REP
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for FTR_GET_SEC_COLLATERAL

PE_SL_OUTPUT - Results of SL Reporting

Data type: VTG_REP_TAB_LEND_SEC_YIELD
Optional: No
Call by Reference: Yes

PE_FHAPO - Treasury: Table Type for VTBFHAPO

Data type: FTR_FHAPO
Optional: No
Call by Reference: Yes

PE_FSEC - Collateral from SL Reporting

Data type: VTG_REP_TAB_VTBFSEC
Optional: No
Call by Reference: Yes

PE_SL_MESSAGE - Message table message collector

Data type: TSMESG
Optional: No
Call by Reference: Yes

EXCEPTIONS details

INVALID_SELECTION - invalid_selection

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

Copy and paste ABAP code example for FTR_GET_SEC_COLLATERAL 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_pi_waers  TYPE WAERS, "   
lv_pe_sl_output  TYPE VTG_REP_TAB_LEND_SEC_YIELD, "   
lv_invalid_selection  TYPE VTG_REP_TAB_LEND_SEC_YIELD, "   
lv_pe_fhapo  TYPE FTR_FHAPO, "   
lv_pi_numbr  TYPE FTI_NUMBR, "   
lv_pe_fsec  TYPE VTG_REP_TAB_VTBFSEC, "   
lv_pi_dstich  TYPE VTBSODOKU-DSTICH, "   
lv_pi_rhapl  TYPE TWH01-RHANDPL, "   
lv_pe_sl_message  TYPE TSMESG, "   
lv_pi_ksart  TYPE TW56-SKURSART, "   
lv_pi_sosl  TYPE FTRW_SL_REP, "   
lv_pi_sosecur  TYPE FTRW_SECUR_REP, "   
lv_pi_socontr  TYPE FTRW_CONTR_REP. "   

  CALL FUNCTION 'FTR_GET_SEC_COLLATERAL'  "Calculation: Loaned Position, Collateral, Revenues
    EXPORTING
         PI_WAERS = lv_pi_waers
         PI_NUMBR = lv_pi_numbr
         PI_DSTICH = lv_pi_dstich
         PI_RHAPL = lv_pi_rhapl
         PI_KSART = lv_pi_ksart
         PI_SOSL = lv_pi_sosl
         PI_SOSECUR = lv_pi_sosecur
         PI_SOCONTR = lv_pi_socontr
    IMPORTING
         PE_SL_OUTPUT = lv_pe_sl_output
         PE_FHAPO = lv_pe_fhapo
         PE_FSEC = lv_pe_fsec
         PE_SL_MESSAGE = lv_pe_sl_message
    EXCEPTIONS
        INVALID_SELECTION = 1
. " FTR_GET_SEC_COLLATERAL




ABAP code using 7.40 inline data declarations to call FM FTR_GET_SEC_COLLATERAL

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 DSTICH FROM VTBSODOKU INTO @DATA(ld_pi_dstich).
 
"SELECT single RHANDPL FROM TWH01 INTO @DATA(ld_pi_rhapl).
 
 
"SELECT single SKURSART FROM TW56 INTO @DATA(ld_pi_ksart).
 
 
 
 


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!