SAP Function Modules

BAPI_BUS2002_GET_STATUS SAP Function module - Read Status for BUS2002 (Network)







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

Associated Function Group: CNIF_STATUS_2002
Released Date: 07.08.2002
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_BUS2002_GET_STATUS - BAPI BUS2002 GET STATUS





CALL FUNCTION 'BAPI_BUS2002_GET_STATUS' "Read Status for BUS2002 (Network)
  EXPORTING
    number =                    " bapi_network_list-network  Network Number
*   without_activities = SPACE  " bapinwgi-wo_network  Do not return network activities
  IMPORTING
    return =                    " bapireturn1   Return Parameter
* TABLES
*   e_system_status =           " bapi_system_status  Return Structure for System Status
*   e_user_status =             " bapi_user_status  Return Structure for User Status
*   e_activity_system_status =   " bapi_activity_system_status  Return Structure for Activity System Status
*   e_activity_user_status =    " bapi_activity_user_status  Return Structure of Activity User Status
    .  "  BAPI_BUS2002_GET_STATUS

ABAP code example for Function Module BAPI_BUS2002_GET_STATUS





The ABAP code below is a full code listing to execute function module BAPI_BUS2002_GET_STATUS 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_return  TYPE BAPIRETURN1 ,
it_e_system_status  TYPE STANDARD TABLE OF BAPI_SYSTEM_STATUS,"TABLES PARAM
wa_e_system_status  LIKE LINE OF it_e_system_status ,
it_e_user_status  TYPE STANDARD TABLE OF BAPI_USER_STATUS,"TABLES PARAM
wa_e_user_status  LIKE LINE OF it_e_user_status ,
it_e_activity_system_status  TYPE STANDARD TABLE OF BAPI_ACTIVITY_SYSTEM_STATUS,"TABLES PARAM
wa_e_activity_system_status  LIKE LINE OF it_e_activity_system_status ,
it_e_activity_user_status  TYPE STANDARD TABLE OF BAPI_ACTIVITY_USER_STATUS,"TABLES PARAM
wa_e_activity_user_status  LIKE LINE OF it_e_activity_user_status .


DATA(ld_number) = some text here

DATA(ld_without_activities) = some text here

"populate fields of struture and append to itab
append wa_e_system_status to it_e_system_status.

"populate fields of struture and append to itab
append wa_e_user_status to it_e_user_status.

"populate fields of struture and append to itab
append wa_e_activity_system_status to it_e_activity_system_status.

"populate fields of struture and append to itab
append wa_e_activity_user_status to it_e_activity_user_status. . CALL FUNCTION 'BAPI_BUS2002_GET_STATUS' EXPORTING number = ld_number * without_activities = ld_without_activities IMPORTING return = ld_return * TABLES * e_system_status = it_e_system_status * e_user_status = it_e_user_status * e_activity_system_status = it_e_activity_system_status * e_activity_user_status = it_e_activity_user_status . " BAPI_BUS2002_GET_STATUS
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_return  TYPE BAPIRETURN1 ,
ld_number  TYPE BAPI_NETWORK_LIST-NETWORK ,
it_e_system_status  TYPE STANDARD TABLE OF BAPI_SYSTEM_STATUS ,
wa_e_system_status  LIKE LINE OF it_e_system_status,
ld_without_activities  TYPE BAPINWGI-WO_NETWORK ,
it_e_user_status  TYPE STANDARD TABLE OF BAPI_USER_STATUS ,
wa_e_user_status  LIKE LINE OF it_e_user_status,
it_e_activity_system_status  TYPE STANDARD TABLE OF BAPI_ACTIVITY_SYSTEM_STATUS ,
wa_e_activity_system_status  LIKE LINE OF it_e_activity_system_status,
it_e_activity_user_status  TYPE STANDARD TABLE OF BAPI_ACTIVITY_USER_STATUS ,
wa_e_activity_user_status  LIKE LINE OF it_e_activity_user_status.


ld_number = some text here

"populate fields of struture and append to itab
append wa_e_system_status to it_e_system_status.

ld_without_activities = some text here

"populate fields of struture and append to itab
append wa_e_user_status to it_e_user_status.

"populate fields of struture and append to itab
append wa_e_activity_system_status to it_e_activity_system_status.

"populate fields of struture and append to itab
append wa_e_activity_user_status to it_e_activity_user_status.

SAP Documentation for FM BAPI_BUS2002_GET_STATUS


Using the BAPI BAPI_BUS2002_GET_STATUS, both the active system statuses and user statuses for a network header (NUMBER) as well as its ...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 BAPI_BUS2002_GET_STATUS or its description.