SAP RP_OPTIONS_INTO_STRING Function Module for
RP_OPTIONS_INTO_STRING is a standard rp options into string SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rp options into string FM, simply by entering the name RP_OPTIONS_INTO_STRING into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPPN
Program Name: SAPLRPPN
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RP_OPTIONS_INTO_STRING 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 'RP_OPTIONS_INTO_STRING'".
EXPORTING
* MAX_CHOSEN_NUMBER = 0 "Maximum number of selectable options
* DYN_PUSHBUTTON_TEXT3 = "Text for button in F key string
* DELIMITER_SIGN = '/' "Delimiter for string sequence
TEXT_TITLE = "Dialog box header
* TEXT_LEFT = "Text for selectable options
* TEXT_RIGHT = "Text for selectable options
* STATUS = 'NOORDER' "Defines whether or not the sequence is important
* TEXT_OBJECT = "Text in dialog can be maintained using SE61
* DYN_PUSHBUTTON_TEXT1 = "Text for button in F key string
* DYN_PUSHBUTTON_TEXT2 = "Text for button in F key string
IMPORTING
RETURN_CODE = "Defines which button terminated the dialog
CHANGING
STRING_VALUE = "Represents the selected options
TABLES
TEXT_SYMBOL_RELATION_TAB = "Table of possible options and their ID codes
EXCEPTIONS
TABLE_STRING_INCONSISTENCY = 1 UNKNOWN_STATUS = 2 STRING_VALUE_OVERFLOW = 3
IMPORTING Parameters details for RP_OPTIONS_INTO_STRING
MAX_CHOSEN_NUMBER - Maximum number of selectable options
Data type: SY-INDEXOptional: Yes
Call by Reference: No ( called with pass by value option)
DYN_PUSHBUTTON_TEXT3 - Text for button in F key string
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
DELIMITER_SIGN - Delimiter for string sequence
Data type:Default: '/'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_TITLE - Dialog box header
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TEXT_LEFT - Text for selectable options
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_RIGHT - Text for selectable options
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS - Defines whether or not the sequence is important
Data type:Default: 'NOORDER'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_OBJECT - Text in dialog can be maintained using SE61
Data type: DOKHL-OBJECTOptional: Yes
Call by Reference: No ( called with pass by value option)
DYN_PUSHBUTTON_TEXT1 - Text for button in F key string
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
DYN_PUSHBUTTON_TEXT2 - Text for button in F key string
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RP_OPTIONS_INTO_STRING
RETURN_CODE - Defines which button terminated the dialog
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for RP_OPTIONS_INTO_STRING
STRING_VALUE - Represents the selected options
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RP_OPTIONS_INTO_STRING
TEXT_SYMBOL_RELATION_TAB - Table of possible options and their ID codes
Data type: PNPSTRINGTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TABLE_STRING_INCONSISTENCY - String does not match table
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNKNOWN_STATUS - Status not 'ORDER' / 'NOORDER'
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
STRING_VALUE_OVERFLOW -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RP_OPTIONS_INTO_STRING 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_return_code | TYPE SY-SUBRC, " | |||
lv_string_value | TYPE SY, " | |||
lv_max_chosen_number | TYPE SY-INDEX, " 0 | |||
lt_text_symbol_relation_tab | TYPE STANDARD TABLE OF PNPSTRINGT, " | |||
lv_table_string_inconsistency | TYPE PNPSTRINGT, " | |||
lv_dyn_pushbutton_text3 | TYPE PNPSTRINGT, " | |||
lv_delimiter_sign | TYPE PNPSTRINGT, " '/' | |||
lv_unknown_status | TYPE PNPSTRINGT, " | |||
lv_text_title | TYPE PNPSTRINGT, " | |||
lv_string_value_overflow | TYPE PNPSTRINGT, " | |||
lv_text_left | TYPE PNPSTRINGT, " | |||
lv_text_right | TYPE PNPSTRINGT, " | |||
lv_status | TYPE PNPSTRINGT, " 'NOORDER' | |||
lv_text_object | TYPE DOKHL-OBJECT, " | |||
lv_dyn_pushbutton_text1 | TYPE DOKHL, " | |||
lv_dyn_pushbutton_text2 | TYPE DOKHL. " |
  CALL FUNCTION 'RP_OPTIONS_INTO_STRING' " |
EXPORTING | ||
MAX_CHOSEN_NUMBER | = lv_max_chosen_number | |
DYN_PUSHBUTTON_TEXT3 | = lv_dyn_pushbutton_text3 | |
DELIMITER_SIGN | = lv_delimiter_sign | |
TEXT_TITLE | = lv_text_title | |
TEXT_LEFT | = lv_text_left | |
TEXT_RIGHT | = lv_text_right | |
STATUS | = lv_status | |
TEXT_OBJECT | = lv_text_object | |
DYN_PUSHBUTTON_TEXT1 | = lv_dyn_pushbutton_text1 | |
DYN_PUSHBUTTON_TEXT2 | = lv_dyn_pushbutton_text2 | |
IMPORTING | ||
RETURN_CODE | = lv_return_code | |
CHANGING | ||
STRING_VALUE | = lv_string_value | |
TABLES | ||
TEXT_SYMBOL_RELATION_TAB | = lt_text_symbol_relation_tab | |
EXCEPTIONS | ||
TABLE_STRING_INCONSISTENCY = 1 | ||
UNKNOWN_STATUS = 2 | ||
STRING_VALUE_OVERFLOW = 3 | ||
. " RP_OPTIONS_INTO_STRING |
ABAP code using 7.40 inline data declarations to call FM RP_OPTIONS_INTO_STRING
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 SUBRC FROM SY INTO @DATA(ld_return_code). | ||||
"SELECT single INDEX FROM SY INTO @DATA(ld_max_chosen_number). | ||||
DATA(ld_delimiter_sign) | = '/'. | |||
DATA(ld_status) | = 'NOORDER'. | |||
"SELECT single OBJECT FROM DOKHL INTO @DATA(ld_text_object). | ||||
Search for further information about these or an SAP related objects