2008 May 13 3:51 AM
Hello ABAPers,
I want to know how to trigger a message box like, when i am clicking cancel in my screen in the message box my message should be like "DATA WILL LOST DO YOU WANT TO CONTINUE in tabs YES or NO". If yes out fo screen NO stay in the same screen.
Can anyone help me with this.
Thks
Hello ABAPers,
I want to know how to trigger a message box like, when i am clicking cancel in my screen in the message box my message should be like "DATA WILL LOST DO YOU WANT TO CONTINUE in tabs YES or NO". If yes out fo screen NO stay in the same screen.
Can anyone help me with this.
Thks
2008 May 13 3:53 AM
Use any of the POPUP Fm for the same.
In SE37 give POPUP* to get them.
I think POPUP_TO_CONFIRM will help you.
2008 May 13 4:00 AM
Hello Thks for responding to my query, i have used this FM and even i have tried with CHAIN and ENDCHAIN keywords but i am unable to get the message popup i think i am going wrong in my coding part if it is possible can you give me the write coding part syntax or any example i will be more happy.
Thks
2008 May 13 4:04 AM
Just debug and check after Clicking CANCEL whic part of the PAI is hit first and call this FM there.
2008 May 13 4:15 AM
Hi Amit,
After calling the POPUP_TO_CONFIRM FM in my program wht are all the parameters i have to consider like EXPORTING ....can you tell me the right parameters wht i have to give in POPUP_TO_CONFIRM FM .
Thks
2008 May 13 4:21 AM
2008 May 13 4:53 AM
If you look in SE83 (ABAP Reuse Library) there is a section under Standard Dialogs on Confirmation Prompts - this includes an example of POPUP_TO_CONFIRM_LOSS_OF_DATA which sounds like the functionality you want (demo code in RSSPO100).
Jonathan
2008 May 13 5:32 AM
Hello my code is like,
call function 'POPUP_TO_CONFIRM'
exporting
titlebar = 'WARNING MESSAGE'
DIAGNOSE_OBJECT = ' '
text_question = 'DO YOU WANT TO CONTINUE'
text_button_1 = 'YES'(001)
ICON_BUTTON_1 = ' '
text_button_2 = 'NO'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
answer = i_ans
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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 i_ans = 1.
leave program.
elseif i_ans = 2.
call screen 100.
endif.
But pop up is box is not coming..please any modifications tht i have to do please can you tell me.
2008 May 13 5:41 AM
My first suggestion would be to add a "break-point." just before the "call function" to ensure you are actually reaching that point in the code.
Jonathan
2008 May 13 12:49 PM
Hi Venkat,
Try this one, simple copy and paste.
&----
*& Report ZT
*&
&----
*&
*&
&----
REPORT ZT.
data : ians(100) type c.
PARAMETER : V1 LIKE KONV-KWERT.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Message by CMC Limited.'
text_question ='DO YOU WANT TO CONTINUE'
TEXT_BUTTON_1 = 'YES'(001)
ICON_BUTTON_1 = ''
TEXT_BUTTON_2 = 'NO'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
IMPORTING
ANSWER = ians
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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 ians = 2.
leave program.
elseif ians = 1.
WRITE : 'HELLO'.
endif.
with Regards,
Gulrez Alam
2008 May 13 5:01 PM
Hi,
You can use this.
Hope this will reach your requirement.
DATA : V_TEXT TYPE STRING.
V_TEXT = 'DATA WILL LOST DO YOU WANT TO CONTINUE'.
CASE SY-UCOMM.
WHEN 'CANCEL'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = TEXT-000
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = V_TEXT
TEXT_BUTTON_1 = 'YES'
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'NO'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
ANSWER = V_ANS
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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.
CASE V_ANS.
WHEN '1'.
LEAVE PROGRAM.
WHEN '2'.
CALL SCREEN 100.
WHEN OTHERS.
CALL SCREEN 100.
ENDCASE.
ENDCASE.
Here 100 is your present screen.
Regards
Sandeep Reddy
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |