11-01-2007 3:26 PM
Hi all,
My requirement is to display a popup with a text area in editable mode, 'Confirm' and 'Cancel' button. If the user changes the text, and presses the 'CONFIRM' the text is to be saved in DB.
How do i implement this? Should i use a FM or modal dialog box?
11-01-2007 3:49 PM
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = l_title
text_question = l_message
TEXT_BUTTON_1 = 'Confirm'
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
IMPORTING
ANSWER = l_answer
Case l_answer
when 1. " Confirm
use SAVE_TEXT to save your text
when 'A'. " Cancle
endcase.
Regards,
Naimesh Patel
11-01-2007 4:35 PM
Naimesh,
The popup is to contain a text area/control too in which the user can edit the text... The confirm popup wont work here.
Thanks.
11-02-2007 1:37 AM
I'd build the popup dialog dynpro inside a function module so that you can use it from other places... of course where / if you store it depends on on your need - I'd actually suggest building the function module to just return the edited text to the calling program, and then allow the caller to decide where and when to persist it (e.g. so it can synchronise the text save with other database writes)...
If you want an example bit of code to look at try function SGOS_NOTE_CREATE_DIALOG.
Jonathan