MESSAGE_STORE_WITH_DISPLAY 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 MESSAGE_STORE_WITH_DISPLAY into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CACS_BUFFERLOG
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'MESSAGE_STORE_WITH_DISPLAY' "Couples SAPGUI_PROGRESS_INDICATOR, MESSAGE* and Batch Messages
EXPORTING
* percentage = 0 " Size of Bar ( 0 <= PERCENTAGE <= 100 )
arbgb = " smesg-arbgb Message ID
* exception_if_not_active = 'X' " X = exception not_active is Triggered
msgty = " smesg-msgty Type of message (I, S, W, E, A)
* msgv1 = SPACE " smesg-msgv1 First variable parameter of message
* msgv2 = SPACE " smesg-msgv2 Second variable parameter of message
* msgv3 = SPACE " smesg-msgv3 Third variable parameter of message
* msgv4 = SPACE " smesg-msgv4 Fourth variable parameter of message
txtnr = " Message Number
* timecondition = 0 " Minimum Seconds Between Two Calls
* xdialog = 'X' " boolean Display in Dialog? (=> PROGRES_INDICATOR)
* xbatch = 'X' " boolean Display in Batch? (=> Job Log)
* context = " bal_s_cont Application Log: Context
* params = " bal_s_parm Application Log: Parameters
* CHANGING
* c_detlevel = " bal_s_msg-detlevel Application Log: Level of Detail
* c_log_handle = " balloghndl Application Log: Log Handle
EXCEPTIONS
LOG_NOT_FOUND = 1 " Log Not Found
MSG_INCONSISTENT = 2 " Message Not Consistent
LOG_IS_FULL = 3 " Log Is Full
MSG_NOT_STORED = 4 " Message Not Saved
MSG_STORE_NOT_ALLOWED = 5 " Message Cannot Be Saved Because Log Already Saved
SEVERE_ERROR = 6 " Critical Error
. " MESSAGE_STORE_WITH_DISPLAY
The ABAP code below is a full code listing to execute function module MESSAGE_STORE_WITH_DISPLAY 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_c_detlevel) = some text here
DATA(ld_c_log_handle) = 'Check type of data required'.
DATA(ld_percentage) = 'some text here'.
DATA(ld_arbgb) = some text here
DATA(ld_exception_if_not_active) = 'some text here'.
DATA(ld_msgty) = some text here
DATA(ld_msgv1) = some text here
DATA(ld_msgv2) = some text here
DATA(ld_msgv3) = some text here
DATA(ld_msgv4) = some text here
DATA(ld_txtnr) = 'some text here'.
DATA(ld_timecondition) = 'some text here'.
DATA(ld_xdialog) = 'Check type of data required'.
DATA(ld_xbatch) = 'Check type of data required'.
DATA(ld_context) = 'Check type of data required'.
DATA(ld_params) = 'Check type of data required'. . CALL FUNCTION 'MESSAGE_STORE_WITH_DISPLAY' EXPORTING * percentage = ld_percentage arbgb = ld_arbgb * exception_if_not_active = ld_exception_if_not_active msgty = ld_msgty * msgv1 = ld_msgv1 * msgv2 = ld_msgv2 * msgv3 = ld_msgv3 * msgv4 = ld_msgv4 txtnr = ld_txtnr * timecondition = ld_timecondition * xdialog = ld_xdialog * xbatch = ld_xbatch * context = ld_context * params = ld_params * CHANGING * c_detlevel = ld_c_detlevel * c_log_handle = ld_c_log_handle EXCEPTIONS LOG_NOT_FOUND = 1 MSG_INCONSISTENT = 2 LOG_IS_FULL = 3 MSG_NOT_STORED = 4 MSG_STORE_NOT_ALLOWED = 5 SEVERE_ERROR = 6 . " MESSAGE_STORE_WITH_DISPLAY
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 ENDIF.
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_c_detlevel | TYPE BAL_S_MSG-DETLEVEL , |
| ld_percentage | TYPE STRING , |
| ld_c_log_handle | TYPE BALLOGHNDL , |
| ld_arbgb | TYPE SMESG-ARBGB , |
| ld_exception_if_not_active | TYPE STRING , |
| ld_msgty | TYPE SMESG-MSGTY , |
| ld_msgv1 | TYPE SMESG-MSGV1 , |
| ld_msgv2 | TYPE SMESG-MSGV2 , |
| ld_msgv3 | TYPE SMESG-MSGV3 , |
| ld_msgv4 | TYPE SMESG-MSGV4 , |
| ld_txtnr | TYPE STRING , |
| ld_timecondition | TYPE STRING , |
| ld_xdialog | TYPE BOOLEAN , |
| ld_xbatch | TYPE BOOLEAN , |
| ld_context | TYPE BAL_S_CONT , |
| ld_params | TYPE BAL_S_PARM . |
The function module collects messages in a log and takes care of message
display in dialog programs.
...See here for full SAP fm documentation
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 MESSAGE_STORE_WITH_DISPLAY or its description.
MESSAGE_STORE_WITH_DISPLAY - Couples SAPGUI_PROGRESS_INDICATOR, MESSAGE* and Batch Messages MESSAGE_STORE_ON_DB - MESSAGE_STORE - Store transferred message or output directly MESSAGE_SET_DEFAULTLINE - Store default line and heading for the following messages MESSAGE_SET_AND_CONVERT - MESSAGE_SET_ACTIVE -