SAP BUS_CONTROL_MAIN Function Module for
BUS_CONTROL_MAIN is a standard bus control main 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 bus control main FM, simply by entering the name BUS_CONTROL_MAIN into the relevant SAP transaction such as SE37 or SE38.
Function Group: BUSS
Program Name: SAPLBUSS
Main Program: SAPLBUSS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BUS_CONTROL_MAIN 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 'BUS_CONTROL_MAIN'".
EXPORTING
I_OBJAP = "Application Object
* I_VARTP_START = ' ' "
* I_SICHT_START = ' ' "
* I_XARCHIVE = ' ' "
* I_XMAIN = ' ' "
* I_XHELP = ' ' "
* I_AKTYP = ' ' "Activity Category
* I_ACTION = ' ' "Activity
* I_XINIT = 'X' "
* I_XSAVE = 'X' "
* I_XUPDTASK = 'X' "
* I_APPLI_CALL = "Calling application
* I_VARNR = "Screen Seq. Var.
* I_OTITL = "
IMPORTING
E_STATE = "
E_STATE_FCODE = "
E_HANDLE = "
E_CHASHLP = "
TABLES
* T_RLTYP = "
* T_RLTGR = "
* T_SICHT = "
* T_APPLI = "
* T_FLDVL = "
* T_SCRSEL = "Screen Selection
* T_MSG = "CBP: Message for each object
EXCEPTIONS
EXCEPTION_OCCURED = 1
IMPORTING Parameters details for BUS_CONTROL_MAIN
I_OBJAP - Application Object
Data type: TBZ1-OBJAPOptional: No
Call by Reference: No ( called with pass by value option)
I_VARTP_START -
Data type: TBZ3L-VARTPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SICHT_START -
Data type: TBZ3E-SICHTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XARCHIVE -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XMAIN -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XHELP -
Data type: BOOLE-BOOLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AKTYP - Activity Category
Data type: TBZ0K-AKTYPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ACTION - Activity
Data type: TBZ0M-ACTIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XINIT -
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XSAVE -
Data type: BUS000FLDS-XSAVEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XUPDTASK -
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_APPLI_CALL - Calling application
Data type: TBZ0A-APPLIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_VARNR - Screen Seq. Var.
Data type: TBZ3-VARNROptional: Yes
Call by Reference: No ( called with pass by value option)
I_OTITL -
Data type: TBZ1T-OTITLOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BUS_CONTROL_MAIN
E_STATE -
Data type: BUS000FLDS-CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
E_STATE_FCODE -
Data type: BUS000FLDS-CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
E_HANDLE -
Data type: BUSSKEYVAL-VALINTOptional: No
Call by Reference: No ( called with pass by value option)
E_CHASHLP -
Data type: BUS000FLDS-CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BUS_CONTROL_MAIN
T_RLTYP -
Data type: BUS0RLTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
T_RLTGR -
Data type: BUS0RLTGROptional: Yes
Call by Reference: No ( called with pass by value option)
T_SICHT -
Data type: BUS0SICHTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_APPLI -
Data type: BUS0APPLIOptional: Yes
Call by Reference: No ( called with pass by value option)
T_FLDVL -
Data type: BUS0FLDVALOptional: Yes
Call by Reference: No ( called with pass by value option)
T_SCRSEL - Screen Selection
Data type: BUS0SCRSELOptional: Yes
Call by Reference: No ( called with pass by value option)
T_MSG - CBP: Message for each object
Data type: BUS0MSG1Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
EXCEPTION_OCCURED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for BUS_CONTROL_MAIN 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_e_state | TYPE BUS000FLDS-CHAR1, " | |||
| lv_i_objap | TYPE TBZ1-OBJAP, " | |||
| lt_t_rltyp | TYPE STANDARD TABLE OF BUS0RLTYP, " | |||
| lv_exception_occured | TYPE BUS0RLTYP, " | |||
| lv_i_vartp_start | TYPE TBZ3L-VARTP, " SPACE | |||
| lv_i_sicht_start | TYPE TBZ3E-SICHT, " SPACE | |||
| lv_i_xarchive | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_xmain | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_xhelp | TYPE BOOLE-BOOLE, " SPACE | |||
| lv_i_aktyp | TYPE TBZ0K-AKTYP, " SPACE | |||
| lt_t_rltgr | TYPE STANDARD TABLE OF BUS0RLTGR, " | |||
| lv_e_state_fcode | TYPE BUS000FLDS-CHAR1, " | |||
| lt_t_sicht | TYPE STANDARD TABLE OF BUS0SICHT, " | |||
| lv_e_handle | TYPE BUSSKEYVAL-VALINT, " | |||
| lv_i_action | TYPE TBZ0M-ACTION, " SPACE | |||
| lv_i_xinit | TYPE BOOLE-BOOLE, " 'X' | |||
| lt_t_appli | TYPE STANDARD TABLE OF BUS0APPLI, " | |||
| lv_e_chashlp | TYPE BUS000FLDS-CHAR1, " | |||
| lv_i_xsave | TYPE BUS000FLDS-XSAVE, " 'X' | |||
| lt_t_fldvl | TYPE STANDARD TABLE OF BUS0FLDVAL, " | |||
| lt_t_scrsel | TYPE STANDARD TABLE OF BUS0SCRSEL, " | |||
| lv_i_xupdtask | TYPE BOOLE-BOOLE, " 'X' | |||
| lt_t_msg | TYPE STANDARD TABLE OF BUS0MSG1, " | |||
| lv_i_appli_call | TYPE TBZ0A-APPLI, " | |||
| lv_i_varnr | TYPE TBZ3-VARNR, " | |||
| lv_i_otitl | TYPE TBZ1T-OTITL. " |
|   CALL FUNCTION 'BUS_CONTROL_MAIN' " |
| EXPORTING | ||
| I_OBJAP | = lv_i_objap | |
| I_VARTP_START | = lv_i_vartp_start | |
| I_SICHT_START | = lv_i_sicht_start | |
| I_XARCHIVE | = lv_i_xarchive | |
| I_XMAIN | = lv_i_xmain | |
| I_XHELP | = lv_i_xhelp | |
| I_AKTYP | = lv_i_aktyp | |
| I_ACTION | = lv_i_action | |
| I_XINIT | = lv_i_xinit | |
| I_XSAVE | = lv_i_xsave | |
| I_XUPDTASK | = lv_i_xupdtask | |
| I_APPLI_CALL | = lv_i_appli_call | |
| I_VARNR | = lv_i_varnr | |
| I_OTITL | = lv_i_otitl | |
| IMPORTING | ||
| E_STATE | = lv_e_state | |
| E_STATE_FCODE | = lv_e_state_fcode | |
| E_HANDLE | = lv_e_handle | |
| E_CHASHLP | = lv_e_chashlp | |
| TABLES | ||
| T_RLTYP | = lt_t_rltyp | |
| T_RLTGR | = lt_t_rltgr | |
| T_SICHT | = lt_t_sicht | |
| T_APPLI | = lt_t_appli | |
| T_FLDVL | = lt_t_fldvl | |
| T_SCRSEL | = lt_t_scrsel | |
| T_MSG | = lt_t_msg | |
| EXCEPTIONS | ||
| EXCEPTION_OCCURED = 1 | ||
| . " BUS_CONTROL_MAIN | ||
ABAP code using 7.40 inline data declarations to call FM BUS_CONTROL_MAIN
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 CHAR1 FROM BUS000FLDS INTO @DATA(ld_e_state). | ||||
| "SELECT single OBJAP FROM TBZ1 INTO @DATA(ld_i_objap). | ||||
| "SELECT single VARTP FROM TBZ3L INTO @DATA(ld_i_vartp_start). | ||||
| DATA(ld_i_vartp_start) | = ' '. | |||
| "SELECT single SICHT FROM TBZ3E INTO @DATA(ld_i_sicht_start). | ||||
| DATA(ld_i_sicht_start) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xarchive). | ||||
| DATA(ld_i_xarchive) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xmain). | ||||
| DATA(ld_i_xmain) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xhelp). | ||||
| DATA(ld_i_xhelp) | = ' '. | |||
| "SELECT single AKTYP FROM TBZ0K INTO @DATA(ld_i_aktyp). | ||||
| DATA(ld_i_aktyp) | = ' '. | |||
| "SELECT single CHAR1 FROM BUS000FLDS INTO @DATA(ld_e_state_fcode). | ||||
| "SELECT single VALINT FROM BUSSKEYVAL INTO @DATA(ld_e_handle). | ||||
| "SELECT single ACTION FROM TBZ0M INTO @DATA(ld_i_action). | ||||
| DATA(ld_i_action) | = ' '. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xinit). | ||||
| DATA(ld_i_xinit) | = 'X'. | |||
| "SELECT single CHAR1 FROM BUS000FLDS INTO @DATA(ld_e_chashlp). | ||||
| "SELECT single XSAVE FROM BUS000FLDS INTO @DATA(ld_i_xsave). | ||||
| DATA(ld_i_xsave) | = 'X'. | |||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xupdtask). | ||||
| DATA(ld_i_xupdtask) | = 'X'. | |||
| "SELECT single APPLI FROM TBZ0A INTO @DATA(ld_i_appli_call). | ||||
| "SELECT single VARNR FROM TBZ3 INTO @DATA(ld_i_varnr). | ||||
| "SELECT single OTITL FROM TBZ1T INTO @DATA(ld_i_otitl). | ||||
Search for further information about these or an SAP related objects