Function references and stateful cfcs?

Using 8.0.1
ok, i have a happy component (example4.cfc):
<cfcomponent output="false">
<cfscript>
  variables.txt = "un-init";
</cfscript>
<cffunction name="Init" access="public" returntype="example4" output="false">
  <cfscript>
  variables.txt = "init";
  </cfscript>
  <cfreturn this />
</cffunction>
<cffunction name="remoteEcho" access="remote" returntype="string" ExtDirect="true" output="false">
  <cfargument name="str" type="string" required="true" />
  <cfreturn str &  "[" & variables.txt & "]"/>
</cffunction>
</cfcomponent>
and I am trying to call a function reference like so:
<cfscript>
cfc = CreateObject('Component', 'Example4').Init();
method = cfc['RemoteEcho']; //<- try to create function reference
</cfscript>
<cfdump var="#cfc#">
<cfdump var="#method#">
<cfdump var="#cfc.remoteEcho('bobo')#"><!--- this works, naturally --->
<cfdump var="#method('bobo')#"><!--- failure here --->
The problem that I am running into is that it cannot find the variables.txt private member.
Element TXT is undefined in VARIABLES.
The direct call works fine, however the reference acts as if it's, i don't know, a regular UDF outside of a cfc?
Any help here, or will this just not work?
-Jim

As far as I know it will not work if you're accessing private
variables because I seem to remember that the function reference is
not tied to the cfc instance.
Mack

