‎2007 May 23 1:34 PM
Hi,
I would like to pop-up an warning message 'Move the Transport' along with an input field for them to answer yes or no.
If yes the transport will move to destination. If no then allow the user to edit the request before again saving.
Anybody will pls tell me how to do the coding for this??
‎2007 May 23 1:37 PM
Hi Neha,
FM POPUP_TO_CONFIRM
There are others, but this is the standard one. You can do a search on FM that start with POPUP to find others.
Best regards,
ok
‎2007 May 23 1:40 PM
Hi,
U can use Function Module " popup_to_confirm".
and implement the ogic.
Revert back if any issues,
Reward with points if helpful.
Regards,
Naveen
‎2007 May 23 1:47 PM
Hi,
Thanks for your quick response.
Could you please tell me with example what are the necessary parameter I need to pass & how??
‎2007 May 23 1:50 PM
Just do a usage lookup. It's heavily used in R/3.
Some examples:
call function 'POPUP_TO_CONFIRM'
exporting
titlebar = text-t01
text_question = l_question
text_button_1 = 'Ja'(006)
icon_button_1 = ' '
text_button_2 = 'Nein'(007)
icon_button_2 = ' '
default_button = '1'
importing
answer = l_answer.
if l_answer = 'A'.
set screen sy-dynnr.
leave screen.
elseif l_answer = '2'.
set screen 0.
leave screen.
endif.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = TEXT-001
DIAGNOSE_OBJECT = 'PARAMETER_SAVE_QUESTION'
TEXT_QUESTION = 'Do you want to save?'(004)
TEXT_BUTTON_1 = 'Yes'(002)
ICON_BUTTON_1 = 'ICON_OKAY'
TEXT_BUTTON_2 = 'No'(003)
* ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
IMPORTING
ANSWER = ANSWER
TABLES
PARAMETER = PARM_TABLE
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
IF ANSWER = '1'.
OKCODE = 'YES'.
ELSEIF ANSWER = '2'.
OKCODE = 'NO'.
ELSE.
OKCODE = 'CANC'.
ENDIF.
Best regards,
ok
‎2007 May 23 1:51 PM
data : v_text(100).
data : ans(1).
concatenate 'Do you really move the transport ' <field> '?' into v_text.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Move the Transport'
TEXT_QUESTION = v_text
TEXT_BUTTON_1 = 'Yes'
ICON_BUTTON_1 = ' ' "Give appropriate icon
TEXT_BUTTON_2 = 'No'
ICON_BUTTON_2 = ' ' "Give appropriate icon
START_COLUMN = 25
START_ROW = 6
IMPORTING
ANSWER = ans.
if ans = '1'.
write : / 'Yes'.
else.
write : / 'No'.
endif.
Hope its useful !!
Regards,
Gaurav