SAP Function Modules

I_STATUS_SELECT SAP Function module - Check if an object can be selected based on its status







I_STATUS_SELECT 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 I_STATUS_SELECT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM I_STATUS_SELECT - I STATUS SELECT





CALL FUNCTION 'I_STATUS_SELECT' "Check if an object can be selected based on its status
  EXPORTING
    objnr =                     " jest-objnr    Object number
    sent_user_status =          " tj30t-txt04   User status to be set
  IMPORTING
    selected =                  "               Status correspond to selection criteria
    current_user_status =       " tj30-estat    Current user status
    next_user_status =          " tj30-estat    User status to be set (internal number)
    user_status_profile =       " jsto-stsma    Object's user status profile
  TABLES
    syst_status_incl =          " istatus_range  select-options for system status inclusive
    syst_status_excl =          " istatus_range  select-options for system status exclusive
    user_status_incl =          " istatus_range  select-options for user status inclusive
    user_status_excl =          " istatus_range  select-options for user status exclusive
    .  "  I_STATUS_SELECT

ABAP code example for Function Module I_STATUS_SELECT





The ABAP code below is a full code listing to execute function module I_STATUS_SELECT 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_selected  TYPE STRING ,
ld_current_user_status  TYPE TJ30-ESTAT ,
ld_next_user_status  TYPE TJ30-ESTAT ,
ld_user_status_profile  TYPE JSTO-STSMA ,
it_syst_status_incl  TYPE STANDARD TABLE OF ISTATUS_RANGE,"TABLES PARAM
wa_syst_status_incl  LIKE LINE OF it_syst_status_incl ,
it_syst_status_excl  TYPE STANDARD TABLE OF ISTATUS_RANGE,"TABLES PARAM
wa_syst_status_excl  LIKE LINE OF it_syst_status_excl ,
it_user_status_incl  TYPE STANDARD TABLE OF ISTATUS_RANGE,"TABLES PARAM
wa_user_status_incl  LIKE LINE OF it_user_status_incl ,
it_user_status_excl  TYPE STANDARD TABLE OF ISTATUS_RANGE,"TABLES PARAM
wa_user_status_excl  LIKE LINE OF it_user_status_excl .


SELECT single OBJNR
FROM JEST
INTO @DATA(ld_objnr).


SELECT single TXT04
FROM TJ30T
INTO @DATA(ld_sent_user_status).


"populate fields of struture and append to itab
append wa_syst_status_incl to it_syst_status_incl.

"populate fields of struture and append to itab
append wa_syst_status_excl to it_syst_status_excl.

"populate fields of struture and append to itab
append wa_user_status_incl to it_user_status_incl.

"populate fields of struture and append to itab
append wa_user_status_excl to it_user_status_excl. . CALL FUNCTION 'I_STATUS_SELECT' EXPORTING objnr = ld_objnr sent_user_status = ld_sent_user_status IMPORTING selected = ld_selected current_user_status = ld_current_user_status next_user_status = ld_next_user_status user_status_profile = ld_user_status_profile TABLES syst_status_incl = it_syst_status_incl syst_status_excl = it_syst_status_excl user_status_incl = it_user_status_incl user_status_excl = it_user_status_excl . " I_STATUS_SELECT
IF SY-SUBRC EQ 0. "All OK 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_selected  TYPE STRING ,
ld_objnr  TYPE JEST-OBJNR ,
it_syst_status_incl  TYPE STANDARD TABLE OF ISTATUS_RANGE ,
wa_syst_status_incl  LIKE LINE OF it_syst_status_incl,
ld_current_user_status  TYPE TJ30-ESTAT ,
ld_sent_user_status  TYPE TJ30T-TXT04 ,
it_syst_status_excl  TYPE STANDARD TABLE OF ISTATUS_RANGE ,
wa_syst_status_excl  LIKE LINE OF it_syst_status_excl,
ld_next_user_status  TYPE TJ30-ESTAT ,
it_user_status_incl  TYPE STANDARD TABLE OF ISTATUS_RANGE ,
wa_user_status_incl  LIKE LINE OF it_user_status_incl,
ld_user_status_profile  TYPE JSTO-STSMA ,
it_user_status_excl  TYPE STANDARD TABLE OF ISTATUS_RANGE ,
wa_user_status_excl  LIKE LINE OF it_user_status_excl.


SELECT single OBJNR
FROM JEST
INTO ld_objnr.


"populate fields of struture and append to itab
append wa_syst_status_incl to it_syst_status_incl.

SELECT single TXT04
FROM TJ30T
INTO ld_sent_user_status.


"populate fields of struture and append to itab
append wa_syst_status_excl to it_syst_status_excl.

"populate fields of struture and append to itab
append wa_user_status_incl to it_user_status_incl.

"populate fields of struture and append to itab
append wa_user_status_excl to it_user_status_excl.

SAP Documentation for FM I_STATUS_SELECT


This function module is used to check if the user status of a specified object (order, operation, notification, or task) can be changed to the ...See here for full SAP fm documentation






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 I_STATUS_SELECT or its description.