2009 May 28 9:03 AM
Hi there. Maybe You have encountered such a popup window in which I could display informations:
1) Question text, sth like... "You hadn't saved Your changes. Do You wish to save them now?"
2) list of changes (list contains 1-10 items), sth like ...
- change 1
- change 2
- change 3 ...
3) YES/NO button to decide if user wants to save or not
At this moment I'm thinking of creating a Z-FModule... but of course I'd prefere to use standard Greetings. P.
2009 May 28 9:09 AM
2009 May 28 9:07 AM
Hi,
All these options are available with the standad FM POPUP_TO_CONFIRM.
Please read the documentation on the same.
The relevant exampples can be found in report RSSPO120.
Regards,
Ankur Parab
2009 May 28 9:09 AM
2009 May 28 9:14 AM
Try This:
DATA: ANSWER(150),
VA_ANS.
ANSWER = 'You hadnt saved Your changes. Do You wish to save them now?'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Changes'
TEXT_QUESTION = ANSWER
TEXT_BUTTON_1 = 'YES'
ICON_BUTTON_1 = 'ICON_OKAY'
TEXT_BUTTON_2 = 'NO'
ICON_BUTTON_2 = 'ICON_CANCEL'
DEFAULT_BUTTON = '2'
DISPLAY_CANCEL_BUTTON = ''
IV_QUICKINFO_BUTTON_1 = 'YES'
IV_QUICKINFO_BUTTON_2 = 'NO'
IMPORTING
ANSWER = VA_ANS.
IF VA_ANS = '1'.
...
STOP.
ELSEIF VA_ANS = '2'.
...
STOP.
ENDIF.
Regards.
Angelo Abbascia.
2009 May 28 9:15 AM
Hi Piotr,
Try this:
DATA: choice TYPE char64,
l_list TYPE TABLE OF LISTE,
l_str TYPE LISTE.
l_str-zeile = 'Test 1..' .
append l_str to l_list.
l_str-zeile = 'Test 2..' .
append l_str to l_list.
CALL FUNCTION 'POPUP_WITH_TABLE'
EXPORTING
ENDPOS_COL = 70
ENDPOS_ROW = 10
STARTPOS_COL = 6
STARTPOS_ROW = 10
TITLETEXT = 'Title'
IMPORTING
CHOICE = choice
TABLES
VALUETAB = l_list
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
George
2009 May 28 9:16 AM
Hi,
Try using the following function module that could possibly serve your purpose.
data: ans(1) type C.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Confirm Data Loss'
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'Do you want to save your data?'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
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 = ans
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
case ans.
when '1'.
PERFORM SAVE_DATA.
LEAVE PROGRAM.
WHEN '2'.
LEAVE PROGRAM.
WHEN 'A'.
MESSAGE s000(su) WITH 'Action cancelled by the user'.
ENDCASE.
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2009 May 28 9:17 AM
hi
try this FM
data : wk_answer.
call function 'POPUP_TO_CONFIRM_STEP'
exporting
defaultoption = 'Y'
textline1 = 'Do you wish to exit'(004)
textline2 = 'Confirm?'(005)
titel = 'Exit Processing'(006)
start_column = 25
start_row = 6
cancel_display = 'X'
importing
answer = wk_answer.
case wk_answer.
when 'J'.
leave program.
endcase.
Regards
2009 May 28 9:36 AM
hi,
try this
call function 'POPUP_TO_CONFIRM'
exporting
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = l_question
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 =
importing
answer = l_answer
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
if ( l_answer = '1' ).
write code for saving data
exit.
elseif ( l_answer = '2' ).
exit.
endif.
Hope this solves
2009 Jun 02 2:54 PM
Finally I copied POPUP_TO_CONFIRM to ZPOPUP_TO_CONFIRM and did modifications to fit my requirements.
Thanks for tips! Greetings.