SAP Function Modules

TR_REQUEST_CHOICE SAP Function module







TR_REQUEST_CHOICE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name TR_REQUEST_CHOICE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STR8
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM TR_REQUEST_CHOICE - TR REQUEST CHOICE





CALL FUNCTION 'TR_REQUEST_CHOICE' "
* EXPORTING
*   iv_suppress_dialog = SPACE  " trparflag     Suppress dialog
*   iv_request_types =          " c             Request types chosen (T, C, K, L,...)
*   iv_cli_dep = SPACE          " trparflag     Check request client
*   iv_request = SPACE          " trkorr        Proposed request
*   it_e071 =                   " tr_objects    Request objects that you want to add
*   it_e071k =                  " tr_keys       Request key that you want to add
*   iv_lock_objects = SPACE     " trparflag     Objects are locked in request
*   iv_title =                  " c             Dialog box title
*   iv_start_column = 3         " sy-cucol      Column from which the dialog box starts
*   iv_start_row = 7            " sy-curow      Row from which the dialog box starts
*   iv_with_error_log = 'X'     " c
*   iv_no_owner_check = SPACE   " c
*   iv_foreign_request = '   '  " c
*   it_e071k_str =              " e071k_strtyp
*   it_obj_entries =            " cts_obj_entries
  IMPORTING
    es_request =                " trwbo_request_header  Selected request
  EXCEPTIONS
    INVALID_REQUEST = 1         "               Invalid request
    INVALID_REQUEST_TYPE = 2    "               Invalid request type
    USER_NOT_OWNER = 3          "               User is not the owner of the request
    NO_OBJECTS_APPENDED = 4     "               Objects could not be appended
    ENQUEUE_ERROR = 5           "               Error in lock management
    CANCELLED_BY_USER = 6       "               Cancellation by user
    RECURSIVE_CALL = 7          "               Recursive call of function module
    .  "  TR_REQUEST_CHOICE

ABAP code example for Function Module TR_REQUEST_CHOICE





The ABAP code below is a full code listing to execute function module TR_REQUEST_CHOICE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_es_request  TYPE TRWBO_REQUEST_HEADER .

DATA(ld_iv_suppress_dialog) = 'Check type of data required'.
DATA(ld_iv_request_types) = 'Check type of data required'.
DATA(ld_iv_cli_dep) = 'Check type of data required'.
DATA(ld_iv_request) = 'Check type of data required'.
DATA(ld_it_e071) = 'Check type of data required'.
DATA(ld_it_e071k) = 'Check type of data required'.
DATA(ld_iv_lock_objects) = 'Check type of data required'.
DATA(ld_iv_title) = 'Check type of data required'.
DATA(ld_iv_start_column) = '123 '.
DATA(ld_iv_start_row) = '123 '.
DATA(ld_iv_with_error_log) = 'Check type of data required'.
DATA(ld_iv_no_owner_check) = 'Check type of data required'.
DATA(ld_iv_foreign_request) = 'Check type of data required'.
DATA(ld_it_e071k_str) = 'Check type of data required'.
DATA(ld_it_obj_entries) = 'Check type of data required'. . CALL FUNCTION 'TR_REQUEST_CHOICE' * EXPORTING * iv_suppress_dialog = ld_iv_suppress_dialog * iv_request_types = ld_iv_request_types * iv_cli_dep = ld_iv_cli_dep * iv_request = ld_iv_request * it_e071 = ld_it_e071 * it_e071k = ld_it_e071k * iv_lock_objects = ld_iv_lock_objects * iv_title = ld_iv_title * iv_start_column = ld_iv_start_column * iv_start_row = ld_iv_start_row * iv_with_error_log = ld_iv_with_error_log * iv_no_owner_check = ld_iv_no_owner_check * iv_foreign_request = ld_iv_foreign_request * it_e071k_str = ld_it_e071k_str * it_obj_entries = ld_it_obj_entries IMPORTING es_request = ld_es_request EXCEPTIONS INVALID_REQUEST = 1 INVALID_REQUEST_TYPE = 2 USER_NOT_OWNER = 3 NO_OBJECTS_APPENDED = 4 ENQUEUE_ERROR = 5 CANCELLED_BY_USER = 6 RECURSIVE_CALL = 7 . " TR_REQUEST_CHOICE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_es_request  TYPE TRWBO_REQUEST_HEADER ,
ld_iv_suppress_dialog  TYPE TRPARFLAG ,
ld_iv_request_types  TYPE C ,
ld_iv_cli_dep  TYPE TRPARFLAG ,
ld_iv_request  TYPE TRKORR ,
ld_it_e071  TYPE TR_OBJECTS ,
ld_it_e071k  TYPE TR_KEYS ,
ld_iv_lock_objects  TYPE TRPARFLAG ,
ld_iv_title  TYPE C ,
ld_iv_start_column  TYPE SY-CUCOL ,
ld_iv_start_row  TYPE SY-CUROW ,
ld_iv_with_error_log  TYPE C ,
ld_iv_no_owner_check  TYPE C ,
ld_iv_foreign_request  TYPE C ,
ld_it_e071k_str  TYPE E071K_STRTYP ,
ld_it_obj_entries  TYPE CTS_OBJ_ENTRIES .

ld_iv_suppress_dialog = 'Check type of data required'.
ld_iv_request_types = 'Check type of data required'.
ld_iv_cli_dep = 'Check type of data required'.
ld_iv_request = 'Check type of data required'.
ld_it_e071 = 'Check type of data required'.
ld_it_e071k = 'Check type of data required'.
ld_iv_lock_objects = 'Check type of data required'.
ld_iv_title = 'Check type of data required'.
ld_iv_start_column = '123 '.
ld_iv_start_row = '123 '.
ld_iv_with_error_log = 'Check type of data required'.
ld_iv_no_owner_check = 'Check type of data required'.
ld_iv_foreign_request = 'Check type of data required'.
ld_it_e071k_str = 'Check type of data required'.
ld_it_obj_entries = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name TR_REQUEST_CHOICE or its description.