Code for select ok button
I have a javascript that applies a security police but it opens a confirmation dialog.
What kind of javascript code can i use to automatically select the OK button.
Can anyone help me?
here's the script:
var ApplySecurity = app.trustedFunction(
function()
var oMyPolicy = null;
var sPolicyName = "mySecurityPolice"; // my policy name
app.beginPriv();
// First, Get the ID of mySecurityPolice security policy
var aPols = security.getSecurityPolicies();
for(var i=0; i<aPols.length; i++)
if(aPols[i].name == sPolicyName)
oMyPolicy = aPols[i];
break;
if(oMyPolicy != null)
// Now, Apply the security Policy
var rtn = this.encryptUsingPolicy({oPolicy: oMyPolicy });
if(rtn.errorCode != 0)
// Print error message into JavaScript Debugger Console
console.println("Security Error: " + rtn.errorText);
app.endPriv();
ApplySecurity();
I'm calling from an action that opens files from a specific folder and saves it with the protection but for every file it pops up the policy window..
Similar Messages
-
Code for selection screen, urgent
Hi Everyone,
I need code for selection screen.
I have four radio buttons, p1, p2,p3,p4(assume)
If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
Regards,
NagarajuHi,
REPORT ZTEST222 .
PARAMETERS : p_add RADIOBUTTON GROUP radi
USER-COMMAND radio MODIF ID MOD,
p_disp RADIOBUTTON GROUP radi DEFAULT 'X' MODIF ID pod,
p_chng RADIOBUTTON GROUP radi MODIF ID rad,
p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
SELECT-OPTIONS : s_idn FOR vendor MODIF ID mod,
s_pcode FOR ws_c_pcode MODIF ID pod.
PARAMETERS: p_plant LIKE zaw_pol_plan-plant MODIF ID rad,
p_zzvend LIKE zaw_pol_plan-zzvendor MODIF ID cod.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_add EQ 'X'.
IF screen-group1 EQ 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_disp EQ 'X'.
IF screen-group1 EQ 'POD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_chng EQ 'X'.
IF screen-group1 EQ 'RAD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_er_log EQ 'X'.
IF screen-group1 EQ 'COD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
Pls. reward if useful
ENDLOOP.
Pls. reward if useful -
C# code for a start button
Hi,
I'm trying to write a program/code for a start button. Basically the code will work in junction with an Adam module and all i need is for when inout 0 of the adam module is on, output 0 will turn on - otherwise a message will appear. Sp far i have:
private void button1_Click_1(object sender, EventArgs e)
if (IO[0] == 1)
Out[0] = 1;
else
MessageBox.Show("Safety circuit not ok");Hi,
According to yout description, I am afraid your problem is out of support in C# forum. For Adam problem, you should go to the link to post your thread:
http://support.advantech.com/support/new_default.aspx
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and
makes it easier for other visitors to find the resolution later. -
Capturing Ok Code for Page Down Button
Hi,
In Infotype O568 I have to update a table for Leave records. For that I am using BDC recording. While doing BDC recording the page down button ok Code is not being recorded. Can any one tell me how to capture the Ok Code for page down button. I have Tried with ' P+ ' and ' P++ ' but it does not work.
Thanks!!!Hi Abhay,
For which transaction you are using your BDC , i am not getting.
I must say that for all transaction , page down(P+) option don't work,
for that transaction you need to follow the below steps.
go to menu bar->edit-> enter lines.
after recording you will get BDC_OKCODE = NP.
Try with this.
Regards,
Tutun -
I have the lengthy code for a PayPal button. I tried to past it in an iWeb welcome page and all I get is the code. No button. Can you help me?
OT
-
How to code for select all& deselect all?using menu buttons
hai,
i have generated a report with a single field from a database table and
i have a checkbox for each record/item in the report.
i need help in the following ..
now that i have menu buttons say "select all" and "deselect all"..
if select all is clicked then all checkboxes should be selected.
if deselect all is clicked, then all checkboxes should be deselected
i know that we have to use functional code and use case sy-ucomm etc.
when "selectall" etc..
can someone help me how to code for this to work exactly?it did not work for the code u had suggested...
plz check it out and send me the exact working code..
REPORT ZINTRACTIVE_PROJ .
TABLES : SFLIGHT.
DATA : BEGIN OF IT OCCURS 0,
CARRID LIKE SFLIGHT-CARRID, FLDATE LIKE SFLIGHT-FLDATE,
END OF IT.
DATA : BOX TYPE C,
LINE TYPE I.
SELECT CARRID FLDATE FROM SFLIGHT INTO TABLE IT.
LOOP AT IT.
WRITE : / BOX AS CHECKBOX, IT-CARRID.
ENDLOOP.
LINE = SY-LINNO .
SET PF-STATUS 'SELECT'.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SELECT'.
DO LINE TIMES.
READ LINE SY-INDEX FIELD VALUE BOX.
IF BOX = 'X'.
NEW-PAGE.
WRITE : / IT-FLDATE.
ENDIF.
ENDDO.
<b>WHEN 'SELECTALL'.
LOOP AT IT.
IT-CARRID = 'X'.
MODIFY IT TRANSPORTING CARRID WHERE CARRID = IT-CARRID.
EXIT.
ENDLOOP.
WHEN 'DESELECTALL'.
LOOP AT IT.
IT-CARRID = ''.
MODIFY IT TRANSPORTING CARRID WHERE CARRID = 'X'.
EXIT.
ENDLOOP.</b>ENDCASE. -
Provide code for desplay radio button in POP UP window(REUSE_ALV_POP
Dear Experts,
I m using Function module REUSE_ALV_POPUP_TO_SELECT . I can use check box but radio button is required. How to declared that radio button in main Program and I need radio button on POPUP window also along with other fields. That radio button should not display on my main selection screen, Radio Button should be display on POPUP window only .
Pl provide me code for .....
Thanks & Regards,
Swapnika
Edited by: swapnika on Nov 28, 2011 8:09 AMHi,
Using radio button for single selection.
You can double click at the line for the single selection instead of radio button by leaving I_CHECKBOX_FIELDNAME blank.
Hope this help.
Tiwa N. -
PL/SQL code for a search button
i'm trying to write a PL/SQL for a search button , like in this picture
http://uppix.net/f/7/1/484994cbbb235d7041484588c2463.jpg
i tried this
begin
SELECT employee_id , first_name , last_name , manager_id , department_id
into
:employee_id , :first_name , :last_name , :manager_id , :department_id
FROM EMPLOYEES WHERE :DEP_ID = :DEPARTMENT_ID;
end;
but it didn't work
hope someone can help
thanks.Welcome to the forum.
From your link it shows you're using Form Builder as your development tool.
Therefore your question belongs to the Forms Forum @ Forms and not so much in this forum.
Keep in mind to read the FAQ's you'll stumble upon in several forums, so you know what to post and what not to post.
For example, here's the SQL and PL/SQL FAQ:
Re: 3. How to improve the performance of my query? / My query is running slow.
but it didn't workThat;s something you should not post.
Be more specific.
If you get an error message, then post the exact error code and message.
Always mention your database version and your Forms version (if Forms is involved). -
Standard Match Code for Selection Options with Example
Hi Guys,
Can anybody tell me Standard Match Code or Search help for Selection Options.
ex: MBEW-MATNR , MBEW-BWKEY and MBEW-BWTAR. can anybody tell how to keep Search Help or Match Code for the Above Fields in ECC 6.0 with Example
Very Urgent.
Thanks,
Gopi.Well Gopi.. as per your requirement no need to use collective search help.
I guess you have three fields in selection-screen,out 3 fields you have two fields contains search help.
Create your user defined search help BWTAR ..
Check the below links for creation search help :
http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee2b446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Hope you got it.
Thanks
Seshu -
hi all,
in selectin screen i have to populate two fields VIQMEL-KDAUF(sales order) & VIQMEL-QMNUM( shop visit notification),
here i have to give any of the inputs.like, if i give the SALES ORDER as input, SVN should be retrived& if SVN is given as input SO should be retrived.
depending on the given input the second input also should be retrived and passed to others as input.
can any one send me the code for this..i need it immediately.Hi,
Tables: viqmel.
Data: begin of it_itab occurs 0,
ls_qmnum like viqmel-qmnum,
ls_kdauf like viqmel-kdauf,
end of it_itab.
select-options: s_qmnum for viqmel-qmnum,
s_kdauf for viqmel-kdauf.
select QMNUM KDAUF
from VIQMEL
into table it_itab
where qmnum in s_qmnum
OR kdauf in s_kdauf.
loop at itab.
write: /it_itab-ls_kdauf, it_itab-ls_qmnum.
endloop.
Reward pts if helpfull -
Where is the code for the collapse button in the default SAP iview layout?
I need to eliminate the collapse/restore button displayed on each iView tray. I was looking at the default layout component (com.sap.portal.layouts.default) but I could not find the code for the tray. The code for "FullWidth.jsp" (this file that implements the "FullWidth" component) is below:
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
<lyt:template>
<hbj:content id="myContext" >
<hbj:page title="Portal Page">
<lyt:container id="column1" />
</hbj:page>
</hbj:content>
</lyt:template>
as you can see, there is no reference to the tray tags.
note: I am familiar with how to create a new iView tray using the new Layout Tag Library (from blog below)
EFP: Layout Tag Library
, but I want am not interested in this approach... All I want is to modify the EXISTING tray.Hi,
may be it's helpful for you.
http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
Regards
-Bechar -
What would be the code for a previous button?
I am passing Strings from an array to JTextArea. When I hit the "next" button on my jtoolbar, it shows the next string in the array. This is the code I have for the next button:
static final public String NEXT = "next";
String cmd = e.getActionCommand();
String[] arr =
"the strings",
"that i am",
"passing to JTextArea"
if(NEXT.equals(cmd)
showNextValue();
public void showNextValue()
textArea.setText(arr[index]);
index = (index+1)%arr.length;
My question is:
how would I write the code for the method showPreviousValue() without getting an indexoutofbounds exception? It would do the same thing as showNextValue, but show the user the previous string when they hit the previous button.
Thank you!!!how would I write the code for the method showPreviousValue() without getting an indexoutofbounds exception?I'm guessing that you tried something and got an IndexOutOfBounds exception. You might do better to post what you tried.
Basically you need to figure out why the exception occurs - for instance by printing the value of the expression that you were using as the index value. And then figure out some way of avoiding that problem. (Probably a little bit of arithmetic.) -
How to customize the code for default scroll buttons provided in the table?
Hi Everyone,
I want to customize the code for default 'next page' navigation button provided in a table. If this is possible then how it can be done?
Thanks,
Swatido you mean 'footer' of table, which used to scroll table contents?
Table footer button is not editable.
Instead you can try buttons in the table tool bar and can swap elements in the table.And also table footer can be set to showfootoer: false.
refer thread: [Table Element Swapping|Re: Table with special requirement]
nikhil -
Code for select statements needed
Hi Please give the code for this
Code (BUKRS), Vendor (LIFNR), Vendor Name (ZNAME1), PO_Date (AEDAT), PO Creator (ERNAM) from EKKO table
2. For the corresponding PO number (EBELN) from EKKO table, get PO Item Text (TXZ01) from EKPO table
3. For the corresponding PO number (EBELN) from EKKO table, get PO_Iten_No(EBELP), from EKPO table
4. For the corresponding PO number (EBELN) from EKKO table get the GR_Posting Dt(BUDAT) from EKBE table when PO History cat (HCT-EKBE) is equal to E .
a) For getting the first GR Posting date and first Invoice posting date, sort the column (BUDAT) of table, get the 1st GR_Posting_dt(BUDAT) when PO History cat (HCT-EKBE) is equal to E AND get the 1st Inv_Posting_Dt(BUDAT) when PO when PO History cat (HCT-EKBE) is equal to Q For this corresponding invoice date (when when PO History cat (HCT-EKBE) is equal to Q ) get the invoice number (BELNR) .
b) IF 1ST GR_POSTING_DATE < 1ST INVOICE_POSTING_DATE, DO NOT DISPLAY THE RESULT
5. For the corresponding PO number (EBELN) from EKKO table and Invoice_No (BELNR) (from step4,a),get Inv_Creator (ERNAM), Inv_Amount(REEWR), Currency (WAERS) from EKBE table when PO History cat (Hct-EKBE) is equal to QYou might try reading the docs. There's a method selectAll() in JTextComponent
-
Code for Copy to Button in Addon
C
code foe copy to Button Button in AddonHi
Please check this thread:
Re: Process Of implementing "Copy to functionality" from a user defined form PO
Regards
Maybe you are looking for
-
After a hard reset all user profiles are now accessible by every user
I initially had our office time capsule set up with 3 seperate user accounts ("profiles") via these instructions. Thus each user had a login for the time capsule that would then show them a shared folder that all users could see, and then a personal
-
I just downloaded and installed Adobe Reader XI (Mac), but I still can't open my pdf docs.
-
Report output in PDF format instead of TEXT
Hello every1, I am using oracle application E-bS version 11.5.10.2 and i want ORACLE reports output in PDF format instead of standard 'text' default format(the place where v register concurrent programs). so can any one tell me what changes should i
-
Where will Skype for Web be in Skype Community ?
I cant login on my Mac and my collaborators are all on Skype. How to get invited for Skype Web Beta ?
-
My imac is on finance, how to find out how much i have left to pay off?
My imac is on finance, how to find out how much i have left to pay?