SAP UPC_OPTION_EDITOR Function Module for Planning: Edition of selection criteria for a field
UPC_OPTION_EDITOR is a standard upc option editor SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Planning: Edition of selection criteria for a field 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 upc option editor FM, simply by entering the name UPC_OPTION_EDITOR into the relevant SAP transaction such as SE37 or SE38.
Function Group: UPCE
Program Name: SAPLUPCE
Main Program: SAPLUPCE
Appliation area: R
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function UPC_OPTION_EDITOR 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 'UPC_OPTION_EDITOR'"Planning: Edition of selection criteria for a field.
EXPORTING
* I_AREA = ' ' "Planning Area
* I_F4HELP = 'UPF_HELP_VALUES_GET' "FB for F4 help
* I_DEFAULT_FB = ' ' "Set default values in FM
* I_MDAT_CHECK = 'UPF_KEYID_CHECK' "FB for Master Data Validation
* I_OPTIOS_FB = "FB validation selection conditions
* I_PBO_FB = ' ' "FB affect screen for PBO
* I_TEXT_FB = 'UPF_OPTIOS_TEXT_SET' "Read FM texts for PBO
* I_COLUMN_FORMAT = ' ' "Display with characteristics in the rows
* I_PLEVEL = ' ' "Planning Level
* IT_FLDDS = "Planning: Fields for Selection
* IT_OPTIOS = "Planning: Conditions
* I_DISPLAY = ' ' "Display mode
* I_HEADER = ' ' "Heading
* I_HEADER_FIELDS = ' ' "Heading above fields in columnar display
* I_DETAIL = ' ' "Detail button active
* I_DETAIL_BACK = ' ' "Return button to details
IMPORTING
E_HANDLE = "Handle
E_DYNNR = "Dynpro number for subscreen
E_DYNPROG = "Dynpro program for the subscreen
IMPORTING Parameters details for UPC_OPTION_EDITOR
I_AREA - Planning Area
Data type: UPC_Y_AREADefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_F4HELP - FB for F4 help
Data type: RS38L_FNAMDefault: 'UPF_HELP_VALUES_GET'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DEFAULT_FB - Set default values in FM
Data type: RS38L_FNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MDAT_CHECK - FB for Master Data Validation
Data type: RS38L_FNAMDefault: 'UPF_KEYID_CHECK'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_OPTIOS_FB - FB validation selection conditions
Data type: RS38L_FNAMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PBO_FB - FB affect screen for PBO
Data type: RS38L_FNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TEXT_FB - Read FM texts for PBO
Data type: RS38L_FNAMDefault: 'UPF_OPTIOS_TEXT_SET'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_COLUMN_FORMAT - Display with characteristics in the rows
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PLEVEL - Planning Level
Data type: UPC_Y_PLEVELDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_FLDDS - Planning: Fields for Selection
Data type: UPF_YT_FLDDSOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_OPTIOS - Planning: Conditions
Data type: UPC_YT_OPTIOSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DISPLAY - Display mode
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_HEADER - Heading
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_HEADER_FIELDS - Heading above fields in columnar display
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DETAIL - Detail button active
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DETAIL_BACK - Return button to details
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for UPC_OPTION_EDITOR
E_HANDLE - Handle
Data type: UPC_Y_HANDLEOptional: No
Call by Reference: Yes
E_DYNNR - Dynpro number for subscreen
Data type: SYDYNNROptional: No
Call by Reference: Yes
E_DYNPROG - Dynpro program for the subscreen
Data type: SYREPIDOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for UPC_OPTION_EDITOR 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_area | TYPE UPC_Y_AREA, " SPACE | |||
| lv_e_handle | TYPE UPC_Y_HANDLE, " | |||
| lv_i_f4help | TYPE RS38L_FNAM, " 'UPF_HELP_VALUES_GET' | |||
| lv_i_default_fb | TYPE RS38L_FNAM, " SPACE | |||
| lv_i_mdat_check | TYPE RS38L_FNAM, " 'UPF_KEYID_CHECK' | |||
| lv_i_optios_fb | TYPE RS38L_FNAM, " | |||
| lv_i_pbo_fb | TYPE RS38L_FNAM, " SPACE | |||
| lv_i_text_fb | TYPE RS38L_FNAM, " 'UPF_OPTIOS_TEXT_SET' | |||
| lv_i_column_format | TYPE C, " SPACE | |||
| lv_e_dynnr | TYPE SYDYNNR, " | |||
| lv_i_plevel | TYPE UPC_Y_PLEVEL, " SPACE | |||
| lv_it_fldds | TYPE UPF_YT_FLDDS, " | |||
| lv_e_dynprog | TYPE SYREPID, " | |||
| lv_it_optios | TYPE UPC_YT_OPTIOS, " | |||
| lv_i_display | TYPE C, " SPACE | |||
| lv_i_header | TYPE C, " SPACE | |||
| lv_i_header_fields | TYPE C, " SPACE | |||
| lv_i_detail | TYPE C, " SPACE | |||
| lv_i_detail_back | TYPE C. " SPACE |
|   CALL FUNCTION 'UPC_OPTION_EDITOR' "Planning: Edition of selection criteria for a field |
| EXPORTING | ||
| I_AREA | = lv_i_area | |
| I_F4HELP | = lv_i_f4help | |
| I_DEFAULT_FB | = lv_i_default_fb | |
| I_MDAT_CHECK | = lv_i_mdat_check | |
| I_OPTIOS_FB | = lv_i_optios_fb | |
| I_PBO_FB | = lv_i_pbo_fb | |
| I_TEXT_FB | = lv_i_text_fb | |
| I_COLUMN_FORMAT | = lv_i_column_format | |
| I_PLEVEL | = lv_i_plevel | |
| IT_FLDDS | = lv_it_fldds | |
| IT_OPTIOS | = lv_it_optios | |
| I_DISPLAY | = lv_i_display | |
| I_HEADER | = lv_i_header | |
| I_HEADER_FIELDS | = lv_i_header_fields | |
| I_DETAIL | = lv_i_detail | |
| I_DETAIL_BACK | = lv_i_detail_back | |
| IMPORTING | ||
| E_HANDLE | = lv_e_handle | |
| E_DYNNR | = lv_e_dynnr | |
| E_DYNPROG | = lv_e_dynprog | |
| . " UPC_OPTION_EDITOR | ||
ABAP code using 7.40 inline data declarations to call FM UPC_OPTION_EDITOR
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.| DATA(ld_i_area) | = ' '. | |||
| DATA(ld_i_f4help) | = 'UPF_HELP_VALUES_GET'. | |||
| DATA(ld_i_default_fb) | = ' '. | |||
| DATA(ld_i_mdat_check) | = 'UPF_KEYID_CHECK'. | |||
| DATA(ld_i_pbo_fb) | = ' '. | |||
| DATA(ld_i_text_fb) | = 'UPF_OPTIOS_TEXT_SET'. | |||
| DATA(ld_i_column_format) | = ' '. | |||
| DATA(ld_i_plevel) | = ' '. | |||
| DATA(ld_i_display) | = ' '. | |||
| DATA(ld_i_header) | = ' '. | |||
| DATA(ld_i_header_fields) | = ' '. | |||
| DATA(ld_i_detail) | = ' '. | |||
| DATA(ld_i_detail_back) | = ' '. | |||
Search for further information about these or an SAP related objects