Web Interface - Call a function when web interface starts
Hello,
my problem is to call a function (fox formula) when the web interface starts. This function may execute only once.
Can somebody help me?
Thanks
Stefan
Hi,
1. Create a custom class ZCL_BPS in SE24 inheriting the properties from superclass CL_UPWB_BSP_APPL.
2. Redefine the method LOAD of this class ZCL_BPS and call your FOX formula over here using function module API_SEMBPS_FUNCTION_EXECUTE.
eg. code
METHOD LOAD .
TRY.
CALL METHOD SUPER->LOAD
EXPORTING
APPLICATION_NAME = APPLICATION_NAME
RECEIVING
APPLICATION = APPLICATION.
CALL FUNCTION 'API_SEMBPS_FUNCTION_EXECUTE'
EXPORTING
I_AREA = 'ZAREA01'
I_PLEVEL = 'LEVL001'
I_PACKAGE = 'PACK001'
I_FUNCTION = 'PFUN001'
I_PARAM = 'FOXF001'.
ENDTRY.
ENDMETHOD. "LOAD
3. Replace CL_UPWB_BSP_APPL by ZCL_BPS in the Application Class property of your Web Interface.
This works for sure.
Please grant points if it solves your purpose.
Regards,
Deepti
Similar Messages
-
Code to call a function when enter key is pressed
hi all,
In a table control program i need to call a function when i press enter key...
but im not able to do that since the function is always called when i press a push button on the screen.... can any one help me in this.. please....Hi John,
You are not getting any value in SY-UCOMM when you press "Enter",because the function code is not set for 'Enter" key in "Function Key" of the GUI-STATUS..
First define some fucntion code say 'ENT' for the Enter button available in "Fucntion key" of the GUI status.Once you done and activate the program and test it.The function code which u defined will be coming to SY-UCOMM field when you press 'ENTER" button and you can handle the various fucntionality whichevcer you want on "ENTER" .
Eg:
case sy-ucomm.
When 'ENT'.
Endcase.
Regards,
Vigneswaran S -
Call a function when the active document is closed
Hi friends
I have a portion of my script (at true a specific function) that I´d need to be executed every time the user close the app.activeDocument in Photoshop.
I know there´s a Photoshop script called "Script Event Manager" where we can associate actions and scripts with events (like closing the document). I´d not like to use this script because..as I told...it´s not my entire script to be runned when closing a file..but only a function.
Tried to search in the Script Event Manager for any event called "onClose" () but sure there´s nothing.
How could I insert an event in the body of my own script that calls a function every time user close the active document?
Thank you a lot for the help
Best Regards
Gustavo.As I said before the close event is really not that useful. In addition to the document already being closed the event descriptor will only have the path to the closed file if it was saved as part of the close event.
But if you want to play around with this to see if it will be helpful to you here is one way. You will need to add the notifer. This only needs to be done once unless it is removed.
app.notifiersEnabled = true;
app.notifiers.add( "Cls ",new File('~/desktop/closeEventHandler.jsx') );
Then for the event handler script, something like this.
try {
if (arguments.length >= 2) {
var filePath;
var desc = arguments[0];
if( desc.hasKey( stringIDToTypeID('in') ) ) filePath = desc.getPath(stringIDToTypeID('in'));
if( filePath != undefined ) alert( decodeURI( filePath ) );
} catch (e) {} -
Call a Function when switching tabs in TabbedPanel
I am using Allan Jardine's DataTables javascript library , along with the Spry TabbedPanel. I have one table in each of a number of Tabs. The table in the tab opened by default (or if I use ShowPanel()) is fine. However, if I switch tabs, the other tables, which were hiden when the page was opened, are not correctly initialised, and don't display correctly. Doing anything that causes the displayed table to be redrawn results in the table displaying correctly, and from then on I can switch tabs and the tables are fine.
DataTables has an API function fnDraw(), which will cause a specified table to be redrawn. Is it possible to cause TabbedPanel to call a user specified function when the tabs are swapped, so I can call fnDraw()? I think this woiuld solve my problem.
Thanks
RonThanks.
But I found a simpler way. At the end of the jQuery(document).ready(function(), which initialises the datatables, I added
var ret=TabbedPanels1.showPanel("expiredquotes");
oTable2.fnDraw();
var ret=TabbedPanels1.showPanel("confirmedquotes");
oTable3.fnDraw();
var ret=TabbedPanels1.showPanel("openquotes");
Which opens each of the "other" tabs and redraws the respective DataTable while they are "visible". Then at the end I display the 'default' Tab. I only need to do this once, when the page is opened, after which the tables are correctly formatted.
Regards
Ron -
Call JavaScript function when my Condition is true in JSP
Hi all,
in my jsp i wanna call a javascript function (user defined) when a particular condition si met. How to go about it ? Can anyone plz help me out. Help appreciated.hi
yes! we can do it as follows:
in the JSP code u can include the javascript function
first u declare the Javascript function before the </head> tag in the HTML
and in the JSP u can just call the function which is as follow:
<script>call the JavaScript function()</script>
for example:
<html>
<head>
<script language="JavaScript">
function sayhi() {
alert("hi");
</script>
</head>
<body>
<%
zStr = request.getParameter("str");
if(zStr.equals("true")) {
%>
<script>sayhi();</script>
<%
else {
%>
</body>
</html> -
How to call jquery function when i close modal dialog box ?
Hello,
I need to call one jquery function when I click on close button of modal dialog box.Can anyone please let me know how can I implement it ?
Thanks,
Dipti ChhatrapatiHi Dipti,
If my understanding is correct, you are using SP Modal Dialog and want to track the close event of this dialog. Then you may use
dialogReturnValueCallback parameter of Options variable. Follow is the code sample:
function ShowModal() {
ExecuteOrDelayUntilScriptLoaded(function () {
var options = {
url: 'page1.aspx',
tite: 'Add Title',
width: 800,
height: 450,
allowMaximize: true,
showClose: true,
dialogReturnValueCallback: scallback
SP.UI.ModalDialog.showModalDialog(options);
}, 'sp.js');
function scallback(dialogResult, returnValue) {
if (dialogResult == SP.UI.DialogResult.OK) {
// call your Jquery method here...
Thanks, Ram -
Tableview: Call Javascript-Function when row is selected
Hi everybody,
I have created a tableview with selectionmode lineedit.
Now, I'm looking for a way to call a Javascript function when a row is selected.
The value of the selected row shall be passed to this function.
How can I sove this.
Best regards
AlbertoHI Alberto,
referr to JavaScript to check if any row is selected or not..!...
Even I am waiting for an answer...Now atleast I have a partner in th wait..!!
Thanks,
Tatvagna... -
Altering function will block calling this function when concurrency?
Hi
I would alter a function dynamically in a procedure,when altering function and calling this function occur at the same time,will it generate a blocking?
thanks in advanceYes. If the function is being called and its running then the ALTER STATEMENT to such function will be in suspended mode until the execution of the function completes.
However I cannot understand why would you want to modify a function in a stored procedure. You can always write a condition based function to perform different tasks on different conditions.
Let us know the complete requirement and may be we can suggest some other alternatives.
Please specify your SQL Server version while posting questions
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
thank you very much for your reply.
My requirement is like below:
In our existed system,there is one Employee table,now every user logining in system can see all employees in Employee table.
Now we want to control users see specific employees meeting some conditions which are configurable in system.
To minimize the effect on existed codes,we plan to rename Employee table to EmployeeTbl and create a called Employee view in which EmployeeTbl joins the generated function which contains the sql generated by configured conditions for different users.
I have finished the test,and it'ok,but I don't know whether it affects performance too much.
Why not have a table to determine access groups ie what rows a employee can have access to (like say only immediate reportees for supervisors etc) and then link it to your existing users (AD logins). Then its just a matter of dtermining what group the executing
user is part of and then using relationship set for group to determine whch all employees data he can view.
The concept will look like this
http://blogs.wrox.com/article/filtering-user-specific-report-data-in-sql-server-reporting-services/
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
I have to call javascript function at the time of iview is loading. I am not able use onload event which is not working in SAP Portal environment. Please suggest me any other alternative to call the function at the time of iview is loading. I have to set some properties when form is loading.
I will explain my scenario correctly
Let us take two pages
1. Main Page (A)
2. Child page (B)
I have displayed records in tableview and each having checkbox and two buttons "print" and "viewDetails" at down in page A. If I clicked "print" button the records which i have selected checkboxes details will be displayed in new window( page B). In page B i have given this following code
<script language="javascript">
window.opener.setTarget('Search');
</script>
setTarget() function is in page A.
function setTarget(opt) {
if(opt=='print')
opt="";
document.<%=strFormControl%>.target="_blank";
else
document.<%=strFormControl%>.target="_self";
This code is executing after the content of all records details displayed.
My condition is If i click print button new window is opened and details are displaying. And before displaying content in new page B (means after opened new window) if i click on "viewDetails" button that is also opening new window because <script> code is not executed not yet. but it should display in same window when i click "viewDetails" button. -
Howto call javascript function when pdf is loaded ?
Hi,
Inside acrobat 3d is it possible to setup a javascript function that will be called when the reader opens the pdf ?
The aim is to disable some acrobat reader menus at startup. ?
Best Regards
StephSancelot,
Sorry nobody responded to this! Somehow it was missed. We do answer a lot of requests. :-)
You can set the 3D Annotation to automatically activate when the User opens the document. If you have a Javascript attached to the Annotation, it will be run upon activation, so in this way, Yes, you can do this easy.
Here's how to do it:
- create a doc with with a 3D Annot in it.
- choose the "select object" tool (arrow on advanced toolbar).
- double-click the Annot to bring up the 3D properties dialog.
- In the 'Annotation Settings' area, select the 'Enable 3D when' dropdown.
- Choose 'The Page containing the Annotation is openend'
Should be obvious now that when the user opens the doc in Reader, the annot is automatically activated and the javascript is run first thing. -
Hi,
I am trying to trigger an event when the netstream begins to play a certain portion of a flv file that is being fed into the stream via the appendBytes method. Is there anyway to feed the event, or a function, or any means of communicating that playback has reached this point into the byte parser? I figured it would be possible using the FLVTagScriptDataObject but I cannot get any sort of callback when I pass the bytes generated from the tag into the appendBytes method.
var dataTag:FLVTagScriptDataObject = new FLVTagScriptDataObject();
dataTag.objects = [{"textData":"text"}];
var bytes:ByteArray = new ByteArray();
dataTag.write(bytes);
appendBytes(bytes);
I tried something like this trying to create a onCuePoint or onTextData callback but I didn't have any success.
Any pointers?
Thanks.I found a code example in the HTTPNetStream.as around line 1171:
case HTTPStreamingState.STOP:
var playCompleteInfo:Object = new Object();
playCompleteInfo.code = NetStreamCodes.NETSTREAM_PLAY_COMPLETE;
playCompleteInfo.level = "status";
var playCompleteInfoSDOTag:FLVTagScriptDataObject = new FLVTagScriptDataObject();
playCompleteInfoSDOTag.objects = ["onPlayStatus", playCompleteInfo];
var tagBytes:ByteArray = new ByteArray();
playCompleteInfoSDOTag.write(tagBytes);
CONFIG::FLASH_10_1
appendBytesAction(NetStreamAppendBytesAction.END_SEQUENCE);
appendBytesAction(NetStreamAppendBytesAction.RESET_SEEK);
attemptAppendBytes(tagBytes);
setState(HTTPStreamingState.HALT);
break; -
Is it possible to call a function when a specific event happens?
Hi everyone,
I would like to pop up an alert when a user deletes a named destination marker. I thought this would be a no-brainer, but I'm having trouble finding examples of scripts that handle events.
Is this even possible? Any ideas on how to go about this would be greatly appreciated.
Thanks,
Heather Ayer
PS - I always say this when I post, but many thanks to all who contribute to this forum. I'm still learning and don't post much, but I read each question and answer. So, thanks!Thanks, Rick!
Your info was very helpful. I did consult the list of “monitorable” events and deleting an anchor is not on the list. But, it’s good to see what is available for future projects.
I was trying to prevent deleting of a single anchor, but instead I’ll move on to the next component of comparing all the anchors to a .csv file. I know I’ve seen posts about this before. So, I’m off on another fact finding mission.
Thanks again,
Heather A -
How to unrigister the call back function,in vb6 with DAQmx 8.5
I use daqmx api which named DAQmxRegisterEveryNSamplesEvent to register my call back function,When I invoke the function DAQmxErrChk (DAQmxStopTask(taskHandleAnalog)) to stop my Task.then i call the procedure AD_OPEN again,it raise an error ,tell me that i need to unregister the event,the data has transfer into the buffer.how can i unregister the event,please look at the following code.
Spoiler (Highlight to read)
Private Sub create()
Dim channel As String
Dim minVoltage, maxVoltage As Double
Dim samplesPerChannelPerRead As Double
Dim sampleMode As Long
Dim boolVal As Boolean
On Error GoTo AdErrorHandler:
' Get values from UI controls
channel = "Dev2/ai1:2"
minVoltage = -10
maxVoltage = 10
samplesPerChannelPerRead = 100
If (taskHandleAnalog <> 0) Then
DAQmxErrChk (DAQmxStopTask(taskHandleAnalog))
DAQmxErrChk (DAQmxClearTask(taskHandleAnalog))
taskhandle = 0
End If
' Configure the task
DAQmxErrChk (DAQmxCreateTask("", taskHandleAnalog))
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAnalog, "Dev2/ai0", "", DAQmx_Val_InputTermCfg_RSE, minVoltage, maxVoltage, DAQmx_Val_VoltageUnits2_Volts, vbNullString))
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleAnalog, channel, "", DAQmx_Val_InputTermCfg_Diff, minVoltage, maxVoltage, DAQmx_Val_VoltageUnits2_Volts, vbNullString))
End Sub
Private Sub AD_Open()
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAnalog, "", 200, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_ContSamps, samplesPerChannelPerRead))
'Find number of samples specified
DAQmxErrChk (DAQmxGetTaskNumChans(taskHandleAnalog, numChannels))
'Configure Event Callbacks
DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(taskHandleAnalog, 1, 4, 0, AddressOf EveryNSamplesEventHandler1, Nothing))
ReDim dataBuffer(numChannels * samplesPerChannelPerRead - 1)
' Start the DAQmx Task
' DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandleAnalog, "/Dev1/PFI2", DAQmx_Val_Edge1_Falling))
DAQmxErrChk (DAQmxStartTask(taskHandleAnalog))
' Update UI
Exit Sub
AdErrorHandler:
MsgBox Err.Description
End SubThis may be a bit late, so hopefully you found this on your own. But in order to unregister the event pass a null value for the callback function parameter in the DAQmxRegisterEveryNSamplesEvent function (Nothing in VB).
National Instruments
Product Support Engineer -
Question about calling a function.
Im trying to call a function when a button is clicked, im using actionlistner() on the button, which looks as so :-
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed.keyPad();
}then trying to run this fuction when the button is clicked:-
private void keyPad(java.awt.event.ActionEvent keyPad){
String oldNumber; //set oldNumber to String
String newNumber; //set newNumber as a String
jButtonCall.setEnabled(true);
jLabelInstruction.setText("Press 'Call' When Ready...");
oldNumber = jTextFieldScreenDisplay.getText(); //get txt, if any, assign to oldNumber
newNumber = oldNumber + "1"; //set newNumber as oldNumber adding String to end
jTextFieldScreenDisplay.setText(newNumber); //Display newNumber
}Im new, please go easy, everything is done in the main class, but would like to take this one stage further and create a seperate class outside the main, but i wan to get this working from within the main first.
Cheers Guy's
DooSo what is your question?
Besides:
- the things are called "methods"Hello There!
Sorry, i'm trying to call a 'method'. I have buttons numbered 0-9 which enter into a text field once clicked using ActionEvent. At the moment each button has its own block of code which is a bad habit as its the same code over with one differance, the number value.
Am i right in thinking i should create one method? Then calling this method on each button.
The problem i have is i am unsure of the code to call the method within each buttons ActionEvent ie:-
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//call the method keyPad when button is clicked
private void keyPad(java.awt.event.ActionEvent keyPad){
//run this
- if you define a method to accept a parameter, you
actually have to provide a parameter upon calling
that method.I don't understand???
Thanks
Doo -
Calling a function in an external actionscript
Hi. First of all I'd like to put my hands up and say that what I know about Flash is antiquated (I used to work with Flash 4 / 5), and have now been thrown into the deep end, as it were.
I have an application that has a button component. In an external actionscript file there's an event listener that calls a function when this button is pressed. I want to replace the button with a graphic that switches according to whether the button is 'on' or 'off'. I've created a movie clip that cycles back and forth between the on and off states when clicked, but the trouble I'm having is getting it to call the function. I have no idea how to do it, other than to just include function_name(); (or call.function_name();) in the onRelease handler (which doesn't work). Is it possible to use event listners for movie clips (rather than components?) Or else how can I call this function? It should be really simple and I'm tearing my hair out trying to get it to work! The function is declared 'public', by the way...
Oh yes, this is ActionScript 1 (I think...)
Eternal thanks and gratitude to anyone who can help me...Do you mean to copy it here, or copy it into the fla? I've already tried doing the latter, which doesn't work - the script imports other external as files and I think that that's messing things up. The function only seems to work when it's located in this external file. The function I'm trying to call is
public function toggleAudio() {
//if (btnAudio.label == "Sound Off") {
if (_root.audio == "mute" or btnAudio2.label == "Sound Off") {
trace("toggleAudio AUDIO: Off");
//btnAudio.label = "Sound On";
_root.audio = "unmute";
// stop recieving audio from in stream
ServiceLocator.getInstance().getService("nsService").returnInStream().receiveAudio(false) ;
// stop sending audio on out stream
ServiceLocator.getInstance().getService("nsService").returnOutStream().attachAudio(null);
} else {
trace("toggleAudio AUDIO: On");
btnAudio2.label = "Sound Off";
_root.audio = "mute";
// start recieving audio from in stream
ServiceLocator.getInstance().getService("nsService").returnInStream().receiveAudio(true);
// start sending audio on out stream
ServiceLocator.getInstance().getService("nsService").returnOutStream().attachAudio(Servic eLocator.getInstance().getService("camService").returnMic());
The bit at the beginning where I've commented some stuff out is where I've been trying out different things to get it to work.
For all intents and purposes though the function could be
public function please_work() {
trace("I work!");
All I need is for a way to call this from the main flash movie
Maybe you are looking for
-
BADI ME_GUI_PO_CUST not populating custom fields
Hi! I've created my custom fields in the Line item level for ME21n transaction. The custom fields are in the include structure CL_EKPODB for EKPO. I'm unable to populate my custom fields. Help needed. My screen fields are named EKPO-ZZSTREET
-
i just bought a song on itunes and it downloaded it but for some reason is not playing. o you know why?
-
Preview mode doesn't display correctly
Lately I have had many problems in preview mode. I had to restart the program to see preview mode correctly. I waste time (on restart, then run the program, and test again the preview mode) each time is not doing correctly. It will be great if someon
-
Safari does not launch Quicktime
We have internal media files available on a share. These files are made available via a web interface (php generated pages) which link to our media store... i.e. a href="file:///path/to/file.mov" The media does play, but within the Safari browser. I
-
How to copy one sub task to sub task of another TR ?
Hi Experts , I want to copy the contents of one TR( dummy ) to another TR ( actual ). I have unlocked the sub task of the dummy TR , how can the contents of this sub task be copied to the actual TR's subtask. I do not want to delete the dummy tr. Re