SAP SECURITY_PRICES_SELECT_DCS Function Module for Selection of Security Prices (DCS based)
SECURITY_PRICES_SELECT_DCS is a standard security prices select dcs SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Selection of Security Prices (DCS based) 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 security prices select dcs FM, simply by entering the name SECURITY_PRICES_SELECT_DCS into the relevant SAP transaction such as SE37 or SE38.
Function Group: FVW1
Program Name: SAPLFVW1
Main Program: SAPLFVW1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SECURITY_PRICES_SELECT_DCS 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 'SECURITY_PRICES_SELECT_DCS'"Selection of Security Prices (DCS based).
EXPORTING
SECURITY_ID = "Security ID number
* PRICE_DATE_FROM = "Rate/Price Date
* PRICE_DATE_RANGE = "3-Byte field
* RESET_BUFFER = ' ' "
* STOCK_EXCHANGE = "Exchange
* PRICE_TYPE = "Rate/Price Type - Treasury Instruments
PRICE_DATE = "Rate/Price Date
* CURRENCY = "Quotation currency (which prices are in)
* CONTRACT_TYPE = '2' "Contract Type
* SEARCH_STRATEGY = '01' "Strategy to read Security Prices from ATRAS
* MAX_AGE_IN_DAYS = "Numc3, internal use
* CALENDAR_ID = "Factory Calendar
IMPORTING
ET_SECURITY_PRICE = "Security prices
ET_ATRAS = "WP courses
EXCEPTIONS
NO_PRICES_MAINTAINED = 1 PRICE_TYPE_REQUIRED = 2 MAX_AGE_REQUIRED = 3 PRICE_DATE_FROM_REQUIRED = 4 PRICE_DATE_RANGE_REQUIRED = 5
IMPORTING Parameters details for SECURITY_PRICES_SELECT_DCS
SECURITY_ID - Security ID number
Data type: WP_RANLOptional: No
Call by Reference: Yes
PRICE_DATE_FROM - Rate/Price Date
Data type: ATRAS-DKURSOptional: Yes
Call by Reference: Yes
PRICE_DATE_RANGE - 3-Byte field
Data type: NUMC3Optional: Yes
Call by Reference: Yes
RESET_BUFFER -
Data type: ABAP_BOOLDefault: SPACE
Optional: No
Call by Reference: Yes
STOCK_EXCHANGE - Exchange
Data type: VVRHANDPLOptional: Yes
Call by Reference: Yes
PRICE_TYPE - Rate/Price Type - Treasury Instruments
Data type: TI_KURSARTOptional: Yes
Call by Reference: Yes
PRICE_DATE - Rate/Price Date
Data type: ATRAS-DKURSOptional: No
Call by Reference: Yes
CURRENCY - Quotation currency (which prices are in)
Data type: VVNOTWAERSOptional: Yes
Call by Reference: Yes
CONTRACT_TYPE - Contract Type
Data type: RANTYPDefault: '2'
Optional: No
Call by Reference: Yes
SEARCH_STRATEGY - Strategy to read Security Prices from ATRAS
Data type: TPM_SEC_PRICE_READDefault: '01'
Optional: No
Call by Reference: Yes
MAX_AGE_IN_DAYS - Numc3, internal use
Data type: NUMC3Optional: Yes
Call by Reference: Yes
CALENDAR_ID - Factory Calendar
Data type: WFCIDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for SECURITY_PRICES_SELECT_DCS
ET_SECURITY_PRICE - Security prices
Data type: SECURITY_PRICESOptional: No
Call by Reference: Yes
ET_ATRAS - WP courses
Data type: IT_ATRASOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_PRICES_MAINTAINED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRICE_TYPE_REQUIRED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MAX_AGE_REQUIRED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRICE_DATE_FROM_REQUIRED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PRICE_DATE_RANGE_REQUIRED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SECURITY_PRICES_SELECT_DCS 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_security_id | TYPE WP_RANL, " | |||
| lv_et_security_price | TYPE SECURITY_PRICES, " | |||
| lv_no_prices_maintained | TYPE SECURITY_PRICES, " | |||
| lv_price_date_from | TYPE ATRAS-DKURS, " | |||
| lv_price_date_range | TYPE NUMC3, " | |||
| lv_reset_buffer | TYPE ABAP_BOOL, " SPACE | |||
| lv_et_atras | TYPE IT_ATRAS, " | |||
| lv_stock_exchange | TYPE VVRHANDPL, " | |||
| lv_price_type_required | TYPE VVRHANDPL, " | |||
| lv_price_type | TYPE TI_KURSART, " | |||
| lv_max_age_required | TYPE TI_KURSART, " | |||
| lv_price_date | TYPE ATRAS-DKURS, " | |||
| lv_price_date_from_required | TYPE ATRAS, " | |||
| lv_currency | TYPE VVNOTWAERS, " | |||
| lv_price_date_range_required | TYPE VVNOTWAERS, " | |||
| lv_contract_type | TYPE RANTYP, " '2' | |||
| lv_search_strategy | TYPE TPM_SEC_PRICE_READ, " '01' | |||
| lv_max_age_in_days | TYPE NUMC3, " | |||
| lv_calendar_id | TYPE WFCID. " |
|   CALL FUNCTION 'SECURITY_PRICES_SELECT_DCS' "Selection of Security Prices (DCS based) |
| EXPORTING | ||
| SECURITY_ID | = lv_security_id | |
| PRICE_DATE_FROM | = lv_price_date_from | |
| PRICE_DATE_RANGE | = lv_price_date_range | |
| RESET_BUFFER | = lv_reset_buffer | |
| STOCK_EXCHANGE | = lv_stock_exchange | |
| PRICE_TYPE | = lv_price_type | |
| PRICE_DATE | = lv_price_date | |
| CURRENCY | = lv_currency | |
| CONTRACT_TYPE | = lv_contract_type | |
| SEARCH_STRATEGY | = lv_search_strategy | |
| MAX_AGE_IN_DAYS | = lv_max_age_in_days | |
| CALENDAR_ID | = lv_calendar_id | |
| IMPORTING | ||
| ET_SECURITY_PRICE | = lv_et_security_price | |
| ET_ATRAS | = lv_et_atras | |
| EXCEPTIONS | ||
| NO_PRICES_MAINTAINED = 1 | ||
| PRICE_TYPE_REQUIRED = 2 | ||
| MAX_AGE_REQUIRED = 3 | ||
| PRICE_DATE_FROM_REQUIRED = 4 | ||
| PRICE_DATE_RANGE_REQUIRED = 5 | ||
| . " SECURITY_PRICES_SELECT_DCS | ||
ABAP code using 7.40 inline data declarations to call FM SECURITY_PRICES_SELECT_DCS
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 DKURS FROM ATRAS INTO @DATA(ld_price_date_from). | ||||
| DATA(ld_reset_buffer) | = ' '. | |||
| "SELECT single DKURS FROM ATRAS INTO @DATA(ld_price_date). | ||||
| DATA(ld_contract_type) | = '2'. | |||
| DATA(ld_search_strategy) | = '01'. | |||
Search for further information about these or an SAP related objects