‎2008 Jun 16 9:57 AM
hi frnds,
my requirement is in my screen i hve a popupbox.In pop up i have 3 pushbuttons.YES,NO,and CANCEL.
if i click yes pushbuttons i have to display dialog box..
were to write code for pop up button.
eg.
pai...
case sy-ucomm.
when save.
call popup_to _confirm.
when 'yes'.
can i call my dialog box. here
‎2008 Jun 16 10:34 AM
try this code with function module
'FI_WT_POPUP_TO_CONFIRM_STEP'
data answer.
call function 'FI_WT_POPUP_TO_CONFIRM_STEP'
exporting
defaultoption = 'N'
textline1 = 'something'
titel = 'something'
importing
answer = answer.
if answer = 'J'.
"do something
else.
"do something
endif.
‎2008 Jun 16 10:36 AM
Hello.
First of all, your pop-up can be a screen. Create a screen of type modal screen (Attributes->Screen Type->Modal Dialog Box). This screen will have prepares the buttons, accept, reject and cancel.
In your program, module user_command, when ok_code is 'YES', just call this screen.
This is more robust than calling a popup FM.
Regards.
Valter Oliveira.
‎2008 Jun 16 2:52 PM
Hi,
Chk this.
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'
start_column = 25
start_row = 6
IMPORTING
answer = v_ans
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.
Regards
Sandeep Reddy
‎2008 Jun 16 2:53 PM
Hi,
chk this.
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.
Regards
Sandeep Reddy
‎2008 Jun 16 6:37 PM
Hi Tumma,
Create a modal dialog screen first. Let the created screen number be 0002.And the icon name as YES.In the PAI of the screen where you have kept the YES,NO,CANCEL buttons, write the code as:
Case SY-UCOMM.
When 'YES'.
Call screen '0002'.
EndCase.Reward points if helpful.
thanks,
Khan.
‎2008 Jun 17 5:54 AM
Hello,
U can do this after calling FM popup_to_confirm
As the output of this function module is stored in sequence of button i.e. 'Yes' is first button then output l_ans will be ' 1 ' similarly for 'No' its ' 2 ' and for 'Cancel' its ' 3 '
Your dialog screen is also a screen, so will creating this dialog screen just click on modal dialog screen radio button on screen button. Here it is necessary to pass top left and bottom right coordinate to call csreen.
U can write following code:
IF l_ans EQ ' 1'.CALL SCREEN <screen> STARTING AT <top left>
ENDING AT <bottom right>.ELSE.LEAVE PROGRAM.ENDIF.
Reward if useful.
‎2010 Nov 30 6:21 AM