SAP TR_VALID_NAMESPACE_LIST Function Module for List of valid namespaces (optional as F4 help)
TR_VALID_NAMESPACE_LIST is a standard tr valid namespace list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for List of valid namespaces (optional as F4 help) 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 tr valid namespace list FM, simply by entering the name TR_VALID_NAMESPACE_LIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: STR4
Program Name: SAPLSTR4
Main Program:
Appliation area: S
Release date: 09-Apr-1998
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_VALID_NAMESPACE_LIST 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 'TR_VALID_NAMESPACE_LIST'"List of valid namespaces (optional as F4 help).
EXPORTING
* IV_EDIT_ONLY = 'X' "'X': Display modifiable namespaces only
* IV_PRODUCER_ONLY = 'X' "'X': Display own namespaces only
* IV_LICENSED_ONLY = 'X' "'X': Display namespaces with valid licenses only
* IV_NONGENERATED_ONLY = ' ' "'X': Display namespaces without active GEN_ONLY only
* IV_SAPSTANDARD_ONLY = ' ' "'X': Display namespaces belonging to the SAP standard only
* IV_SHOW_ALSO_NONPREFIX_NAMESPC = ' ' "Default: ' ', 'X' for special calls only
* IV_DISPLAY_AS_F4_LIST = ' ' "'X': Output as F4 help screen
IMPORTING
ES_SELECTED_NAME' ' = "Selected line with namespace information
EV_LINE_SELECTED = "'X': Line selected
TABLES
* ET_NAME' ' = "List of valid namespaces
EXCEPTIONS
NO_VALID_NAMESPACE_FOUND = 1
IMPORTING Parameters details for TR_VALID_NAMESPACE_LIST
IV_EDIT_ONLY - 'X': Display modifiable namespaces only
Data type: TRPARI-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_PRODUCER_ONLY - 'X': Display own namespaces only
Data type: TRPARI-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_LICENSED_ONLY - 'X': Display namespaces with valid licenses only
Data type: TRPARI-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_NONGENERATED_ONLY - 'X': Display namespaces without active GEN_ONLY only
Data type: TRPARI-FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_SAPSTANDARD_ONLY - 'X': Display namespaces belonging to the SAP standard only
Data type: TRPARI-FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_SHOW_ALSO_NONPREFIX_NAMESPC - Default: ' ', 'X' for special calls only
Data type: TRPARI-FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_DISPLAY_AS_F4_LIST - 'X': Output as F4 help screen
Data type: TRPARI-FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_VALID_NAMESPACE_LIST
ES_SELECTED_NAMESPACE - Selected line with namespace information
Data type: TRNSP_S_NSPINFOOptional: No
Call by Reference: No ( called with pass by value option)
EV_LINE_SELECTED - 'X': Line selected
Data type: TRPARI-FLAGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TR_VALID_NAMESPACE_LIST
ET_NAMESPACE - List of valid namespaces
Data type: TRNSP_T_NSPINFOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_VALID_NAMESPACE_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_VALID_NAMESPACE_LIST 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_et_namespace | TYPE STANDARD TABLE OF TRNSP_T_NSPINFO, " | |||
| lv_iv_edit_only | TYPE TRPARI-FLAG, " 'X' | |||
| lv_es_selected_namespace | TYPE TRNSP_S_NSPINFO, " | |||
| lv_no_valid_namespace_found | TYPE TRNSP_S_NSPINFO, " | |||
| lv_ev_line_selected | TYPE TRPARI-FLAG, " | |||
| lv_iv_producer_only | TYPE TRPARI-FLAG, " 'X' | |||
| lv_iv_licensed_only | TYPE TRPARI-FLAG, " 'X' | |||
| lv_iv_nongenerated_only | TYPE TRPARI-FLAG, " ' ' | |||
| lv_iv_sapstandard_only | TYPE TRPARI-FLAG, " ' ' | |||
| lv_iv_show_also_nonprefix_namespc | TYPE TRPARI-FLAG, " ' ' | |||
| lv_iv_display_as_f4_list | TYPE TRPARI-FLAG. " ' ' |
|   CALL FUNCTION 'TR_VALID_NAMESPACE_LIST' "List of valid namespaces (optional as F4 help) |
| EXPORTING | ||
| IV_EDIT_ONLY | = lv_iv_edit_only | |
| IV_PRODUCER_ONLY | = lv_iv_producer_only | |
| IV_LICENSED_ONLY | = lv_iv_licensed_only | |
| IV_NONGENERATED_ONLY | = lv_iv_nongenerated_only | |
| IV_SAPSTANDARD_ONLY | = lv_iv_sapstandard_only | |
| IV_SHOW_ALSO_NONPREFIX_NAMESPC | = lv_iv_show_also_nonprefix_namespc | |
| IV_DISPLAY_AS_F4_LIST | = lv_iv_display_as_f4_list | |
| IMPORTING | ||
| ES_SELECTED_NAMESPACE | = lv_es_selected_namespace | |
| EV_LINE_SELECTED | = lv_ev_line_selected | |
| TABLES | ||
| ET_NAMESPACE | = lt_et_namespace | |
| EXCEPTIONS | ||
| NO_VALID_NAMESPACE_FOUND = 1 | ||
| . " TR_VALID_NAMESPACE_LIST | ||
ABAP code using 7.40 inline data declarations to call FM TR_VALID_NAMESPACE_LIST
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 FLAG FROM TRPARI INTO @DATA(ld_iv_edit_only). | ||||
| DATA(ld_iv_edit_only) | = 'X'. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_ev_line_selected). | ||||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_producer_only). | ||||
| DATA(ld_iv_producer_only) | = 'X'. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_licensed_only). | ||||
| DATA(ld_iv_licensed_only) | = 'X'. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_nongenerated_only). | ||||
| DATA(ld_iv_nongenerated_only) | = ' '. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_sapstandard_only). | ||||
| DATA(ld_iv_sapstandard_only) | = ' '. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_show_also_nonprefix_namespc). | ||||
| DATA(ld_iv_show_also_nonprefix_namespc) | = ' '. | |||
| "SELECT single FLAG FROM TRPARI INTO @DATA(ld_iv_display_as_f4_list). | ||||
| DATA(ld_iv_display_as_f4_list) | = ' '. | |||
Search for further information about these or an SAP related objects