SAP UNDERLING_READ_TO_OPTION Function Module for Read Underlying Data for an Option
UNDERLING_READ_TO_OPTION is a standard underling read to option SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Underlying Data for an Option 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 underling read to option FM, simply by entering the name UNDERLING_READ_TO_OPTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: TBOS
Program Name: SAPLTBOS
Main Program: SAPLTBOS
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function UNDERLING_READ_TO_OPTION 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 'UNDERLING_READ_TO_OPTION'"Read Underlying Data for an Option.
EXPORTING
I_OPTNR = "
TABLES
* AOPFU_FHA = "
* T_VTIOFZU = "Zuordnung Option/Future zu Underlyings
* AOPFU_FHAPO = "
* AOPFU_FHAZU = "
* AOPFU_FINKO = "
* NOPFU_FHA = "
* NOPFU_FHAPO = "
* NOPFU_FHAZU = "
* NOPFU_FINKO = "
* T_VTIOF = "Additional Option Data
EXCEPTIONS
NO_BEWEG_FOR_UL_DEAL = 1 NO_UL_DEAL = 2 NO_VORG_FOR_UL_DEAL = 3
IMPORTING Parameters details for UNDERLING_READ_TO_OPTION
I_OPTNR -
Data type: VTI_HEADER-OFGATTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for UNDERLING_READ_TO_OPTION
AOPFU_FHA -
Data type: VTIFHAOptional: Yes
Call by Reference: Yes
T_VTIOFZU - Zuordnung Option/Future zu Underlyings
Data type: VTIOFZUOptional: Yes
Call by Reference: Yes
AOPFU_FHAPO -
Data type: VTIFHAPOOptional: Yes
Call by Reference: Yes
AOPFU_FHAZU -
Data type: VTIFHAZUOptional: Yes
Call by Reference: Yes
AOPFU_FINKO -
Data type: VTIFINKOOptional: Yes
Call by Reference: Yes
NOPFU_FHA -
Data type: VTIFHAOptional: Yes
Call by Reference: Yes
NOPFU_FHAPO -
Data type: VTIFHAPOOptional: Yes
Call by Reference: Yes
NOPFU_FHAZU -
Data type: VTIFHAZUOptional: Yes
Call by Reference: Yes
NOPFU_FINKO -
Data type: VTIFINKOOptional: Yes
Call by Reference: Yes
T_VTIOF - Additional Option Data
Data type: VTIOFOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_BEWEG_FOR_UL_DEAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_UL_DEAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VORG_FOR_UL_DEAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for UNDERLING_READ_TO_OPTION 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_i_optnr | TYPE VTI_HEADER-OFGATT, " | |||
lt_aopfu_fha | TYPE STANDARD TABLE OF VTIFHA, " | |||
lv_no_beweg_for_ul_deal | TYPE VTIFHA, " | |||
lt_t_vtiofzu | TYPE STANDARD TABLE OF VTIOFZU, " | |||
lv_no_ul_deal | TYPE VTIOFZU, " | |||
lt_aopfu_fhapo | TYPE STANDARD TABLE OF VTIFHAPO, " | |||
lt_aopfu_fhazu | TYPE STANDARD TABLE OF VTIFHAZU, " | |||
lv_no_vorg_for_ul_deal | TYPE VTIFHAZU, " | |||
lt_aopfu_finko | TYPE STANDARD TABLE OF VTIFINKO, " | |||
lt_nopfu_fha | TYPE STANDARD TABLE OF VTIFHA, " | |||
lt_nopfu_fhapo | TYPE STANDARD TABLE OF VTIFHAPO, " | |||
lt_nopfu_fhazu | TYPE STANDARD TABLE OF VTIFHAZU, " | |||
lt_nopfu_finko | TYPE STANDARD TABLE OF VTIFINKO, " | |||
lt_t_vtiof | TYPE STANDARD TABLE OF VTIOF. " |
  CALL FUNCTION 'UNDERLING_READ_TO_OPTION' "Read Underlying Data for an Option |
EXPORTING | ||
I_OPTNR | = lv_i_optnr | |
TABLES | ||
AOPFU_FHA | = lt_aopfu_fha | |
T_VTIOFZU | = lt_t_vtiofzu | |
AOPFU_FHAPO | = lt_aopfu_fhapo | |
AOPFU_FHAZU | = lt_aopfu_fhazu | |
AOPFU_FINKO | = lt_aopfu_finko | |
NOPFU_FHA | = lt_nopfu_fha | |
NOPFU_FHAPO | = lt_nopfu_fhapo | |
NOPFU_FHAZU | = lt_nopfu_fhazu | |
NOPFU_FINKO | = lt_nopfu_finko | |
T_VTIOF | = lt_t_vtiof | |
EXCEPTIONS | ||
NO_BEWEG_FOR_UL_DEAL = 1 | ||
NO_UL_DEAL = 2 | ||
NO_VORG_FOR_UL_DEAL = 3 | ||
. " UNDERLING_READ_TO_OPTION |
ABAP code using 7.40 inline data declarations to call FM UNDERLING_READ_TO_OPTION
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 OFGATT FROM VTI_HEADER INTO @DATA(ld_i_optnr). | ||||
Search for further information about these or an SAP related objects