10-29-2013 11:30 AM
Hello there,
I have a report where I would like to inform the user of some open events (taken from DB) and then ask him if he'd like to continue.
My code new is something like this:
SELECT ... INTO TABLE lt_events WHERE.... "my data
DATA newline TYPE string
newline = cl_abap_conv_in_ce=>uccp( '0d0a' ) "new line code
lv_question = 'Attention! there are some open events'.
CONCATENATE lv_question newline INTO lv_question.
LOOP AT lt_events INTO ls_events.
CONCATENATE lv_question newline ls_events-string INTO lv_question.
ENDLOOP.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'open events'
text_question = lv_question
...
.....
...
But when the popup appears in the screen everything is close to each other and without the new lines
How can I make the new lines appear in the popup??
Thanks
10-29-2013 11:45 AM
Hi Daniel,
Try to use CL_ABAP_CHAR_UTILITIES=>NEWLINE or NEW-LINE word.
Hope it will work.
Regards
10-29-2013 11:45 AM
Hi Daniel,
Try to use CL_ABAP_CHAR_UTILITIES=>NEWLINE or NEW-LINE word.
Hope it will work.
Regards
10-29-2013 12:02 PM
10-29-2013 12:14 PM
use below code.. Please find screenshot for more details.
DATA: w_param5 TYPE spar,
answer TYPE char1,
i_parameters5 TYPE STANDARD TABLE OF spar,
w_text_q5 TYPE string.
MOVE 'hai first line' TO w_param5-value.
MOVE 'TEXT1' TO w_param5-param.
APPEND w_param5 TO i_parameters5.
CONCATENATE 'hai second line'
' '
INTO
w_text_q5.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'WARNING !'
diagnose_object = 'ZDIAGNOSE_OBJECT'
text_question = w_text_q5
IMPORTING
answer = answer
TABLES
parameter = i_parameters5
EXCEPTIONS
text_not_found = 1
diagnose_object = 'ZDIAGNOSE_OBJECT' -> you have to create through SE61
10-29-2013 12:17 PM
10-30-2013 6:43 AM
10-29-2013 12:12 PM
Apparently this isn't possible with popup_to_confirm.
Check this discussion and maybe use some other function:
10-29-2013 3:29 PM
Hi Daniel,
ever considered something like this with a nice ALV popup?
DATA lt_message TYPE STANDARD TABLE OF char255.
DATA lo_alv TYPE REF TO cl_salv_table.
DATA lv_line TYPE char255.
lv_line = 'This is the first piece'.
INSERT lv_line INTO TABLE lt_message.
lv_line = 'This the second'.
INSERT lv_line INTO TABLE lt_message.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = lt_message ).
CATCH cx_salv_msg.
MESSAGE e398(00) WITH 'Technical error occured'.
ENDTRY.
lo_alv->set_screen_popup( start_column = 5 end_column = 90 start_line = 5 end_line = 25 ).
lo_alv->display( ).
IF sy-ucomm EQ '&ONT'.
* Define your action when closed with green check'
ENDIF.
Best,
Sander
10-30-2013 6:14 AM
Sander,
Really close to what I need, BUT:
1) I don't need a table view, just multiple lines
2) I need two buttons, OK and CANCEL
10-30-2013 10:53 AM
is this what they call a big but?
I think you can add the buttons to the ALV - that's one.
And table view / multiple lines, is a matter of taste / being pragmatic.
The solution Modadugu provided works for an 'infinite' number of lines?
Best,
Sander