2015 Apr 08 7:46 PM
Hi,
I want to display all error messages into popup. I have used FB_MESSAGES_DISPLAY_POPUP for display the messages into popup.
But the issue is when the message size exceeded to specific length, window width size remains same and user are not able to see the message at same popup.
Please find the attached screenshot.
Thanks
Swapnil
2015 Apr 09 6:32 AM
2015 Apr 09 6:39 AM
Hi,
You can use RMSL325_DISPLAY_MSG_POPUP FM.
In Import parameter IT_MESSAGE table, Contains on MESSAGE field, where you can pass 220 characters.
Regards,
Praveer.
2015 Apr 09 7:15 AM
Dear,
To display a long text message, Create message as you want and then go to Transaction code se91.
There open your message and click on long text to enter long text editor.
Once inside the editor, use Edit -> Command -> Insert Command -> Symbols, you can enter placeholder variables like &V1&, &V2& there.
Once you will see your message using something like MESSAGE Wxxx WITH 'msg1' 'msg2', then &V1& will be replaced by TEST1, &V2& by TEST2 etc in the long text that you get by double clicking the message in the status bar.
Meas you can see the message, as standard messages are shown.User will double click on message on status bar then a pop up will comes up and user can see the full message text.
Regards,
Ajit
2015 Apr 09 8:06 AM
Hi Swapnil,
You can use the following code, if it works for you.
"'Fetch error messages into a vaiable
DATA: lv_msg TYPE string.
MESSAGE e<msg_number>(<msg_class>) INTO lv_msg.
MESSAGE lv_msg TYPE 'E' DISPLAY LIKE 'A'
Thanks & Regards
Richa.
2015 Apr 09 8:55 AM
Hello Swapnil,
I think its better to use the application log to display the messages
Refer to SBAL* programs in SE38 for reference. SBAL_DEMO_01
Func Module CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
Regards
Sandy
2015 Apr 09 9:42 AM
I checked ajit's solution it will work for your requirement. But if you specifically want to show popup message then I guess it will not work.
2015 Apr 10 6:32 AM
Dear Aarti,
As you said " If you specifically want to show popup mwg", May I know what exactly you want ?
Regards,
Ajit Sarangi
2015 Apr 09 10:57 AM
The basic function module for popup messages is POPUP_TO_CONFIRM. This function satisfies most needs.
There are others but they are labelled by SAP as obsolete, not to be used. You can find them in the same function group SPO1. Many others, like the ones mentioned above are variations that usually call POPUP_TO_CONFIRM (or an obsolete one).
The module has its own documentation.
Look throughout SDN you will find more information. (General list of popup FMs).
SAP online help also has information on these functions.
2015 Apr 10 12:55 PM
Hi.
You can use FM 'WCB_DISPLAY_ERROR_POPUP' to display error message. You can add message up to 255 character and also scrolling functionality is available in Popup box.
2015 Apr 10 2:09 PM
Hi Swapnil,
try to use a simple SALV Popup. Here it is a code sample:
TYPES:
BEGIN OF ys_log,
icon TYPE c LENGTH 40,
message TYPE c LENGTH 200,
END OF ys_log.
" Variáveis locais
DATA:
ls_log TYPE ys_log,
lt_log TYPE TABLE OF ys_log,
lr_table TYPE REF TO cl_salv_table,
lr_display TYPE REF TO cl_salv_display_settings,
lr_columns TYPE REF TO cl_salv_columns,
lr_column TYPE REF TO cl_salv_column.
" Sample data
CLEAR ls_log.
ls_log-icon = icon_led_green.
ls_log-message = 'Status OK'.
APPEND ls_log TO lt_log.
CLEAR ls_log.
ls_log-icon = icon_led_red.
ls_log-message = 'Erros'.
APPEND ls_log TO lt_log.
" Create ALV table
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lr_table
CHANGING
t_table = lt_log ).
CATCH cx_salv_msg.
ENDTRY.
lr_display = lr_table->get_display_settings( ).
lr_display->set_list_header( 'Error Log' ).
" Set columns
lr_columns = lr_table->get_columns( ).
lr_columns->set_optimize( 'X' ).
" Change Texts if needes
TRY.
lr_column = lr_columns->get_column( 'ICON' ).
lr_column->set_short_text( 'Status' ).
CATCH cx_salv_not_found.
ENDTRY.
TRY.
lr_column = lr_columns->get_column( 'MESSAGE' ).
lr_column->set_short_text( 'Message' ).
CATCH cx_salv_not_found.
ENDTRY.
" Set a Popup
lr_table->set_screen_popup(
start_column = 1
end_column = 50
start_line = 1
end_line = 10 ).
" Show ALV
lr_table->display( ).
Regards,
Frisoni