SAP BAPI_SECURITYPRICE_GETDETAIL Function Module for Import a single security price
BAPI_SECURITYPRICE_GETDETAIL is a standard bapi securityprice getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Import a single security price 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 bapi securityprice getdetail FM, simply by entering the name BAPI_SECURITYPRICE_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: TBAPIA
Program Name: SAPLTBAPIA
Main Program:
Appliation area:
Release date: 29-Nov-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_SECURITYPRICE_GETDETAIL 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 'BAPI_SECURITYPRICE_GETDETAIL'"Import a single security price.
EXPORTING
TREASURYIDNUMBER = "Treasury ID number
EXCHANGE = "Exchange
RATETYPE = "Rate/Price Type - Treasury Instruments
RATEDATE = "Price date
IMPORTING
RATEVALUE = "Price of Unit- or Percentage-Quoted Security
CURRENCY = "Currency symbol in BAPI-Notation
CURRENCYISO = "ISO currency code
TABLES
* RETURN = "Return parameter
* EXTENSIONOUT = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLTBAPIA_001 User Exit for Extension Parameter
IMPORTING Parameters details for BAPI_SECURITYPRICE_GETDETAIL
TREASURYIDNUMBER - Treasury ID number
Data type: BAPI1099_GETDETAIL-SECURITYIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCHANGE - Exchange
Data type: BAPI1099_GETDETAIL-STOCKEXCHANGEOptional: No
Call by Reference: No ( called with pass by value option)
RATETYPE - Rate/Price Type - Treasury Instruments
Data type: BAPI1099_GETDETAIL-RATETYPEOptional: No
Call by Reference: No ( called with pass by value option)
RATEDATE - Price date
Data type: BAPI1099_GETDETAIL-RATEDATEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_SECURITYPRICE_GETDETAIL
RATEVALUE - Price of Unit- or Percentage-Quoted Security
Data type: BAPI1099_GETDETAIL-RATEVALUEOptional: No
Call by Reference: No ( called with pass by value option)
CURRENCY - Currency symbol in BAPI-Notation
Data type: BAPI1099_GETDETAIL-CURRENCYOptional: No
Call by Reference: No ( called with pass by value option)
CURRENCYISO - ISO currency code
Data type: BAPI1099_GETDETAIL-CURRENCY_ISOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_SECURITYPRICE_GETDETAIL
RETURN - Return parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXTENSIONOUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_SECURITYPRICE_GETDETAIL 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_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_ratevalue | TYPE BAPI1099_GETDETAIL-RATEVALUE, " | |||
| lv_treasuryidnumber | TYPE BAPI1099_GETDETAIL-SECURITYID, " | |||
| lv_currency | TYPE BAPI1099_GETDETAIL-CURRENCY, " | |||
| lv_exchange | TYPE BAPI1099_GETDETAIL-STOCKEXCHANGE, " | |||
| lt_extensionout | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_ratetype | TYPE BAPI1099_GETDETAIL-RATETYPE, " | |||
| lv_currencyiso | TYPE BAPI1099_GETDETAIL-CURRENCY_ISO, " | |||
| lv_ratedate | TYPE BAPI1099_GETDETAIL-RATEDATE. " |
|   CALL FUNCTION 'BAPI_SECURITYPRICE_GETDETAIL' "Import a single security price |
| EXPORTING | ||
| TREASURYIDNUMBER | = lv_treasuryidnumber | |
| EXCHANGE | = lv_exchange | |
| RATETYPE | = lv_ratetype | |
| RATEDATE | = lv_ratedate | |
| IMPORTING | ||
| RATEVALUE | = lv_ratevalue | |
| CURRENCY | = lv_currency | |
| CURRENCYISO | = lv_currencyiso | |
| TABLES | ||
| RETURN | = lt_return | |
| EXTENSIONOUT | = lt_extensionout | |
| . " BAPI_SECURITYPRICE_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_SECURITYPRICE_GETDETAIL
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 RATEVALUE FROM BAPI1099_GETDETAIL INTO @DATA(ld_ratevalue). | ||||
| "SELECT single SECURITYID FROM BAPI1099_GETDETAIL INTO @DATA(ld_treasuryidnumber). | ||||
| "SELECT single CURRENCY FROM BAPI1099_GETDETAIL INTO @DATA(ld_currency). | ||||
| "SELECT single STOCKEXCHANGE FROM BAPI1099_GETDETAIL INTO @DATA(ld_exchange). | ||||
| "SELECT single RATETYPE FROM BAPI1099_GETDETAIL INTO @DATA(ld_ratetype). | ||||
| "SELECT single CURRENCY_ISO FROM BAPI1099_GETDETAIL INTO @DATA(ld_currencyiso). | ||||
| "SELECT single RATEDATE FROM BAPI1099_GETDETAIL INTO @DATA(ld_ratedate). | ||||
Search for further information about these or an SAP related objects