Similar Messages

  • Function Reference and Table Sort

    I have a table that I use to track numerical data to a fixed size table.
    After adding new data I sort the columns, for example in descending order.
    My question is this, is it possible to specify the references in say the Average Function to refer to the same cells, eg the bottom 10, in the table and not be affected by the sort. Another way to describe this is that I would like to always average the bottom 10 cells and not have this change with the sort command.
    thank you

    Thanks to both of you.
    In fact I was not satisfied.
    the initial formula assumes that every cells in the column are filled (minus the bottom one used ase a fake footer)
    For those whose use doesn't match this requirement, here is an enhanced one.
    =AVERAGE(OFFSET($A$1,COUNT(B)+1-10,1,10,1))
    I wrote +1-10 to make clear what is done:
    +1 because the COUNT() function doesn't count the header row
    -10 to leave 10 filled cells in the calculated range
    Jerry : it seems that you missed that I often used this function to define a range of cells. I must say thank you to Bugs Hunters because some months ago I asked them because I didn't correctly understood the function's behavior and they took time to explain what I missed.
    While working on this question, I encountered what I feel as a gap in the Help. It states:
    To copy cells within or between tables, drag selected cells while holding down the _Option key_ . Any values in the destination cells are replaced.
    They forgot to add: "and then drag the selection by its border" as it is written for the move feature.
    An alternate protocol works to move a group of cells:
    select such a group
    press the shift key.
    drag the selected block where we want.
    Yvan KOENIG (from FRANCE mardi 14 octobre 2008 19:31:42)

  • The InitCVIRTE function is not listed in the NIDAQ function reference online help? Why? and where can I find a description of this function?

    the InitCVIRTE function is not listed in the NIDAQ function reference online help? Why? and what does she do?and where can I find a description of this function? Can i use this function with visualc++ 6.0?

    The InitCVIRTE function is in the CVI run time engine (cvirte.dll)..not part of NI-DAQ.
    Applications written or using CVI may call this function..
    How are you running into this ?
    From the CVI help...
    This function performs initialization of the CVI Run-Time Engine. It is needed only in executables or DLLs that are linked using an external compiler. Otherwise, it is harmless.
    It should be called in your main, WinMain, or DllMain, function. The parameter values you should pass depend on which of these three functions you are calling InitCVIRTE from. The following examples show how to use InitCVIRTE in each case.
    If you are using main, your code should be as follows.
    int main (int argc, char *argv[])
    if (InitCVIRTE (0, argv, 0) == 0)
    return -1; /* out of memory */
    /* your other code */
    return 0;
    If you are using WinMain, your code should be as follows.
    int __stdcall WinMain (HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpszCmdLine,
    int nCmdShow)
    if (InitCVIRTE (hInstance, 0, 0) == 0)
    return -1; /* out of memory */
    /* your other code */
    return 0;
    If you are creating a DLL, you must call InitCVIRTE and CloseCVIRTE in your DllMain function, as in the following.
    int __stdcall DllMain (void *hinstDLL, int fdwReason,
    void *lpvReserved)
    if (fdwReason == DLL_PROCESS_ATTACH)
    if (InitCVIRTE (hinstDLL, 0, 0) == 0)
    return 0; /* out of memory */
    /* your other ATTACH code */
    else if (fdwReason == DLL_PROCESS_DETACH)
    /* your other DETACH code */
    CloseCVIRTE ();
    return 1;
    NOTE: The prototype for InitCVIRTE is in cvirte.h, not
    utility.h.
    NOTE: In CVI 4.0.1, this function was expanded from one to
    three parameters. Executables and DLLs that were
    created using the one-parameter version of the function
    will continue to work properly.
    /*-------------------- Prototype ---------------------*/
    int InitCVIRTE (void *HInstance, char *Argv[], void *Reserved);
    Nandan Dharwadker
    Staff Software Engineer
    Measurement Studio Hardware Team

  • Adobe Functional Content and the Creative Cloud

    Hello All
    To any Adobe Employee who may read this, can you please get someone at Adobe to take control of this issue and see that the library, templates and all other functional content gets packaged correctly and enabled as a download and "sub-install" for the parent product inside the Adobe Application Manager.
    I think as subscribing users we should get better service and direction from Adobe in regards to this functional content. As I type this I have more than 10 tabs open, each one leading to a thread that has something to do with how to install and fix a problem with the Functional Content for After Effects, Premiere Pro and Encore.
    See if you can in less than 30 minutes figure out exactly what to do to activate this content by reading these threads:
    http://forums.adobe.com/message/4447237#4447237
    http://helpx.adobe.com/x-productkb/multi/library-functional-content-missing.html
    http://forums.adobe.com/message/4418591#4418591
    http://forums.adobe.com/message/4400620#4400620
    http://forums.adobe.com/thread/1006810?start=0&tstart=0
    http://forums.adobe.com/message/4511169#4511169
    http://forums.adobe.com/thread/1028055?tstart=0
    http://forums.adobe.com/message/4417092#4417092
    http://forums.adobe.com/thread/1002454
    http://forums.adobe.com/message/4417092#4417092
    I have been very reluctant to do anything because I am reading a lot of conflicting and incomplete information. This link in particular, http://helpx.adobe.com/x-productkb/multi/library-functional-content-missing.html, is really unhelpful because there are 3 methods to do something but reading it I am not sure if each method does the same thing or if each does one part of the 3 sets of missing Functional Content. Additionally "solution" 3 presents a place to put the content but then leaves out the path we are to do it to.
    Most disappointing is the fact that the first "solution" did not get me the menu buttons I am looking for in Encore and I don't know if I screwed up or if the install was incomplete for some reason.
    Do I now need to install one of the other "solutions"? Those of you in the community that are about to hit reply, please don't. Do not answer that question.
    Here is why...
    Adobe is responsible for delivering us customers a product. It is Adobe's responsibility to fix the mess that a number of paying customers are having regarding this Functional Content.
    TO ADOBE:
    Here is what I and I think a lot of other subscribers want you to do:
    You already have a Solution in place. One that doesn't require a lot of user intervention and doesn't require anyone to pick a "solution" and screw it up, search for more help and spend hours of their time fixing a mess.
    Adobe Application Manager. Create the proper installation packages. Put them on the servers, tell the AAM how to clean up the mess any users who have tried these "solutions" have made. Then have it install the proper packages as a "Sub-Installation" for each of the parent software that it is for.
    This solution will not only make things better for us end users, but you will also make the manageability of the Functional Content easier for your teams as well. And if your teams wanted to add additional Functional Content to any program that is part of the creative cloud or that the Adobe Application Manager manages, then it would be a simple matter of creating an installation package and adding it to the AAM's list of installable programs.
    You just did this exact thing with Lightroom 4.1! Why can you not do this for the Functional Content?!?
    Back to the Community Members that want to answer my post. Don't. Instead if you agree with me or even if you don't, sign off on this thread or indicate your virtual thumbs down. Either way I don't want an answer, I want an action from Adobe, the only ones who can fix the mess.
    I really believe that the Application Manager is the most elegant solution. If any of you have ever used Steam, you know what a great feeling it is when you can download a game demo, try it, buy it and just have everything take care of itself. I don't even have to worry about updates; Steam takes care of my games. And the thing that makes it really valuable? I DON'T PAY $50 A MONTH TO USE STEAM AND HAVE IT JUST WORK, IT IS FREE!
    All I want at this point is Functional Content that I don't have to read a 50+ page manual to install. I know that is an exaggeration, but honestly if it is 1 badly written set of instructions or 50 what does it matter? I don't pay Adobe so I can read up on how to install their software; I just want to use it.
    I guess I should also point out that this is now the second large hold up to my project that I started subscribing for. The first was a problem that I again had to figure out the solution to by working around it, when again Adobe seems to be unable to correct the problem, here, here, here and here.
    And now here I am again at a slight stand still because I can't use my DVD authoring software to create a button on a Wedding DVD menu.
    Okay, you can go ahead and reply... but I would still prefer no answers, just /agree or /disagree.

    Did you even read the post?
    Jeff A Wright wrote:
    For now though please reference Library, title templates, template projects missing: Premiere Pro, After Effects, Encore CS5 - CS6 - http://helpx.adobe.com/x-productkb/multi/library-functional-content-mi ssing.html for information on how to obtain the additional content.
    Have you read the page in your link?
    Can you correctly install from the instructions on that page?
    And I quote:
    Additional Solution: Install the Resource Central library content   
    Download the extra library content
    Choose your language to begin the download:
    English French German Japanese Italian Spanish Korean
    Extract the Library content to the Library folder
    Extract the zip file that you just downloaded. This will create a .7z file, eg. en-US.7z.
    Extract the .7z file to any convenient location, eg. Desktop. This will create a folder based on the language you selected.
    Copy the contents of the language folder (eg. en-US) to the following location:
    Keywords: cpsid_85388
    Where? Copy the contents to where? I don't see a path written there... is it a secret? Do I have to highlight the hidden text? Nooo... that didn't work...
    Honestly I must appologize for my brashness and sarcastic attitude. I find it questionable to expect the paid subscribing creative but not technically inclined customers to do the work of fixing this problem when Adobe has the means and the tools to fix it for us.
    Jeff Bellune wrote:
    Not an employee, but I am a forum moderator.  Please stop spamming the forum with links to this topic.  They have all been deleted.
    Jeff
    Ok. Fair enough, I will admit that last night in my anger and frustration I was being a little childish.
    But as a Community Professional don't you believe that you would be better served by Adobe if they were to make one easy simple Adobe Application Manager download for the content that should have been published right at the launch of the new version? Wouldn't your time be better spent actually working on your projects rather than fixing Adobe's mess and responding to people in 10 different forums trying to help them?
    All of this also makes me wonder how Adobe prioitizes the "bugs" that people are dealing with. Wouldn't it be quick to put a someone or a couple of people on the problem of gathering the functional content and getting them to package it and ready it for publishing through the AAM? The process of adding it to the list of installs might be more complicated but a package that knows where to put the content? I would think that something like this could be give a get it done now priority as it would aleviate a lot of the forum posts and something like the missing export choices in Media Encoder or Premiere Multicamera Issues would take more time due to investigation and so you put them on a priority based on the number of users affected.
    It just seems to me that a month after launching a new version is an awfull long time for the publishing of an update to add functional content that was in all the previous versions.
    I guess I will stop "ranting" now. Thanks for responding Jeff AW, at least I have official word that there will be some sort of update on this issue.

  • In-Place Element Structures, References and Pointers, Compiler Optimization, and General Stupidity

    [The title of this forum is "Labview Ideas". Although this is NOT a direct suggestion for a change or addition to Labview, it seems appropriate to me to post it in this forum.]
    In-Place Element Structures, References and Pointers, Compiler Optimization, and General Stupidity
    I'd like to see NI actually start a round-table discussion about VI references, Data Value references, local variables, compiler optimizations, etc. I'm a C programmer; I'm used to pointers. They are simple, functional, and well defined. If you know the data type of an object and have a pointer to it, you have the object. I am used to compilers that optimize without the user having to go to weird lengths to arrange it. 
    The 'reference' you get when you right click and "Create Reference" on a control or indicator seems to be merely a shorthand read/write version of the Value property that can't be wired into a flow-of-control (like the error wire) and so causes synchronization issues and race conditions. I try not to use local variables.
    I use references a lot like C pointers; I pass items to SubVIs using references. But the use of references (as compared to C pointers) is really limited, and the implementation is insconsistent, not factorial in capabilites, and buggy. For instance, why can you pass an array by reference and NOT be able to determine the size of the array EXCEPT by dereferencing it and using the "Size Array" VI? I can even get references for all array elements; but I don't know how many there are...! Since arrays are represented internally in Labview as handles, and consist of basically a C-style pointer to the data, and array sizing information, why is the array handle opaque? Why doesn't the reference include operators to look at the referenced handle without instantiating a copy of the array? Why isn't there a "Size Array From Reference" VI in the library that doesn't instantiate a copy of the array locally, but just looks at the array handle?
    Data Value references seem to have been invented solely for the "In-Place Element Structure". Having to write the code to obtain the Data Value Reference before using the In-Place Element Structure simply points out how different a Labview reference is from a C pointer. The Labview help page for Data Value References simply says "Creates a reference to data that you can use to transfer and access the data in a serialized way.".  I've had programmers ask me if this means that the data must be accessed sequentially (serially)...!!!  What exactly does that mean? For those of use who can read between the lines, it means that Labview obtains a semaphore protecting the data references so that only one thread can modify it at a time. Is that the only reason for Data Value References? To provide something that implements the semaphore???
    The In-Place Element Structure talks about minimizing copying of data and compiler optimization. Those kind of optimizations are built in to the compiler in virtually every other language... with no special 'construct' needing to be placed around the code to identify that it can be performed without a local copy. Are you telling me that the Labview compiler is so stupid that it can't identify certain code threads as needing to be single-threaded when optimizing? That the USER has to wrap the code in semaphores before the compiler can figure out it should optimize??? That the compiler cannot implement single threading of parts of the user's code to improve execution efficiency?
    Instead of depending on the user base to send in suggestions one-at-a-time it would be nice if NI would actually host discussions aimed at coming up with a coherent and comprehensive way to handle pointers/references/optimization etc. One of the reasons Labview is so scattered is because individual ideas are evaluated and included without any group discussion about the total environment. How about a MODERATED group, available by invitation only (based on NI interactions with users in person, via support, and on the web) to try and get discussions about Labview evolution going?
    Based solely on the number of Labview bugs I've encountered and reported, I'd guess this has never been done, with the user community, or within NI itself.....

    Here are some articles that can help provide some insights into LabVIEW programming and the LabVIEW compiler. They are both interesting and recommended reading for all intermediate-to-advanced LabVIEW programmers.
    NI LabVIEW Compiler: Under the Hood
    VI Memory Usage
    The second article is a little out-of-date, as it doesn't discuss some of the newer technologies available such as the In-Place Element Structure you were referring to. However, many of the general concepts still apply. Some general notes from your post:
    1. I think part of your confusion is that you are trying to use control references and local variables like you would use variables in a C program. This is not a good analogy. Control references are references to user interface controls, and should almost always be used to control the behavior and appearance of those controls, not to store or transmit data like a pointer. LabVIEW is a dataflow language. Data is intended to be stored or transmitted through wires in most cases, not in references. It is admittedly difficult to make this transition for some text-based programmers. Programming efficiently in LabVIEW sometimes requires a different mindset.
    2. The LabVIEW compiler, while by no means perfect, is a complicated, feature-rich set of machinery that includes a large and growing set of optimizations. Many of these are described in the first link I posted. This includes optimizations you'd find in many programming environments, such as dead code elimination, inlining, and constant folding. One optimization in particular is called inplaceness, which is where LabVIEW determines when buffers can be reused. Contrary to your statement, the In-Place Element Structure is not always required for this optimization to take place. There are many circumstances (dating back years before the IPE structure) where LabVIEW can determine inplaceness and reuse buffers. The IPE structure simply helps users enforce inplaceness in some situations where it's not clear enough on the diagram for the LabVIEW compiler to make that determination.
    The more you learn about programming in LabVIEW, the more you realize that inplaceness itself is the closest analogy to pointers in C, not control references or data references or other such things. Those features have their place, but core, fundamental LabVIEW programming does not require them.
    Jarrod S.
    National Instruments

  • A File Reference and its evolving life!

    Hi all,
    I've noticed something that came as a little bit of a surprise to me, but I think I have the explanation, at a hand-wavy higher level anyway.  What I have not established is if this is a 'bug' or a 'feature', and if there are any ways the following issue can be avoided at the NI function/api layer.
    Consider the file open and file close function.  You open a file, you use the reference to the file to write/read data, then at some point you close the reference and the close function spits out the file-path.  Here are a couple of tid-bits you may not be aware of (that are easy to test):
    Q1) After your application opens/creates a file and starts using the file-reference to make file writes, if an external source changes the file-name of that file... guess what will happen on your next write function call?
    A1::  The write successfully updates the newly re-named file with your new data without producing an error or a warning.  (At least this is the case if your program is running on a vxWorks cRIO target and the file-name is changed directly on the cRIO via an FTP browser.)  
    Did this surprise you? It did surprise me!  -My handwavy explanation is that the file-pointer is perhaps managed/maintained by the OS, so when the OS tells the file-system to rename that file, the pointer that LabVIEW holds remains valid and the contents of the memory at the pointer location was updated by the OS.
    Q2) Continuing from the situation setup in Q1, after writing several new chunks of data to a file now currently named something completely different than when the file reference was originally created, you use the close function to close the file-reference.  What do you expect on the file-path output from the close function??  What do you actually get??
    A2::  The close function will 'happily' return the ORIGINAL file-name, not the actual file-name it has been successfully writing to(!).   This has some potentially significant ramifications on how/what you can use that output for.  At this point there is a ton of room for pontifications and more or less 'crazy' schemes for what one could do, but I argue that the bottom line is that your application has at that point completely lost the ability to accurately and securely track your file(s).  Yes, you could list a folder and try and 'figure out' if your file-name was re-named during writing and you can in various ways make more or less good 'guesses' on which file you in reality just had open, but you can never really know for sure.
    So, what do you guys think?? Is the behavior of returning the (incorrect) original file-path when you close the handle a BUG or a FEATURE??  Would it not be possible for LabVIEW to read back the data contained in the (OS?) pointer location and as needed update the file out path data when it closes a reference?  Should we not EXPECT that this would be the behavior?
    Q3)  Again, continuning from the above situation, lets assume we are back at the state in Q1, writing data to a (re)named file.  What happens if the file is deleted by an external process? What happens to the file reference? File function calls using the reference?
    A3::  This one is less surprising.  The file reference remains 'valid' (because it is a valid reference), but depending on the file function you are calling, you will get error such as error 6 (binary write reports this), or error 4 (a TDMS write will report this error), etc.  So as long as you don't rely on file ref-num tests to establish if you are good to go with a file-write or file-action, you should be safe to recover in an appropriate way.. Just don't forget to close the file-reference, even if the file is 'gone', the reference will still remain in memory until you 'close' it (with an error)(?I might be wrong about this last part?)
    I am not sure if the above is possible on e.g. Windows, Windows would probably prevent you from re-naming a file that has an open file-handle to it, but this is definitley observable on at least vxWorks cRIO targets.  (I don't have PharLap ETS or RTLinux devices so I can't test on those targets.. if you want to test its pretty straigth forward to make a simple test app for it.)
    [begin rant-mode related to why I found this out and why this behavior BITES]
    There are situations where the above situation could cause some rather annoying issues that, for somewhat contrived reasons related to cRIO file API performance, CPU and memory resource management, are non-trivial to work around.  for example, using the NI "list folder" to listing folders take a very hefty chunk of time at 100% cpu that you cannot break up, so polling/listing folders after every file update (or even on a less regular interval) is a big challenge, and if you are really unlucky (or didn't know any better) and gave the list command in a folder with 1000's of files (as opposed to less than about 100 files), the list will lock your CPU at 100% for 10's of seconds...  Therefore, you might be tempted to maintain your own look-up table of files so that your application can upload/push/transfer and/or delete files as dictated by your application specific conditions... except that only works until some prankster or well-intention person remotes in and starts changing file-names, because then your carefully maintained list of file-names/paths' suddenly fall appart.
    [\end rant]
    QFang
    CLD LabVIEW 7.1 to 2013

    Hey guys, thanks for turning out your comments on this thread!
    -Deny Access : still able to re-name (and delete) the file via FTP browser (didn't test other file avenues).  I think this is for the same reason that NI vxWorks targets (such as cRIO-9014) do not support the concept of different users with different rights, as such, everyone have access rights to everything at the OS level.  Another issue for me would be that "Deny Access" does not work on TDMS file references, so even if it worked, it would not help me.
    --> I strongly suspect that these things are non-issues or issues that can be properly managed, on the new NI LinuxRT targets since (the ftp is disabled by default) it supports user accounts and user restrictions on files/folders.  The controller could simply create the files in a tree where 'nobody else' has write access.
    Obviously nobody should mess around with files on a (running) cRIO, but customers don't always do what they are supposed to do.   
    As far as the 'resources' or overhead to update the file-refnum with the new information, this would not be needed to be done in a polling fashion, simply, when the file-close function is called, as part of that call it updates its internal register from the pointer data, so this should be a low overhead operation I would think?  If that is a true concern, a boolean input defaulting to not updating or a separate 'advanced close' could be created?
    I've included a zip with the LV2013 project and test VI's (one for tdms one for binary) that I've used. nothing fancy, but in the interest of full disclosure.  The snippet is the 'binary file' test vi, in case you just want a quick peak:
    Steve Bird's findings of (yet) another behavior on Pharlap systems is also very interesting, I think!!
    [EDIT]  JUST TO CLARIFY, on vxWorks, the re-named file keeps being successfully written to, unlike the PharLaps' empty file that Steve Bird found.
    QFang
    CLD LabVIEW 7.1 to 2013
    Attachments:
    cRIO Tests.7z ‏30 KB

  • FV60 - validate duplicate invoices by reference and vendor number

    Hi,
    How to configure the system to validate duplicated invoice by REFERENCE AND VENDOR NUMBER irrespective of dates? This validation need in FV60.

    Hi Paul,
    if you want a duplicate invoice check from the FI side, then you may have to activate BTE 1110 by creating your own Z function module (by copying FM SAMPLE_PROCESS_00001110).
    In  FI,when checking for duplicated invoices, the system compares the following : Vendor, currency, company code, gross amount of the invoice,reference document number and Invoice document date.
    Also refer to SAP Note 305201. It clarifies this in more details.The following fields must be identical for Duplicate invoice check
    Company code (BUKRS)
    Vendor number (LIFNR)
    Currency (WAERS)
    Reference number (XBLNR)
    Amount in document currency (WRBTR)
    Document date (BLDAT)
    If the document is having any one of the above filed different then the system does not consider it as a duplicate invoice.
    In OB41, also check whether the Posting Key is defined as Sales-related. You have to flag this field if the duplicate invoice check is to work.
    Regards,
    SAPFICO

  • How can I compile all functions, procedures and packages with a script?

    I need to compile all functions, procedures and packages of 5 schemas (users) with a script.
    How can I do it?
    Thanks!

    you can create a script to select all invalid objects in those schemas Since Oracle 8 introduced NDS this approach has struck me as a trifle old fashioned. It's much simpler to loop round the query in PL/SQL and use EXECUTE IMMEDIATE to fire off the DDL statements. No scripts, no muss, no fuss.
    Having said that, the problem with this approach and also with using DBMS_UTILITY.COMPILE_SCHEMA is that they do not compile all the invalid objects in dependency order. This may result in programs being invalidated by the subsequent compilation of dependencies. This is due to the introduction of Java into the database.
    The UTLRP script is much better, because it (usually) avoids cyclic references. But you still may need to run it more than once.
    In general it is better to avoid sledgehammer recompilations (like DBMS_UTILITY.COMPILE_SCHEMA, which starts by invalidating all the objects). If we have twenty invalid objects, nineteen of which are dependencies of the twentieth, we actually only need to recompile the master object, as recompiling it will trigger the recompilation of all the others.
    Cheers, APC

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

  • NI-DAQ Function Reference Online Help, Version 6.6

    First, I saw on the National Instruments Home Page that the PDF version of
    the Function Reference Manual has been discontinued in favor of the Online
    Microsoft Help format version. I really prefer the PDF because it prints
    much nicer. Looking at the monitor as many hours as I do is unnerving and I
    find the paper relaxing. The Microsoft Help format is better for searching
    however. I would be much happier if both versions were kept in production
    by National Instruments. (And even happier yet if they gave us developers
    free hardback editions )
    Second, I was discouraged to find that v6.6 of the document (NI-DAQ Function
    Reference Manual for PC Compatibles) does not list the DAQCard-AI-16E-4
    under the
    options for "NI-DAQ Functions Listed by Hardware Product." I
    thought the DAQCard-AI-16E-4 was a popular product and I assume it still
    supports the same functions in 6.6 that is did in the earlier versions. Why
    was it left out? Can I still use the info for the same topic in the 6.5
    PDF?
    For the last part of my documentation gripes, in Appendix B for v6.5 under
    "Valid Internal Analog Input Channels" the DAQCard-AI-16E-4 is listed in the
    second block and the last block. The set of command is different for each
    block so I looked in the v6.6 which lists only the first block and I went
    with that. Is the appearance of DAQCard-AI-16E-4 in the last block on the
    v6.5 doc a typo or does it have significance?

    Don Pellegrino wrote:
    > First, I saw on the National Instruments Home Page that the PDF version of
    > the Function Reference Manual has been discontinued in favor of the Online
    > Microsoft Help format version. I really prefer the PDF because it prints
    > much nicer.
    This doc can be found on ni.com:
    http://digital.ni.com/manuals.nsf/14807683e3b2dd8f8625677b006643f0/1630a0b68738b269862567c1007a2912?OpenDocument
    > I thought the DAQCard-AI-16E-4 was a popular product and I assume it still
    > supports the same functions in 6.6 that is did in the earlier versions.
    To the best of my knowledge, yes it does.
    Regards,
    Rich Yavorsky
    NI

  • Imaq vision function reference

    Hello All,
    I am new to Lab Windows/CVI and am using the imaq vision library.
    Could anyone tell me where I can find the IMAQ Vision function reference? I have found a function reference manual at Start--> National Instruments --> Vision--> Documentation. But, all the functions described in this document are starting with img******(). I was looking for functions beginning with imaq****().
    I am sorry as it might be a stupid question but any help would be appreciated.
    Cheers, 
    Solved!
    Go to Solution.

    Hello Harmonium,
    i think what you search is under Start --> National Instruments --> Vision --> Documentation --> NI-IMAQ IO
    In this directory you found the documentation for the imaq**** functions.
    C:\Programme\National Instruments\NI-IMAQ IO\Docs 
    There are three librarys the NI-IMAQ I/O, NI-IMAQ Librarys and the NI-IMAQdx. If you can please use the NI-IMAQdx library,
    because its the newest for doing aquisition. The documentation can be found here
    C:\Programme\National Instruments\NI-IMAQdx\Docs
    best regards
    Alexander Glasner
    AE NIE

  • 3113: Activity 'XXPONIT/233480' is missing a function reference.

    Hello All,
    I have designed a workflow in which i have to call workflow for n number of times.
    In this workflow i have taken one notification and one function . when user submits workflow, its reached to user's parent level(1). If it approves then forwarded to function. it will check whether for that parent level(1) parent is found or not. if parent is found then it will identify the parent level(2) and sets into Attribute level(1) .
    and forwarded back to notification.
    when i am trying to run this workflow am getting the *(3113: Activity 'XXPONIT/233480' is missing a function reference.) error.
    Eg. ____________Yes_______
    | |
    v Approve | No
    Start---> Notification ------------------> function ------------------> End
    | ^
    |_____________________________________|
    Reject
    I am pasting pl/sql code here: Suggest me where i am wrong:
    create or replace package body XXPO_WF_NIT_APPROVAL_PKG is
    v_user_id number;
    v_user_name VARCHAR2(15);
    v_flag_parent_exist varchar2(1);
    v_item_key NUMBER;
    PROCEDURE WF_START_PROCESS(p_user_id NUMBER) IS
    v_initiator varchar2(15);
    BEGIN
    /*To generate Unique Value for item key*/
    SELECT XXPO_NIT_SEQ.nextval INTO v_item_key FROM dual;
    dbms_output.put_line('item key ' ||v_item_key);
    /* To create Workflow Process*/
    wf_engine.CreateProcess(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    process => 'NIT_PROC');
    /* For Getting Initiator name who has initiated workflow*/
    SELECT fu.user_name INTO v_initiator
    FROM fnd_user fu
    where user_id = p_user_id;
    /*for getting next approver level user name and user Id*/
    SELECT fu1.user_name,fu1.user_id INTO v_user_name,v_user_id
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061 /*PO Test NIT Heirarchy*/
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = p_user_id/*1547*/ )));
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'INITIATOR',
    avalue => v_initiator);
    dbms_output.put_line(v_initiator);
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'ATR_LEVEL1',
    avalue => v_user_name);
    dbms_output.put_line('6');
    wf_engine.StartProcess(itemtype => 'XXPONIT',
    itemkey => v_item_key);
    COMMIT;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':No data found' || SQLERRM);
    WHEN DUP_VAL_ON_INDEX THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':Duplicate values found' || SQLERRM);
    WHEN OTHERS THEN
    dbms_output.put_line('In WF_START_PROCESS' ||SQLCODE || ':Other Exception' || SQLERRM);
    END WF_START_PROCESS;
    --====================End of WF_Start procedure================
    procedure is_comment_null(itemtype IN VARCHAR2,
    itemkey IN VARCHAR2,
    actid IN NUMBER,
    funcmode IN VARCHAR2,
    resultout OUT VARCHAR2) is
    v_comments_fst_level varchar2(200);
    v_result_fst varchar2(100);
    v_count number;
    BEGIN
    v_comments_fst_level := WF_NOTIFICATION.GetAttrText(WF_ENGINE.CONTEXT_NID,
    'COMMENT_FST');
    v_result_fst := WF_NOTIFICATION.GETATTRTEXT(WF_ENGINE.CONTEXT_NID,
    'RESULT');
    dbms_output.put_line(v_result_fst);
    IF( FUNCMODE = 'RESPOND') THEN
    IF (v_result_fst = 'REJECTED') THEN
    IF v_comments_fst_level IS NULL THEN
    RESULTOUT :='ERROR: Comment is required while rejecting the request';
    RETURN;
    END IF;
    END IF;
    END IF;
    dbms_output.put_line(SQLCODE || ':No data found' || SQLERRM);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line('is_comment_null'|| SQLCODE || ':No data found' || SQLERRM);
    WHEN DUP_VAL_ON_INDEX THEN
    dbms_output.put_line('is_comment_null' || SQLCODE || ':Duplicate values found' || SQLERRM);
    WHEN OTHERS THEN
    dbms_output.put_line('is_comment_null'|| SQLCODE || ':Other Exception' || SQLERRM);
    END is_comment_null;
    --===================================
    PROCEDURE Next_approver(ITEMTYPE IN VARCHAR2,
    ITEMKEY IN VARCHAR2,
    ACTID IN NUMBER,
    FUNCMODE IN VARCHAR2,
    RESULTOUT OUT NOCOPY VARCHAR2)
    IS
    v_count number;
    BEGIN
    --==============To initiate next approval workflow================
    IF( FUNCMODE = 'RUN') THEN
    SELECT count(fu1.user_name) INTO v_count
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = v_user_id)));
    IF v_count > 0 THEN
    v_flag_parent_exist := 'Y';
    /* To get next approver name */
    SELECT fu1.user_name INTO v_user_name
    FROM per_all_assignments_f paaf1,
    fnd_user fu1
    WHERE paaf1.person_id = fu1.employee_id
    AND paaf1.position_id IN (SELECT ppse.parent_position_id
    FROM per_position_structures pps,
    per_pos_structure_elements ppse
    WHERE pps.position_structure_id = ppse.pos_structure_version_id
    AND pps.position_structure_id = 4061
    AND ppse.subordinate_position_id IN (SELECT DISTINCT paaf.position_id
    FROM Per_All_Assignments_f paaf
    WHERE paaf.position_id IS NOT NULL
    AND paaf.person_id IN (SELECT papf.person_id
    FROM per_all_people_f papf,
    fnd_user fu
    WHERE fu.employee_id = papf.person_id
    AND papf.current_employee_flag = 'Y'
    AND trunc(SYSDATE) BETWEEN papf.effective_start_date
    AND papf.EFFECTIVE_END_DATE
    AND fu.user_id = v_user_id)));
    --WF_START_PROCESS(v_user_id);
    wf_engine.SetItemAttrText(itemtype => 'XXPONIT',
    itemkey => v_item_key,
    aname => 'ATR_LEVEL1',
    avalue => v_user_name);
    ELSE
    v_flag_parent_exist := 'N';
    END IF;
    END IF;
    IF v_flag_parent_exist = 'Y' THEN
    RESULTOUT := 'Y';
    ELSE IF v_flag_parent_exist = 'N' THEN
    RESULTOUT := 'N';
    END IF;
    END IF;
    END Next_approver;
    end XXPO_WF_NIT_APPROVAL_PKG;
    Thanks,
    sheetal Mittal

    HI
    I believe the document that you are looking for can be found in the following location. This help file describes the NI-DAQmx Library functions, which you can use with National Instruments data acquisition and switch devices to develop instrumentation, acquisition, and control applications.
    Message Edited by jaced on 11-05-2007 12:18 PM
    JaceD
    Signal Sources Product Support Engineer
    National Instruments
    Attachments:
    NI-DAQmx C help.jpg ‏98 KB

  • If you are looking for the Project Siena Functional Reference ...

    Hello,
    If you are looking for the functional reference direct link
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html
    Regards
    StonyArc

    Hope you are refering it to the actual page, which you invoke for any cfm/cfc request then yes, its extension would be .cfm/.cfc page but if you are refering it to its corresponding encoded pages from {ColdFusion10}\cfusion\wwwroot\WEB-INF\cfclasses then its extension would be .class.
    Regards,
    Kaif Akbar

  • Getting "museJSAssert: Error calling selector function: Reference Error: Web Pro is not defined".

    First off, I am not a coding person. I decided to use Muse becuse I am good with Illustrator and Photoshop.
    The sight I built: www.speedcinch.com is now getting a bunch of errors when it initially was working fine. I am using godaddy for a host and using their ftp.
    This is the error I am getting now: museJSAssert: Error calling selector function: Reference Error: Web Pro is not defined
    You can see how my sight is supposed to work at http://speedcinchcom.businesscatalyst.com/index.html
    I have no idea what to do. Please help.

    Well, if nothing else I've ascertained that it's not GoDaddy's connectivity issue, as the issue continues late into today, and it does vary a bit per the other error reports. Using FileZilla there are just a few timeouts in the log, enough to give some pause but not necessarily (according to GD) disruptive. I've checked the list of uploaded files against the Muse Export folder contents and everything is there. In fact, the site looks good, buttons work, rollovers, etc, but there are no images. Like everyone else, this has cost me time and money in the last 24 hours.
    Let's see what the good people at Adobe live chat have to say, and I'll share it with you.

  • Re: User Session using ServletSession and Stateful EJB in Cluster

              Sorry , I didn't use WLS 6.0, we use wls 5.1 in production.
              But in Wls 6.0, in some situations , the state of the stateful session bean can be lost. So it's not so reliable. You have to deal with it in the client code. Instead, servlet is a reliable solution.
              In order to test under wls6.0, you can store the handle of the EJBObject in the HttpSession, not in jndi, cos if the instance fails, all its objects will be removed by remaining instances from jndi. In another instance, you get the handle, and try to get the EJBObject.
              In wls5.1, some information like the server url must be embeded inside the handle. But in wls6.0, I don't know how they deal with it.
              I am looking forward to your results
              "Anuj Soni" <[email protected]> wrote:
              >
              >What kind of clustering problems you had with WL6.0 for Stateful session beans ? It will be helpful for me to know before hand.
              >
              >BTW, how were you able to test stateful session beans in a cluster under WL6.0 i.e. were you storing the Handle or EJBObject in HttpSession or did you store it in JNDI ?
              >
              >Thanks,
              >
              >Anuj
              >"Tao Zhang" <[email protected]> wrote:
              >>Although it's very advanced to take advantage of both http session and
              >>stateful session bean replication, but if you rely on the stateful session
              >>bean's state, you will be in trouble. Because the support of stateful
              >>session bean's replication is not perfect in wls6.0. We already chaned
              >>almost all stateful session beans into servlets or entity beans.
              >>
              >>I am not sure about the handle of the EJBObject. I think it should be able
              >>to reconstruct for us otherwise we can't use the handle any more.
              >>
              >>You can do a test. BTW, could you tell me the result?
              >>
              >>Thanks.
              >>
              >>Anuj Soni <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> Hi,
              >>>
              >>> I am designing the workflow for my web application using a Stateful
              >>session bean. As Weblogic 6.0 supports clustering of stateful session bean
              >>and HttpSession(in-memory replication), I want to use the combination of
              >>both techniques to provide load-balancing and fail-over safety for user
              >>sessions and their corresponding workflows.
              >>>
              >>> The question I have is that, Is Handle obtained using
              >>EJBObject.getHandle(), fail-over safe (for a clusterable stateful bean), so
              >>that I can reconstruct the reference to EJBObject on the secondary server
              >>incase of primary server crash.
              >>>
              >>> My understanding is that I should store Handle in the HttpSession as it is
              >>Serializable not the EJBObject. The weblogic 6.0 document only talks about
              >>the replica-awareness of EJBObject.
              >>>
              >>> If my above assumption is incorrect, Can you tell me how else I can
              >>achieve my goal ?
              >>>
              >>> Thanks in advance.
              >>>
              >>> Anuj Soni
              >>
              >>
              >
              

    Any one tested this scenario yet? i.e: storing the handle to an EJB object and then trying to re-use after the HttpSession is restored?
              Thanks.
              

