Disable 'Cancel' button in cl_gui_frontend_services= file_save_dialog...
Hello Experts,
Is there a way to disable the 'Cancel' button in method 'FILE_SAVE_DIALOG' of class
cl_gui_frontend_services? Because in our requirement, the saving of the file is mandatory.
Thank you guys and take care!
HI, Viraylab
Use the Logic Bellow it will solve out your problem, using following you must provide a file name other wise after selecting Cancel button this dialog will appear again.
PERFORM save_dialog.
*& Form save_dialog
* text
FORM save_dialog.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Select File Name'
CHANGING
filename = filename
path = path
fullpath = fullpath
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF filename IS INITIAL.
PERFORM save_dialog.
ENDIF.
ENDFORM. "save_dialog
Please Reply if any Issue,
Best Regards,
Faisal
Similar Messages
-
Can we disable cancel button in the File download
Hi Experts,
Working in jdev 11.1.1.30.
Can we disable cancel button while trying to download file. and by default file will open with out click on open file, is thes possible?
Edited by: user5802014 on Aug 17, 2010 9:15 AMHi Kamal,
how to disable Cancel and keep workitem in Inbox button in the user decision.
As far as i know this is not possible. Just recollected reading this [old thread.|http://mailman.mit.edu/pipermail/sap-wug/2004-September/014240.html]
then the work item is regenerated for him alone.
Again this is a standard behaviour, as soon as the workitem is executed by one of the responsible agents it is reserved for that person so that no one can perform any action on it unless the first person replaces it intentionally. Yes, it would have been a better option to have it replaced automatically on pressing "Cancel and keep the workitem in inbox" but this is the way the design is. It is the responsibility of the agent to replace it manually (using "Replace" button) after performing any action on the workitem including pressing "Cancel" button. You may need to take care of this in the user training.
Additionally you can also schedule a report (may be once a day in the midnight) which can check for the reserved workitems and replace all of them using "SAP_WAPI_PUT_BACK_WORKITEM". This would make sure that the workitems are replaced to all users even if the user has accidentally forgot to replace the workitem. Again in this case the user cannot "Reserve" a workitem even if he/she wants to (as your scheduled report would replace it in the midnight).
Thanks,
Prasath N
Edited by: Prasath Natesan on Dec 26, 2007 5:56 PM
changed "Replace manually" button to "Replace" button -
How to disable the cancel button in InputDialogBox?
Can someone please tell me how to disable the cancel button in an input dialog box?
thanks,Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]
-
Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?
It appears OP solved the problem: [/questions/874744]
-
How to disable the cancel button in the ProgressMonitor
hi,
I need to know, is there any way to disable/remove the (cancel)button in the ProgressMonitor?
One more problem is,
Once i click the cancel button, isCanceled() return true, how to make it false again so that the process continue....
It is very urgently.....
please help me out.
Thanks in advance.
Regards,
Deepa RaghuramanI don't think that's a good solution, because Cancel button itself is not disabled, so user is tempted to click it and nothing happens.
A better but dangerous solution is this:
progressMonitor = new ProgressMonitor(ProgressMonitorDemo.this,
"Running a Long Task",
"", 0, 100);
progressMonitor.setMillisToDecideToPopup(0);
progressMonitor.setMillisToPopup(0);
progressMonitor.setProgress(0);
JDialog dialog = (JDialog)progressMonitor.getAccessibleContext().getAccessibleParent();
JOptionPane pane = (JOptionPane)dialog.getContentPane().getComponent(0);
pane.setOptions(new Object[]{});Refer to the same question here [http://stackoverflow.com/questions/512151/how-do-i-disable-the-cancel-button-when-using-javax-swing-progressmonitor] . -
Unable to disable Save and Cancel button on change user answer form
Hi,
I am not able to disable Save and Cancel button on change user answer form depending on a condition. Any kind of help will be appreciated.
Thankssave and cancel are the default buttons
check the disable default buttons...
Nsankar -
Hi Guys,
I am saving Invoice Output type into local PDF file and using CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG to give user the choice where to save the file. It gives an abap short dump "Access not possible using 'NULL' object reference". and update is terminated in the same method.
I think output types are executing in Update Taks.
It's working fine when used in other programs(Normal)
Suggestions are Welcome. Thanks! Vijender
The code is :
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Save PDF File'
DEFAULT_EXTENSION = 'PDF'
DEFAULT_FILE_NAME = LV_NAME_INIT
FILE_FILTER = '*.PDF'
INITIAL_DIRECTORY = 'C:'
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = LV_FNAME
PATH = LV_PATH_FOLDER
FULLPATH = LV_FILE_NAME
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.HI, Viraylab
Use the Logic Bellow it will solve out your problem, using following you must provide a file name other wise after selecting Cancel button this dialog will appear again.
PERFORM save_dialog.
*& Form save_dialog
* text
FORM save_dialog.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Select File Name'
CHANGING
filename = filename
path = path
fullpath = fullpath
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF filename IS INITIAL.
PERFORM save_dialog.
ENDIF.
ENDFORM. "save_dialog
Please Reply if any Issue,
Best Regards,
Faisal -
Question for cl_gui_frontend_services= file_save_dialog
Hi Expert.
I made simple test page.
there is nothing but this code in oninitlization
* event handler for data retrieval
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i.
* Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
* window_title = ' '
DEFAULT_EXTENSION = 'XLS'
default_file_name = 'accountsdata'
INITIAL_DIRECTORY = 'c:temp'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
* Check user did not cancel request
CHECK ld_result EQ '0'.
and that shows
"method:FILE_SAVE_DIALOG ,line : 164
An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object."
why this error caught?
Did I miss something or made mistake BSP code above?
should I create some object before call cl_gui_frontend_services=>file_save_dialog?
I don't have any clue on this.
help me please. thanks .Oh yes - this most certainly will not work from BSP. This class and any other that uses the control framework are written as proxy objects to code that actually executes as part of the SAPGui on the client machine.
BSP is completly web centric. Its output can only be ran in a browser. To the browser the output of BSP doesn't look any different than any other web page that might come from ASP, JSP, PHP, etc.
Also because BSP runs in a browser - the amount of interaction that can occur with the client (particularly around file downloads) is somewhat limited. There is no file download element or a file save as dialog object. There are other ways to attach content to an HTTP Response or place it in a hidden iFrame - the browser is then responsible for intrepting this information and offering the file save as or open dialog based upon the appropriate MIME Type.
This weblog is the primer on BSP downloads written by the Jedi Master himself:
<a href="/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents:///people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
If you search you will find other examples in the older BSP weblogs as well. -
Use rich:fileUpload/ to enable/disable my buttons with checking file names
Hello!
I need to upload some files with using <rich:fileUpload>,and i did it but i need to check file names for some reasons and enable or disable upload button but my problem is that when i open my modal panel and click add button of <rich:fileUpload> and then add upload button of <rich:fileUpload>(not my upload button but upload button wich <rich:fileupload> has) i check file name but the button is not enable/disable until i close my modal panel and open it agin,so i need to know how to modify my code to make it work?
<rich:modalPanel id="uploadFile" autosized="true" resizeable="false">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="uploadFiles"></h:outputText>
</h:panelGroup>
</f:facet>
<h:form>
<rich:fileUpload maxFilesQuantity="#{uploadBean.maxUploadFiles}" allowFlash="true" fileUploadListener="#{uploadBean.uploadListener}" immediateUpload="false"/>
<table>
<tr>
<td><h:commandButton disabled="#{!uploadBean.xlsNameValid}" rendered="#{!uploadBean.admin}" action="#{uploadBean.upload}" value="upload" /></td>
<td><h:commandButton action="#{uploadBean.clearFiles}" value="cancel" id="cancel"/></td>
</tr>
</table>
</h:form>
<rich:componentControl for="uploadFile" attachTo="cancel" operation="hide" event="onclick"/>
</rich:modalPanel>No the problem is that file is being checked on server side, but if file is invalid the button Upload(my button ,not standart rich:fileUpload) must be disbaled,and shown,but i have to close this modal panel and open it again to see my button enabled/disabled
-
What is the property to disable a button in a module pool program?
Hello Experts,
I want to disable the button after inserting the record in a Z Table.
Can you please help me.
Thanks,
ManishaHI,
I tried , as you people told. But i am not getting it.
In my module pool I wrote like this:
REPORT ZTRY_BUTTON.
tables : zmani_emp.
data: itab like zmani_emp OCCURS 0 with HEADER LINE.
*& Module USER_COMMAND_2000 INPUT
* text
MODULE USER_COMMAND_2000 INPUT.
case sy-ucomm.
when 'OK'.
insert into zmani_emp values itab.
when 'CANCEL'.
leave program.
ENDCASE.
ENDMODULE. " USER_COMMAND_2000 INPUT
now plz tel me wat shud I have to do??
thanks
manisha
Edited by: PATIL MANISHA on Apr 30, 2010 11:43 AM -
Gui_upload and cancel-button ??
hi friends,
i do use the ->file_open_dialog functionality and i want to have the following:
whenever the user clicks on "cancel" in the dialog, the open_file dialog should be closed.
Upto now it causes my transaction to go infinity!
call method cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = i_file
rc = i.
what is wrong with this ?
thank you for your help,Hi Friend,
Make Use of parameter USER_ACTION.
when the user presses the cancel button ,the corresponding variable and CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL will have the value 9.
So proceed further , only when the value of the variable ne CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
DEFAULT_FILENAME = W_P_DEF_FILE1
CHANGING
file_table = I_FILE_TABLE1
rc = W_RC1
USER_ACTION = w_usr_act1
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
IF sy-subrc = 0
AND w_usr_act1
ne CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
Hope it helps.
Regards,
Charumathi.B -
Hi,
I would like to disable Yes button inside an Alert box. Is
this possible?
Thanks in advance.See the FB3 help sys on "Alert". You can specify args for
what buttons appear when the show() method is called:
public static function show(text:String = "", title:String =
"", flags:uint = 0x4, parent:Sprite = null, closeHandler:Function =
null, iconClass:Class = null, defaultButtonFlag:uint = 0x4):Alert
Parameters
text:String (default = "") — Text string that appears
in the Alert control. This text is centered in the alert dialog
box.
title:String (default = "") — Text string that appears
in the title bar. This text is left justified.
flags:uint (default = 0x4) — Which buttons to place in
the Alert control. Valid values are Alert.OK, Alert.CANCEL,
Alert.YES, and Alert.NO. The default value is Alert.OK. Use the
bitwise OR operator to display more than one button. For example,
passing (Alert.YES | Alert.NO) displays Yes and No buttons.
Regardless of the order that you specify buttons, they always
appear in the following order from left to right: OK, Yes, No,
Cancel. -
Need a way to disable "Exception" button for "Block Pop-up windows" in Tools-> Options -> Content tab. I want to be able to do this for Locking Down Firefox preferences.
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)That button doesn't have a pref associated with it, so you can't disable that button with a pref on the about:config page or a lockPref call.
That only leaves the choice to remove that button with code in userChrome.css
<pre><nowiki>#popupPolicyButton {display:none!important;}</nowiki></pre>
See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files -
How to stay back on same section of a report after pressing cancel button
Hi,
How we can stay back on a same section of a report page when I press Cancel button or Apply Changes button from linked Data Entry Form. For instance if I have a 200 rows in a report and I scroll down to 80th row and press Edit button when called a data entry form. Now when I press Cancel it again re-load the report from the start of the page.
Any idea!
Thanks
SabahatHi Sajid,
Thanks for reply.
I have used RETURN statement like below.
SUBMIT RFWT0010 WITH vendor = 'X'
WITH i_lifnr IN i_lifnr
WITH i_bukrs IN i_kunnr
WITH test = 'X'
AND RETURN.
The output of RFWT0010 is displayed. but on pressing "back" button on toolbar, the flow is coming back from RFWT0010 to calling report. I want that On pressing ENTER button of keyboard. The flow should come back to calling report.
Regards,
Ratnesh -
How to change the behaviour of the Cancel-Button of SSO-Login-Page (Forms)?
Hi Folks,
we use SSO-Login to authenticate users using Forms. How do I change the URL which is opened when a user clicks on the cancel button on the SSO Login page?
In the formsweg.cfg file there is a parameter named ssoCancelUrl, but if I define it, it doesn't work anyway. Seems like it has something to do with ssoDynamicResourceCreate, but I don't exactly understand what.
Can't I simply change the URL which is opened (globally), when a user hits the cancel button on any SSO-Loginpage.
Thanks in advance.
Regards.Exactly this does not work! Please watch my settings:
Global Setting in formsweb.cfg
# Single Sign-On OID configuration parameter: indicates whether we allow
# dynamic resource creation if the resource is not yet created in the OID.
ssoDynamicResourceCreate=false
# Single Sign-On parameter: URL to redirect to if ssoDynamicResourceCreate=false
ssoErrorUrl=
# Single Sign-On parameter: Cancel URL for the dynamic resource creation DAS page.
ssoCancelUrl=
# Single Sign-On parameter: indicates whether the url is protected in which
# case mod_osso will be given control for authentication or continue in
# the FormsServlet if not. It is false by default. Set it to true in an
# application-specific section to enable Single Sign-On for that application.
ssoMode=false
App-Specific settings in formsweb.cfg
[proz]
envFile=proz.env
form=proz.fmx
title=proz
separateFrame=true
width=1280
height=960
ssoMode=true
ssoDynamicResourceCreate=false
ssoCancelURL=http://machinename:port/zugangsportal/
otherparams=useSDI=yes P_SERVER_URL=machinename:port P_REP_SERVERNAME=machinename_proz ZP_TARGET_ID=%ZP_TARGET_ID%
When I now access http://machinename:port/forms/frmservlet?config=proz I got redirected to the SSO-Login-Page but the Cancel-Button still links to Middletier Home. Why?
Regards.
Maybe you are looking for
-
Compaq Presario R3000 how to get the sound to work with Windows 7 RC
1) Download SP29586.exe: ftp://ftp.hp.com/pub/softpaq/sp29501-30000/sp29586.exe 2) Run it, Create a directory c:\ swsetup 3) Once all the Files are extracted DO NOT INSTALL 4) Now Goto the Start Menu Click on Devices and Printers, the Click on
-
I deleted an account from my icloud. How do I put it back?
Hello. Under my itunes account I added a company phone. It has a different number and different information. For some reason I added all together, now I realized that by mistake a erase my company phone information and I dont have anything on that Ip
-
Regular expression technique needed to eliminate " and replace with \"
I am trying to figure out the best way to fix data coming from a database table through the use of ColdFusion, in which there are some quotation marks that JavaScript Flash doesn't want in the array before adding the text content to a quiz. At the mo
-
Airport Express. Mac not finding.
Hi - bought the Airport Express to extend my existing wireless connection. Went to set up and Mac saw the Airport, went through steps but didn't work. Tried it again, but this time the Mac won't even recognise the Airport. Despite rescanning, turning
-
i want to be able to get the ip of the local machine's gateway. the only way i can think of doing this is through running an ipconfig and using a stream to capture all the data and extract the gateway from there. is there a more elegant way of gettin