Pop to confirm fm
Hi to all experts,
my requirement is download a file at the application server with the physical inventory document no
for example the 123149394.txt that i have done if the already exist then i have to give a message to the user that the file already exist , for that i have used the fm POPUP_WITH_2_BUTTONS_TO_CHOOSE yes or no (2 buttons) but the problem know is that if there are 1000 files than the users have to click 1000 times yes or no . I have display all the files at once and ask user just once for yes or no
here is my code please can u help me with this requirement.
LOOP AT it_output INTO wa_output.
CONCATENATE wa_output-iblnr 'txt' INTO f_filename SEPARATED BY '.'.
CONCATENATE p_file '\' wa_output-iblnr '.txt' INTO fname.
*checking whether file exist already in the directory
READ TABLE it_filelist INTO wa_filelist
WITH KEY name = f_filename BINARY SEARCH.
IF sy-subrc EQ 0.
* if the file already exist giving message.
PERFORM popup_to_confirm.
IF gc_answer EQ '1'.
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
PERFORM transfer_file.
ELSE.
CONTINUE.
ENDIF.
ELSE.
OPEN DATASET fname FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc EQ 0.
PERFORM transfer_file.
ENDIF.
ENDIF.
CLOSE DATASET fname.
CLEAR: wa_output,f_filename, wa_filelist,gc_answer.
ENDLOOP.
FORM popup_to_confirm .
CALL FUNCTION 'POPUP_WITH_2_BUTTONS_TO_CHOOSE'
EXPORTING
DEFAULTOPTION = '1'
diagnosetext1 = text-005
DIAGNOSETEXT2 = 'Enter Yes Or NO'
DIAGNOSETEXT3 = 'YES'
textline1 = 'Enter Yes Or NO'
TEXTLINE2 = ' '
TEXTLINE3 = ' '
text_option1 = 'YES'
text_option2 = 'NO'
titel = 'FILE ALREADY EXIST DO WANT TO CONTINUE'
IMPORTING
answer = gc_answer
ENDFORM. " popup_to_confirm
*& Form delimit_file
FORM transfer_file .
DATA: output TYPE string.
CONCATENATE wa_output-iblnr
wa_output-zeili
wa_output-matnr
wa_output-werks
wa_output-lgort
wa_output-bstar
wa_output-erfme
wa_output-maktx
wa_output-lgpbe
INTO output SEPARATED BY '|'.
transfering the file contents to the
TRANSFER output TO fname .
ENDFORM.
Hi,
just some modifications made...see if this helps u...
changed the structure of the internal table it_output as
data: begin of it_output,
flg type c.
end of it_output.
added one more field as flg.
LOOP AT it_output INTO wa_output.
CONCATENATE wa_output-iblnr 'txt' INTO f_filename SEPARATED BY '.'.
CONCATENATE p_file '\' wa_output-iblnr '.txt' INTO fname.
*checking whether file exist already in the directory
READ TABLE it_filelist INTO wa_filelist
WITH KEY name = f_filename BINARY SEARCH.
IF sy-subrc EQ 0.
if the file already exist giving message.
PERFORM popup_to_confirm. --->comment this and just give wa_output-flg = 'X'.
ELSE.
OPEN DATASET fname FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc EQ 0.
PERFORM transfer_file.
ENDIF.
ENDIF.
CLOSE DATASET fname.
modify it_output with wa_output transporting flg.-->add this line
CLEAR: wa_output,f_filename, wa_filelist,gc_answer.
ENDLOOP.
loop at it_output into wa_output where flg is not initial.
PERFORM popup_to_confirm
IF gc_answer EQ '1'.
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
PERFORM transfer_file.
ELSE.
CONTINUE.
ENDIF.
endloop.--->so now the popup will be called for those entries for which the filename already exists
Keerthi
Edited by: Keerthy K on Mar 5, 2009 5:29 AM
Similar Messages
-
Urgent : Issue with Pop to confirm
l_popup = l_window_manager->create_popup_to_confirm(
text = str_table
button_kind = 1
message_type = 1
close_button = 'X'
window_title = 'Confirmation'
window_position = if_wd_window=>co_center ).
Here is my code to show pop to confirm screen. I want OK pop up so i used the value "1" for button_kind parameter but i get this runtime error saying
"No Button 7 Is Defined for Popup POPUP_TO_CONFIRM"
even after passing the value as 1 iam not able figure out why the system is taking the valye as 7. can someone please give me an immediate solution for this.
Thanks,
SuriHi,
i tried with same thing in m y system and it is working .
Do one thing :
<b>Check the fixed values in the domain of WDR_POPUP_BUTTON_KIND.</b>
whether 1 is defined for ok.
Madhu -
PCUI Pop up Confirmation during save event
Hi,
I would like to implement a confirmation pop up at tthe time of save. the user may
choose to proceed with the save or cancel save.
I have implemented in the following fashion but apparently it does not refresh the data on the PCUI page.
1. CHECK_BEFORE_SAVE - Raise Information Message. Set Flag not to save.
2. SAVE - Check if flag is set not to save, return error code. and do not continue with save.
3. GET_MESSAGES - Add the messages to rt_applog (Message is configured for navigation)
4. PROCESS_EVENT - Process for the pop up events 'Yes' and 'No'.
'Yes' event will call the save method after initializing do not save flag. 'No' with exit.
Please recommend correct way to implement a pop-up confirmation during save event.
Thanks
ShyamHi,
This pop up is related to the WorkProtect mode,
It will be configured in the portal,
There will be 3 options available
if Workprotect mode is 0--- then navigate automatically
1-- pop up and then navigate
2- navigate with out saving.
i'm not sure about the values.
WorkProtect mode can be seen in the personalize link and this link is available if eu_role is assigned to the corresponding user.
Please contact portal admin team regarding this.
Anilkumar -
Submit form with pop up confirmation?
Is it possible to have a form submit but just have a pop up confirmation or just replace the form with a conformation instead of going to a new page?
Ajax Form submission Brad
http://forums.adobe.com/docs/DOC-1749
Just a note, this currently has a total limit of 1024 characters through the JSON submission which is all the data. So it can not be overly big forms and messages. -
Screen x,y control of a simple pop-up Confirm mini-window. Possible?
Is it possible to control where on the screen an small confirm pop-up window will appear?
I want not to appear in the middle but next to the right screen side.
Do I need to build it and not use the default confirm window?You would need to create your own window, as an example...
var w = new Window('dialog','Test');
var tmp =$.screens.toString().split('-');
var screenSize=tmp[1].toString().split(':');
var windowWidth = 300; //adjust to suit
w.frameLocation=[Number(screenSize[0])-windowWidth,Number(screenSize[1])/2];
w.t1 = w.add('statictext',undefined,"This is a test");
w.bu1 = w.add('button',undefined,'Cancel');
w.show();
This will create a window with the top of the window half way down the sceen, and to the right of the screen. The only problem is you have to enter a fixed number for the width of the window (var windowWidth = 300;) -
I would like to have my form be able to delete a database
entry by clicking
a button. Easy enough.
However, I want to make sure that it isn't done by accident.
Can someone point me to information on how to create a
javascript pop up to
confirm the action prior to it executing?
If a member where to click the remove client button, I would
like a
JavaScript window to pop up and ask "Are you sure?"
If the use clicks yes, it will run the REMOVE sql query on
the page, if they
click no, it will just close the window and nothing will
happen.
Thanks
Wally Kolcz
Developer / SupportI found many examples of JavaScript confirm popups, but I
don't know how to
edit it to do what I want. I have this and, except that it
wants to leave
the site, works fine. How can I edit this so it either goes
to the right
part of the web site (the delete sol block) or runs the
delete block inside
of it? Thanks!
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("Remove client?")
if (answer){
alert("Client has been removed.")
window.location = "
http://www.google.com/";
else{
alert("Client has not been removed.")
//-->
</script>
Wally Kolcz
Developer / Support -
ABAP: pop up confirmation
Hello,
I have a DELETE button on a screen. When a user clicks on it a pop up window comes up asking to confirm the action.
If the user clicks NO - abort deletion, YES - delete.
How do I define whether to procede with the action or to abort?
Thank you.Hi Maksim,
Thanks for your help.
When I pass an action name to action_name parameter this assumes that the action has already been created.
However, to create an action I need to bind it to an element during design time. Therefore, what is the best way to achieve this?
One solution that I see is to create a dummy invisible button and bind needed action to it.
Would it be a good way to solve the problem?
Thank you. -
Hi there,
I created a ADD WD application, but I would like then click the button SAVE CHANGES will appears a POPUP "DATA SAVED!"
How can I do this?Hi,
Use a code similar to that given below: Hope this helps.
data:
api_component type ref to if_wd_component,
window_manager type ref to if_wd_window_manager,
window type ref to if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_popup_to_confirm(
text = 'DATA SAVED'
button_kind = if_wd_window=>CO_BUTTONS_NONE "no buttons"
message_type = if_wd_window=>CO_MSG_TYPE_INFORMATION
window_title = 'INFORMATION'
window_position = if_wd_window=>co_center ).
window->open( ).
Regards,
Wenonah -
Pop up message for confirmation in standard bsp on approve button
Dear friends
I am supposed to put one pop up confirmation message in 'hap_document' bsp application on approve button, this is MVC frame based application and used to show appraisal details. I have check with the event handlers, but is structured dynamically. I have put a break point at various places. but from the portal when i m running the application it doesnt go into debugger..
Please give me some ideas how to debug this application and how i will know the place where i need to do the coding for the pop-up confirmation message.. any help of yours will be greatly appreciated
thanking you
Regards
NaeemDear Naim Khan S Babi,
Different controllers, views and BSP pages are availabe withing the application.
You just keep the debug on the on the main methods like, DO_INIT, DO_REQUEST and DO_HANDLE_EVENT. So that you easily find where your application navigates.
Hope this will be helpful.
Regards,
Gokul.N -
Getting a reply from a pop up to confirm
Hi.
I was giving a popup to the user to confirm something using create_popup_to_confirm of the window manager.
Now, problem is I coded it in one method of the view.
I want to call this popup method now at different user interaction stages of the view - for eg loss of data, confirm save, confirm send mail etc. So I'd call this popup with different question text preferably.
Problem is that what I understand is that I have to subscribe to YES/NO event, and I can handle them at the YES/NO event handler only.
But I want to do different things based on from where the action was triggered.
For eg. If user pressed cancel without saving, after the popup i want to navigate to the start menu. If user pressed save and a mail is being sent, after the mail confirmation popup, i want to go to a different view.
This is just an example. Basically I want to know how to get the return value of what user has pressed in the popup.
If I write anything after the popup, that code is executed first before the popup is called.
Please note I know that we have to write the handler code in the event handler method.I wanted the return value "yes/no" after my popup has been showed at some point in the program.
Thanks in adv.Hi Aishi.
AFAIK what you want is not possible. You have to use the event handler methods.
But you can handle it. Just an example:
I have a method which performs a navigation from one component to another.
If the component is dirty the user should confirm the navigation. The navigation
method takes the parameter has_confirmed as boolean.
User clicks link to navigate->method is called with has_confirmed = abap_false.
Method checks if component is dirty and if so pops up confirmation window and returns imediatly.
Now user confirms and corresponding event handler is called. Here I check whetrher user pressed yes and then call navigation methods again with has_confirmed = abap_true. Navigation will be perormed.
This is just an example on how you can handle this problem.
Hopes this helps a bit.
Cheers,
Sascha -
Hi QM Experts,
IS it necessary to confirm operations in production CO11n after confirming the same in quality module?
ThanksDear Samir
You need not confirm the Operation once confirmed in Quality. if you need to confirm the activities in QA32 which is not availale in the pop for confirmation you can also do that
When the pop up appear for putting the yield/ rework/ there is Tab Confirmation, click on that it will take you to Co11n kind of screen. you can confirm the activities there
Regards
gajesh -
Hi,
How can I implement the following:
After an order form is completed the user presses the submit button. I have item validations that fire. If the order is valid, I would like to pop up a printer friendly page with confirmation of the order details AND redirect the parent page to another page.
Any ideas please.
Thanks
Sajityou could just have your page submit as normal and conditionally pop up the printer-friendly one from the next 'parent' page. one way to do that would be to have the branch from your order page to the next page set the value of REQUEST to something like 'POPCONFIRM'. then when your next page renders have an html region there that renders only when :REQUEST = 'POPCONFIRM'. have that region pop the confirmation page up w/something like...
<script language="JavaScript" type="text/javascript">
popupURL('f?p=&APP_ID.:2:&APP_SESSION.::::::YES');
</script>
...assuming, of course, that page 2 is your confirmation page.
hope this helps,
raj -
Hello Folks,
I have an ALV table view, after selecting any line item in the view i have button "DETAIL" which would pop up another view with the details in ALV view again.
I have done the below steps but iam unable to get the alv pop-up with details. I would really appreciate if anyone can help me with this.
My main view <i>V_OVERVIEW</i> is the initial Table view and i have created another View <i>V_POPUP</i> which just has a Viewcontainer. <i>V_OVERVIEW</i> is embeded in window <i>W_MAIN</i> and <i>V_POPUP</i> is embeded in <i>W_POPUP</i>.
The view V_POPUP has the following code in its MODIFYVIEW method.
DATA:node_wage TYPE REF TO if_wd_context_node,
node_detail type ref to if_wd_context_node,
lt_sltd_elmnts TYPE wdr_context_element_set,
lr_element TYPE REF TO if_wd_context_element,
wa_detail TYPE if_v_pop_up=>element_wage_benefit,
it_detail TYPE if_v_pop_up=>elements_wage_benefit.
data : lt_ssn type table of ZUT_XFERRED_SSN,
lt_return type table of bapiret2.
node_wage = wd_context->get_child_node( 'WAGE_BENEFIT' ).
lt_sltd_elmnts = node_wage->get_selected_elements( abap_true ).
lr_element->get_static_attributes(
IMPORTING static_attributes = wa_detail ).
CALL FUNCTION 'ZZ_GET_DETAIL'
EXPORTING
i_ob_key = objectkey
i_quarter = -quarter
TABLES
T_DTL = lt_dtl
T_RETURN = lt_return.
navigate from <CONTEXT> to <TP_RATES> via lead selection
node_detail = wd_context->get_child_node( name =
ig_componentcontroller=>wdctx_ssn_details ).
node_detail->bind_elements( new_items = lt_dtl ).
The main View V_OVERVIEW has the button "DETAIL" which calls the window W_POPUP to show view V_POPUP embeded in it as a popup, here is the code in the Button handler
DATA:
l_api_main TYPE REF TO if_wd_view_controller,
l_window_manager TYPE REF TO if_wd_window_manager,
l_popup TYPE REF TO if_wd_window,
l_cmp_api TYPE REF TO if_wd_component.
* Pop to confirm
CLEAR : l_api_main, l_cmp_api,
l_window_manager, l_popup.
l_api_main = wd_this->wd_get_api( ).
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
l_popup = l_window_manager->CREATE_WINDOW(
WINDOW_NAME = 'W_POP_UP'
TITLE = 'Details' ).
l_popup->open( ).hey folks nevermind i got it.
Thanks -
I recently downloaded the trial version of PDFPen and a nightly build of Songbird. Whenever I launch these apps, I get very Vista-esque pop-up confirming I actually want to run these programs:
+"PDFpen.app (or) Songbird.app” is an application which was downloaded from the Internet. Are you sure you want to open it?+
+Firefox.app downloaded this file on February 2, 2008.+
Then Cancel/Open as choices.
It happens both under the admin account and as a standard user. Clicking the help link just tells me to be sure this is the application I want to run, and there does not seem to be a choice in the system preferences to disable.
I understand the need to warn me once, but every single time?
Thanks,
Mike D.I think there is a button on those disk mount images. And controlled by Disk Utility, that whenever a .dmg is downloaded from the internet, it alerts you... but not when running the program other than the first time.
Trying to prevent auto-run no doubt. I was on a web site by accident, through a link, and an .exe started downloading itself without prompt and only becuase the download window showed up. Not going to affect OS X, but still malicious. -
Hi,
I would like to implement a confirmation pop up at tthe time of save. the user may
choose to proceed with the save or cancel save.
I have implemented in the following fashion but apparently it does not refresh the data on the PCUI page.
1. CHECK_BEFORE_SAVE - Raise Information Message. Set Flag not to save.
2. SAVE - Check if flag is set not to save, return error code. and do not continue with save.
3. GET_MESSAGES - Add the messages to rt_applog (Message is configured for navigation)
4. PROCESS_EVENT - Process for the pop up events 'Yes' and 'No'.
'Yes' event will call the save method after initializing do not save flag. 'No' with exit.
Please recommend correct way to implement a pop-up confirmation during save event.
Thanks
ShyamHi,
This pop up is related to the WorkProtect mode,
It will be configured in the portal,
There will be 3 options available
if Workprotect mode is 0--- then navigate automatically
1-- pop up and then navigate
2- navigate with out saving.
i'm not sure about the values.
WorkProtect mode can be seen in the personalize link and this link is available if eu_role is assigned to the corresponding user.
Please contact portal admin team regarding this.
Anilkumar
Maybe you are looking for
-
Why doesn't Adobe have tech support? I have this error and need to have it solved. Adobe will not open up when I hit a pdf file? Acrobat Installation & Update Issues
-
How to secure data by operating unit in oracle payments
Hello We are in the process of setting up to make payments from one single bank account across all operating units to avoid maintenance and number of templates. As part of our process we submit the payment process request across all operating units a
-
Ways to configure VISA properties associated with the EOS character in LabVIEW
I am having a great deal of trouble reading consistently from an instrument (HP5328A Universal Counter) and am investigating the EOS character. In ibic, there are 6 properties of interest accessed through the ibconfig command. The following are the p
-
Returns to vendor agter MIGO and MIRO
hI, I have made on PO, did MIGO and MIRO for the same (CIN) Now i want to send back the material to vendor in two scenarios 1) After MIGO 2) After MIGO and MIRO 3) After payment has been done. Regards, Satyendra
-
When I write data in Chinese into my SQL database,and then read it,but it didn't display correctly,for you see,I use many method,but failed,Who can help me?