03-22-2010 8:29 AM
hi all,
i am giving a text in the pop up to confirm dialog box.after the message text, i am giving "do you want to continue"
is it possible to put the "Do you want to continue in a new line ".If so can you please tell me how.
The text which i give in the pop up is not constant.
03-22-2010 8:34 AM
Use
POPUP_TO_CONFIRM FM and in that pass the text you want to pass...
03-22-2010 9:19 AM
If you want to display more than 1 lines
you can use COPO_POPUP_TO_GOON.
As for the changing text, try chaning in the code and then pass the values to the FM
Hope it jhelps,
Raj
03-22-2010 9:27 AM
Hi,
you cn do it like this.
l_msg = 'Do you want to continue in new line' " your text
call function 'POPUP_TO_CONFIRM'
exporting
titlebar = l_msg
text_question = p_w_conf_msg
text_button_1 = 'Yes'(002)
text_button_2 = 'No'(005)
default_button = '1'
display_cancel_button = ''
importing
answer = p_wa_answer.
hope this helps
thanks
tanmaya
03-23-2010 12:53 PM
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Title POPUP_TO_CONFIRM'
TEXT_QUESTION = 'Click Cancel to Exit'
TEXT_BUTTON_1 = 'OK'
ICON_BUTTON_1 = 'ICON_CHECKED'
TEXT_BUTTON_2 = 'CANCEL'
ICON_BUTTON_2 = 'ICON_CANCEL'
DISPLAY_CANCEL_BUTTON = ' '
POPUP_TYPE = 'ICON_MESSAGE_ERROR'
IMPORTING
ANSWER = ANS.
IF ANS = 2.
LEAVE PROGRAM.
ENDIF.
03-23-2010 12:59 PM
I dont know which version of SAP you are using, but if i am not mistaken from ECC5.0 SAP advises to use only POPUP_TO_CONFIRM.
06-02-2022 1:10 PM
03-23-2010 12:56 PM
CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_VALUE'
EXPORTING
DEFAULTOPTION = 'Y'
OBJECTVALUE = '10000000'
TEXT_AFTER = 'This is after the value '
TEXT_BEFORE = 'This is before the value '
TITEL = 'Title POPUP_TO_CONFIRM_WITH_VALUE'
START_COLUMN = 25
START_ROW = 6
*----for the display of cancel button do like this.
CANCEL_DISPLAY = ' '
IMPORTING
ANSWER = ANS
EXCEPTIONS
TEXT_TOO_LONG = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF ANS = 'J' .
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Information'
TXT1 = 'You have pressed Yes'
TXT2 = ' '
TXT3 = ' '
TXT4 = ' '.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
TITEL = 'Information'
TXT1 = 'You have pressed No'
TXT2 = ' '
TXT3 = ' '
TXT4 = ' '.
ENDIF.
03-23-2010 12:56 PM
CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'
EXPORTING
DEFAULTOPTION = 'Y'
DIAGNOSETEXT1 = 'This is Testing'
DIAGNOSETEXT2 = ' '
DIAGNOSETEXT3 = ' '
TEXTLINE1 = 'Do You want to Exit'
TEXTLINE2 = ' '
TITEL = 'POPUP_TO_CONFIRM_WITH_MESSAGE'
START_COLUMN = 25
START_ROW = 6
*----for the display of cancel button do like this.
CANCEL_DISPLAY = ' '
IMPORTING
ANSWER = ANS
.
IF ANS = 'J' .
*---put code on selecting yes
ELSE.
*---put code on selecting no
ENDIF.
03-23-2010 1:03 PM
03-23-2010 1:09 PM
Well even i was trying to have a new line with popup_to_confirm. I tried concatenating with cl_abap_char_utilities=>newline and cr_lf but dint make a difference in the popup message.
03-23-2010 2:52 PM
I think the same thing has been discussed a few times in the forum & i dont think that we have any alternative way of doing this using POPUP_TO_CONFIRM.
Will be happy if someone can provide a suitable alternative to this.
Cheers,
Suhas
12-05-2013 12:27 AM