Meaning of functions

public void createEmployee()
OAViewObject vo=getSunSystemsVO1();
if(!vo.isPreparedForExecution())
vo.setMaxFetchSize(0);;
Row row=vo.createRow();
vo.last();
vo.next();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
Can anybody explain me the meaning of each function in above method and how the whole thing is proceeding?
Thanks & Regards
Varun

Hi,
The code is written to create a new empty record.
1) vo.setMaxFetchSize(0) - this is written so as not to fetch any record from this VO. If you are performing search operation on this VO, then you would have set setMaxFetchSize(-1).
2) Row row=vo.createRow() - this will simply create a new empty row based on the VO being used.
3) vo.last() & vo.next() - you will use these lines so that when you click add new row button, new row should insert at the bottom (first going to last row then next to that..)
4) vo.insertRow(row) - This will simply insert the create row into the VO used.
5) row.setNewRowState(Row.STATUS_INITIALIZED) - When you make a row state as STATUS_INITIALIZED, BC4J removes the corresponding entity objects from the transaction and validation listener lists, so they will not be validated or posted to the database. As soon as the user makes a change, the EO's state changes to STATUS_NEW.
--Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Hi, Does anyone know when Apple may be introducing a smaller more managable IPhone so we dont have to carry a brick around with us anymore. Even if this means less functions that, lets be honest, we dont all use at all. Many thanks

    Hi, Does anyone know when Apple may be introducing a smaller more managable IPhone so we dont have to carry a brick around with us anymore. Even if this means less functions that, lets be honest, we dont all use at all. Many thanks

    jamesfromjersey ci wrote:
    Hi, Does anyone know when Apple may be introducing a smaller more managable IPhone so we dont have to carry a brick around with us anymore. Even if this means less functions that, lets be honest, we dont all use at all. Many thanks
    From the terms of use of this forum:
    "do not add Submissions about nontechnical topics, including:
    Speculations or rumors about unannounced products."

  • How to - customize datasource by means of 'Function module'  via 'RSO2' ?

    Wilson, the topic of Function Module extractors is well documented in the forums - please search the forums before posting
    +__Hi,Expert:__+
    +__Could you please kindly advise me how to customize datasource by  'Function module',__+
    +__and which aspects I should pay more attention?__+
    +__Or provide me valuable documentation.__+
    +__Thanks very much !__+
    Edited by: Arun Varadarajan on Feb 11, 2009 9:58 AM

    Hi Wilson,
                  Check here..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Generic extractor based on function module RSAX_BIW_GET_DATA_SIMPLE
    Thanks,
    Vijay.

  • Help on Partner Function

    Dear All,
    Please tell me what is the purpose of Partner Function 'SP - Forwarding Agent'? What is its meaning, its function & procedure how can I use it?
    In my company, we have some orders from our Dealers. Means they are only bringing the orders, neither they are Sold-to-party nor ship-to-party.
    For such type of Orders, we give commissions to these dealers. Now, I want to keep track record of such type of orders. So where can I mention these Dealers in Sale Order or I have to use some Partner Function?
    Regards,
    Vishal

    Hi Vishal
    First of all , the purpose of Partner Function - " Forwarding Agent" is that the partner will be sending the stock and he will be as a mediator between company and customers.Now if you have dealers and if they are neither Sold to Party nor Ship to Party . But if they are regular dealers then maintain them as a Sold to party.If they
    But as per your company norms , if those dealers wont come under Sold-to-party nor Ship-to-party. then maintain them as a Forwarding Agent. who are supplying the stock and for getting the orders you are paying commisions. then i suppose your requirement should be fulfilled
    Regards
    Srinath

  • Delaying a function so ADF will get all the selected rows and run only 1 time ?

    Hello,
    I'm using JDeveloper 12.1.2.0.0.
    I have a group of functions that are executed after i click on one or more rows, which is called:
    public void onDimProjectSelect(SelectionEvent selectionEvent)
    Whenever i shift-click some rows (lets say, for the purpose of this example, that i shift-click the 1st row to the 5th row, so i shift select and i get selected the rows: 1,2,3,4 and 5).
    I did notice that what happens is that the function onDimProjectSelect will execute with the 1st row, and after it runs all the functions, it will run again the function onDimProjectSelect with the 1, 2, 3, 4 and 5 rows as it should in the first place.
    Why is this happening? I've tried to add a delay but i did not work.
    This is really a pain because its spending time executing a function without all of the rows that is suppose to have, so it will run again.
    I think the problem here is how ADF does the selections for the function but i don't know how to change it.
    Any ideia of why is this happening? What can i do to correct this?
    Regards,
    Frederico.

    Hey Frank,
    I mean that my function onDimProjectSelect has other functions inside that need to be executed so when i say that is runs all the functions i mean the functions that are suppose to execute when onDimProjectSelect is executed.
    Maybe the problem is my implementation approach but it was required to use the selection. But the funny part is that i select with the shift-click and he knows that, since it will run the function with all the rows that are selected but firstly he will execute the function with just the first selected row.

  • How can I include a parsys inside a javascript function.

    I am using radio button provided by CQ5.4.
    I am writing a javascript function which checks whether a radio button is being clicked or not..
    If the radio button is being clicked an alert window is opening ..this means that function is being called when radio button is being clicked.
    but when I try to include parsys instead of alert window, when the radio button is being clicked..the parsys is not appearing..
    Can u please help me that how should i write the "<cq:include>" for parsys inside the javascript function so that it starts appearing on click of the radio button.
    THANKS
    ASHWANI

    Ashwani,
    I would recommend detecting the WCMMode and always showing the parsys if the page is displaying in edit or design mode:
    http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/WCMMode.html
    Unless there is a really good reason to hide the section from authors, it's generally confusing to authors to hide a section.  Additionally, hiding a parsys in JavaScript can cause strange artifacts as the drag and drop section of the parsys won't be hidden with the content of the parsys.
    -Dan

  • Explain plan in procedure or function

    Hi
    I want to know how can i do explain plan in procedure or function. Any ideas or solution how can i do that? ;/

    I mean inside function ;p
    When i try execute function I always get error:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "HR.EXPLAIN_PLAN_SQL", line 34
    14551. 00000 - "cannot perform a DML operation inside a query "
    *Cause:    DML operation like insert, update, delete or select-for-update
    cannot be performed inside a query or under a PDML slave.
    *Action:   Ensure that the offending DML operation is not performed or
    use an autonomous transaction to perform the DML operation within
    the query or PDML slave.
    heh... I got this error because its pipelined function. I forget about that ;p
    Sorry for my english and thx for help. :)

  • Evaluate function in teststand status expression

    Hello,
    I can not understand the meaning of function Evaluate() in below sentence,and can not find the explanation in help files,could someone help me ?
    Step.DataSource != "Step.Result.PassFail" ? Step.Result.PassFail = Evaluate(Step.DataSource) : False, Step.Result.PassFail ? "Passed" : "Failed" 
    Solved!
    Go to Solution.

    As an added point of reference, we use the "Evaluate()" function to to parse Variables in a Step Name for TestStand steps.  This makes our steps very readable and FAST to code in TestStand.
    For example our tests to communicate to a device might be to write a value to a value to a specific parameter, such as writing a Setpoint Value.  So the TestStand step name would look like:
    [] Writeetpoint(1)=200
        Where Setpoint is the Parameter Name, (1) represents the Instance, and 200 is the value written
    However we use the Evaluate() function to parse out variables:
    Locals.sParameter = "Setpoint"
    Locals.nInstance = 1
    Parameters.nValue = 200
    []Write:{L.sParameter}({L.nInstance})={P.nValue}
       (We use a shortened version of L. for Locals., P. for Parameters., etc. because it doesn't take up so much space on the Step Name)
    We have a library subsequence (Check for Curly Brackets to be parsed) that parses out any variables that are enclosed in the {} curly brackets.
      Replace "L." with "Locals.", etc. and then parse out the variables in the Pre-Expression, 
    and then EVALUATE the variables in the Post-Expression:
    Locals.sTemporary ="RunState.Caller.RunState.Caller."& Locals.sVariable,
    'If the variable exists, resolve it, if not replace it with '{ERROR}' and continue.
    Locals.sTemporary =( PropertyExists(Locals.sTemporary)? Evaluate(Locals.sTemporary)  :"{ERROR}"),
    'Put the resolved variable (or error) back in place of its name
    Locals.sWorkingString = Locals.sBeforeVar & Locals.sTemporary & Locals.sAfterVar
    Also, during runtime, if there happens to be an error in the StepName, we can edit it and continue on using a "Set Step Name" tool.
    Mike

  • Mean vs average

    Hi,
    The "mean" tool in help is described as:
    "mean is the mean, or average, of the values in the input sequence X."
    However, when feeding a very large array of single precision numbers into this function, I get a different result than when I take the same array, total up the values in the for loop, and divide by number of samples. 
    Opening up the "mean" tool vi, it is a dll call which I can't tell what is being done under the hood.
    The size of the array has 3,554,361 elements, the source of which is a tdms file where we've gather current data over a period of roughly 49 hours.  There was a enough of an error where a noticable difference in our mAh calculation was apparent (value achieved during the test run which is a straight average vs the value calculated upon reloading the data using the "mean" function), thus causing my investigation into the matter. 
    So it appears "mean" and "average" are not really the same as the help file implies.  Is this intentional or a bug?
    Thanks
    David Jenkinson
    Solved!
    Go to Solution.

    david_jenkinson wrote:
    So is there an internal "cast to double" in the mean vi function? 
    Yes, there is a red coercion dot! (Watch for terminology: It is a conversion, nothing to do with casting!)
    david_jenkinson wrote:
    Also, if I'm understanding correctly, is not a conversion from single to double just adding zeros?
    No, it is adding singificant amounts of mantissa bits to the representation, thus allowing more accurate computations for the additions and division. If you only have 6 significant decimal digits, every addition will be coerced to the nearest binary value. If you do that a few million times, the error will be large.
    Look at the following example. Just reversing the array causes a significantly different "average", so which one is right?
    (If you would do the same in DBL, the difference between the two results would be around 10E-9, i.e. insignificant.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SGLAverage.png ‏8 KB

  • To create bapi?(function module for bapi i.e. checks and update table)

    Hi all,
      I want to know how to create BAPI?. means in function module how i hv to put checks and how i will update database table.
    thanks and regards
    sg

    BAPI STEP BY STEP PROCEDURE: -
    http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
    BAPI Programming guide: -
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
    BAPI user guide: -
    http://help.sap.com/saphelp_46c/helpdata/en/7e/5e115e4a1611d1894c0000e829fbbd/frameset.htm
    Example:-
    http://www.erpgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • Functional specs for output of ship and debit contract

    Hi All,
    Does anyone have a doc on the functional specs for output of ship and debit contract? If so pls email me at [email protected]
    With Thanks & Warm Regards
    SK

    What is the exact info which you are looking for regarding ship and debit contract?. What do you mean by functional specs..?.

  • How to avoid a function module runnning parallely twice

    Hello,
              There is a scenario, where user calls a function module via RFC.
    The requirement is to avoid the user from running the function module parallely twice or more because it may lead to dead lock problems.
             To realize this creation of a new enqueue object and set up of enqueue of this object in the function is suggested.
            If the object is blocked (which means the function is already being
    running by the sorter), it should go out of the function.
           Can i get help in locking this function module during execution.
    With Best Regards,
               Adarsh.

    Here's a sample of how you might do this - see comments in code for explanation.. run the program in two differ SAPGui sessions to see the effect.
    report zlocal_jc_tfdir_lock.
    start-of-selection.                                                   
      perform set_and_check_lock.                                                                               
    form set_and_check_lock.                                              
    *" Use SAP enqueue to prevent multiple RFC calls of same object       
      data:                                                               
        l_object             like tfdir-funcname.                                                                               
    *" Build some name that is specific to your needs                     
    *" Include sy-uname in key if lock is per user, not for process                                                                               
    concatenate '#Z LOCK:' sy-uname into l_object.                      
    *" and enqueue                                                        
      call function 'ENQUEUE_ESFUNCTION'                                  
           exporting                                                      
                funcname       = l_object                                 
           exceptions                                                     
                foreign_lock   = 1                                        
                system_failure = 2                                        
                others         = 3.                                                                               
    if not sy-subrc is initial.                                         
        message e398(00)                                                  
          with                                                       
            l_object 'is held by' sy-msgv1 space.                    
      else.                                                          
        write: / l_object, 'is now locked - check sm12 for proof'.   
      endif.                                                                               
    endform.

  • How to check if my function is MT-safe?

    I wrote some functions in a multi-thread program.
    I can check if a function is MT-safe by man it.
    But I'm not sure, if a function calls only MT-safe functions means this function is MT-safe too?
    Any help is appreciated.
    Jenny

    Hi Jenny,<br><br>
    This is a difficult subject and I don't think there would be<br>
    a tool to give you a definitive answer. However, have a look at<br>
    the lock_lint tool. It is part of the Sun compiler distribution<br>
    in /opt/SUNWspro/bin and is used to verify the use of locks in<br>
    multi-threaded programs.<br><br>
    Hope this would be useful.<br>
    <br>
    Caryl<br>
    Sun DTS<br>

  • Deleting main EAN (MEAN-HPEAN = 'X') in retail material master data

    Hello experts,
    I have a customer (IS Retail) that realized, after data migration from legacy system, that many EAN including the main ones were obsolete or wrong. They asked me to clean all the EANs for a set of items, before deciding the new ones to be migrated.
    I tried 'BAPI_MATERIAL_MAINTAINDATA_RT' that deletes all EAN but not the main one, and I can manage to remove the flag of main ean (MEAN-HPEAN = 'X'), but after that I cannot cancel the last EAN anyway, because in effect it's not correct, as SAP best practices suggest.
    Please consider that all OSS notes available have been implemented, and that I have checked with all available threads and posts on the network with no answer.
    Could please somebody help me?
    thanks in advance
    Chiara

    Hello,
    I used this 'BAPI_MATERIAL_MAINTAINDATA_RT' (that works for RETAIL solutions, otherwise you have to use 'BAPI_MATERIAL_SAVEDATA')
    DATA: T_BAPIE1MATHEAD TYPE BAPIE1MATHEAD OCCURS 0 WITH HEADER LINE.
    DATA: T_RET TYPE BAPIRETURN1 OCCURS 0 WITH HEADER LINE..
    DATA: T_MEAN TYPE BAPIE1MEANRT  OCCURS 0 WITH HEADER LINE.
    (You have to select the material number and EANs you want to delete in two internal tables, such as T_MARA1 and *T_MEAN1, then loop at those tables and:)
          REFRESH: T_BAPIE1MATHEAD, T_MEAN. "T_MARA, T_MARAX.
    *header
          T_BAPIE1MATHEAD-FUNCTION = '003'. "function code for DELETING
          T_BAPIE1MATHEAD-MATERIAL = T_MARA1-MATNR.
          T_BAPIE1MATHEAD-NO_APPL_LOG = 'X'.
          APPEND T_BAPIE1MATHEAD.
    *mean
            T_MEAN-FUNCTION = '003'.
            T_MEAN-MATERIAL = T_BAPIE1MATHEAD-MATERIAL.
            T_MEAN-UNIT = 'ST'.
            T_MEAN-UNIT_ISO = 'PCE'.
            T_MEAN-EAN_UPC = T_MEAN1-EAN11.
            T_MEAN-EAN_CAT = T_MEAN1-EANTP.
            APPEND T_MEAN.
          CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
             EXPORTING
               HEADDATA                   = T_BAPIE1MATHEAD
            IMPORTING
              RETURN                     = T_RET
         TABLES
          INTERNATIONALARTNOS        = T_MEAN
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT = 'X'.
    *(Close the loops) This works for all NON MAIN EAN, but not for the main.
    If you are in a non-retail system, this changes into:
    **header
          T_BAPIMATHEAD-MATERIAL = T_MARA1-MATNR.
          APPEND T_BAPIMATHEAD.
            T_MEAN-UNIT = 'ST'.
            T_MEAN-UNIT_ISO = 'PCE'.
            T_MEAN-EAN_UPC = T_MEAN1-EAN11.
            T_MEAN-EAN_CAT = T_MEAN1-EANTP.
            T_MEAN-DEL_FLAG = 'X'.
            APPEND T_MEAN.
         CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
            EXPORTING
            HEADDATA            = T_BAPIMATHEAD
          TABLES
              INTERNATIONALARTNOS = T_MEAN.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
            WAIT = 'X'.
    hope this can help
    kind regards
    chiara

  • Function do work in only one frame

    this function showing in all frame on stage....i want to it within a perticular frame
    function callThumbs() {
        _root.createEmptyMovieClip("sliderBox",_root.getNextHighestDepth());
        sliderBox._x = _root.gallery_x=30;
        sliderBox._y = _root.gallery_y=30;
    sliderBox.addEventListener(MouseEvent.CLICK);
        var clipLoader = new MovieClipLoader();
        var preloader = new Object();
        clipLoader.addListener(preloader);
        for (i=0; i<myImagesTotal; i++) {
            thumbURL = myImages[i].attributes.thumb_url;
            myThumb_mc = sliderBox.createEmptyMovieClip(i, sliderBox.getNextHighestDepth());
            myThumb_mc._x = _root.thumb_height*i;
            clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
            preloader.onLoadStart = function(target) {
                target.createTextField("my_txt",target.getNextHighestDepth(),0,0,1,1);
                target.my_txt.selectable = false;
            preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
                target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
            preloader.onLoadComplete = function(target) {
                new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
                target.my_txt.removeTextField();
                target.onRelease = function() {
                    callFullImage(this._name);
                target.onRollOver = function() {
                    this._alpha = 100;
                target.onRollOut = function() {
                    this._alpha = 100;

    In what way do you mean the function is in all frames?  If you write the function on a layer of its own and only provide one frame for it, it will only exist in that one frame.
    If you mean that what the function creates lives throughout the timeline, then that is because you are creating content dynamically without securing it to an object that has a home in the timeline.  Dynamically created content does not have a home in  the timeline unless you make it a opart of something that has been manually affixed to the timeline, like a movieclip.
    So what you might try is to manually add an empty movieclip in the frame where this code is (on a separate layer) and assign it an instance name, let's say you name it "container".  Then you can change the following line from...
    _root.createEmptyMovieClip("sliderBox",_root.getNextHighestDepth());
    to
    container.createEmptyMovieClip("sliderBox",container.getNextHighestDepth());
    and that should end up retsricting the dynamically created movieclip to the frame where the container is.  If there is any other content being added to the _root, that too should be retargeted to the container.

Maybe you are looking for

  • Saving ' in database

    I have a description field. Need to allow to save ' in the description. I have the following statements: String str = "insert into table (Description) values (" + "'" + desc + "')" ; where desc is the value inputted by the user. In case the user ente

  • How to enter BIOS mode on Satellite 5200?

    Hello! I own a Satellite 5200-801 and Ive recently bought a new CD/DVD - rom cause the original just died. The thing is that the drive I bought is from US market and my laptop is European. So Ive double checked all the serial numbers on it and everyt

  • Found a burned chip.  Looking for name and type.

    Hello again, AMB group. I looked for similar pictures/ posts, but I did not find something with the detail here. Anyway, I've got a problem where my hard drive won't even spin up (seems like no power to the drive) but everything else checks out fine

  • Is it possible to lock a folder with a passcode?

    Hi, This is more of a request then needing help on it, but is it possible to lock folders with a passcode? this would be very useful for me because I am very irresponsible and can't stop myself from playing games, and adding a passcode would make me

  • Synchronous & Asynchronous BAPI

    Hi, I understand the basic difference between Sync & Async BAPIs that the client waits for the response in case of Synchronous BAPI. But I would really appreciate if anybody can give me little more details as to how it is implemented or probably poin