Maybe you are looking for

  • Adobe Acrobat Pro 9 Header/Footer

    It is easy to add, edit or remove a footer on a PDF document. It is possible to add the page number, the date, or a text by the "Document - Header & Footer". My question is: Is it possible to include an AutoText in the footer of a PDF? I need the Fil

  • Any other forum ???

    Hello, Is there any other place on the Internet to ask questions on SAP? Particularly on: SAP Security, ABAP and XI. Thanks, Charles.

  • How to access a table of another function ?

    Hello, I am writing a function called TEST that calls the "BAPI_DOCUMENT_GETDETAIL2" now in the declaration of the "BAPI_DOCUMENT_GETDETAIL2" under the tables tab there are the following tables: OBJECTLINKS. DOCUMENTFILES. How can i access the inform

  • CLEAN-UP START DISK...

    Hey Guys! I am new here & I have a quick question about clearing my start up disk so the operating system can run a bit faster .. In my about mac it displays that I have accumallated 89.14 GB in OTHER...WOW, I know! How do I go about clearing out the

  • Invalid Apple ID certificate???

    I just tried to do an 'Air Drop'  file transfer from my Mac mini to my MBP. I have done this many times before... with no problems. This time I got a dialogue after I had agreed to send the slelected file Stating that the ID certificate for my ID is