Regarding Node methods........?

Hi all,
In my scenario ,i have a column of chekboxes in my ALV.aftr that user can select any no checkboxes.
whwn user check on checkbox,the record must selected and finally i have to pass all those selected records into on table.
how can do it?
method ON_DATA_CHECK .
data:
    Node_Ep_Sch_Info                    type ref to If_Wd_Context_Node,
    Elem_Ep_Sch_Info                    type ref to If_Wd_Context_Element,
    lt_Ep_Sch_Info                    type If_Ep_Sch_Details=>Elements_Ep_Sch_Info ,
    ls_Ep_Sch_Info                    type If_Ep_Sch_Details=>Element_Ep_Sch_Info ,
     lv_checked                       type If_Ep_Sch_Details=>Element_Ep_Sch_Info-CHK_BOX.
     Node_Ep_Sch_Info = wd_Context->get_Child_Node( Name = IF_EP_SCH_DETAILS=>wdctx_Ep_Sch_Info ).
  Node_ep_sch_info->get_static_attributes_table( importing TABLE = lt_ep_sch_info ).
LOOP AT LT_EP_SCH_INFO INTO LS_EP_SCH_INFO.
IF LV_CHECKED EQ 'X'.
Node_ep_sch_info->SET_SELECTED( ).
ENDIF.
ENDLOOP.
    Node_ep_sch_info->GET_SELECTED_ELEMENTS( ).
endmethod.
i used above scenario.here what is the return type of GET_SELECTED_ELEMENTS( ).how can i pass these selected elements into one table?
Regards,
Ravi.

Hi ravi
Create a internal table it_newdata having same structure as your context node, to do so:
Data: it_newdata   type  IF_viewname=>elements_nodename.
Say if I have a view called DISPALY having a context node 'DATA'  then to declare a internal table having the same line type as of attributes of data write:
Data: it_newdata  type if_display=>elements_data,
       ls_newdata   like line of  it_newdata.      " work area
Now as I mention in my previous reply in the loop statement, fill the internal table it_newdata .
loop at it_selected_row into ls_selected_row.
*get all the attributes of every element
CALL METHOD ls_selected_row->get_static_attributes
IMPORTING
static_attributes = stru_Ep_Sch_Info.
ls_newdata-attrib1 = stru_Ep_Sch_Info-attrib1.
ls_newdata-attrib2 = stru_Ep_Sch_Info-attrib2.
ls_newdata-attrib3 = stru_Ep_Sch_Info-attrib3.
append ls_newdata to it_newdata .
clear: ls_newdata.
endloop.
Read your node say : DATA using code wizard which you want to fill. It will give you stryu_data, elem_data and node_data. use node_data
Now bind the data to the context node
  Node->Bind_Table(
    New_Items =  it_newdata
    Set_Initial_Elements = Abap_True ).

Similar Messages

  • I 'd like to know regarding a method to separate a standby node from CE

    Hi community
    I have a question regarding a method to separate a standby node from CE.
    I would like  to know if it is possible to run the vary off command on standby node while active instance is working.
    For example,
    -shutdown standby instance on standby server.
    -run vary off and exportvg command on standby node while active instance is working.
    Version Info
    -OS : AIX 6.1
    -DBMS : Sybase CE 15.5 with 2Node
    -Shared Volumn : DS8700 ( 4TB )
    In this case, I would like to know if there is any side effect on Active instance.
    Our CE version is ASE15.5 ESD5.3 on AIX.
    Thanks in advance
    Regards
    Taiwoo Kim

    To make sure I understand, you have a two node ASE cluster....one of which is active, the second is idle.   You want to detach (for some reason) the disks from the second node of the cluster.
    From the cluster viewpoint, provided you shutdown the ASE instance on that node and don't run any cluster utilities on that node (e.g. sybcluster, quorumutil, etc.) - then whether the disks are attached or not is likely not going to be an issue.   It would be no difference to the surviving node than if you shutdown the other node completely (host included).
    What concerns me is that you obviously are planning something that affects that volume group - e.g. moving it to a new machine???    Swapping HW???  Updating OS volume management firmware???   If swapping HW, remember, the quorum has the list of participants in the cluster - so unless the new hardware hostname/ipaddr matches the old, you will need to modify the quorum entries (TechSupport can help with this) - although the better approach would be to build a new node of the cluster on the new HW (temporarily a 3 node cluster) and then remove the old node from the cluster.    If updating OS firmware, just be careful that the patch doesn't cause problems with IO fencing by changing the SCSI PGR versions or something.

  • How to get a LabVIEW class object to expose an invoke-node method?

    Hi,
          I like the property/invoke-node "paradigm" used for interacting with "objects".  Can LabVIEW-class objects expose their properties and methods this way?  Can one or more LabVIEW-class objects be compiled into a library or "assembly" (or other distrubution format) that allows the property/invoke-node usage?
    I've looked at (but not completely understood) "Creating LabVIEW Classes".  Have also searched for related posts.
    The pic below shows an invoke node wired to a class with a Public VI "VAT.Status.Hello.vi".  I'd like to see VAT.Status.Hello show-up as a Method.  (I just tried "Select Method", and selected "VAT.Status.Hello.vi" but dialog's "OK" button stays greyed-out.)
    Cheers.
    Message Edited by tbd on 03-29-2007 03:15 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    VATStat.JPG ‏54 KB

    Hi Aristos,
          Thanks for the reply!  It was a bit dissappointing, though.
    It appears the LabVIEW-class object will be moving away from (what seems to me) a convenient object-interface presented by the invoke-node/method paradigm - which allows us to interface with a large set of "objects" (.NET, ActiveX, LabVIEW GUI, VISA Resource, ?) in a similar manner and independent of the object's origin.  Being able to read the methods and parameters that appear in these nodes is also helpful for understanding diagram logic!
    I do like the option of dropping a friendly "VI looking" icon on the diagram, but perhaps an optional - even default - VI-icon representation for a class-object invoke-node is feasible - so the LabVIEW class-object could be the more generic object first, but with a traditional-G representation(?)
    Given the answer "We would like, someday, to support the property node"
    and "in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future",
    ... I guess you'll break the wire in the next version, but (perhaps) allow it again - if support of the property node is ever implemented?
    Regards.
    P.S. For the record, huge THANKS to whoever it was that straightened-out enumerated-types (somewhere) between LV4.1 and LV6.1.  Every time I add or remove an enumeration in a typedef, I silently give thanks to the bright and thoughtful soul(s) who made this valuable tool work so well!
    Hello. This is your friendly neighborhood R&D guy for LabVIEW classes.
    Regarding your request about property and invoke nodes as relates to LV classes....
    Short story: We would like, someday, to support the property node. We have no intention of ever supporting the invoke node.
    Long story: As we were creating LV classes, we had to evaluate the right programming interface for these things. We wanted LV classes to behave as new data types in LV. A developer should be able to create a LV class, then give it to someone who doesn't even know OO programming, and that second programmer could use the new data type without learning a lot of new concepts. From this principle, we held fast to the idea that the programming interface should be subVI calls whereever possible. The invoke node is really nothing more than a VI minus the icon. If you want, you can popup on any subvi node and uncheck the option "View as Icon". This will make the node display in a way that has the terminals listed as text, like the invoke node. So, at the end of the day, the invoke node is simply a subroutine call in LV that is language dependent, as opposed to the language independent iconography of LV generally.
    The property node is a slightly different story -- the functionality of a property node is actually different than an invoke node as its terminals are various subsets of the properties available, not a fixed list of parameters like the invoke node. The property node provides a nice interface for setting multiple properties in a block and only having to check a single error return. Very friendly. Our intent is to allow you to create a VI that has 5 terminals: object in, object out, error in, error out, and either a single input or a single output of your chosen type. VIs with this conpane could be marked as "properties" of the class and would show up when you wire the class wire to the property node. We would call the subVIs behind the scenes as needed to get/set the properties.
    This is on the longer term roadmap because it is "syntactic sugar" -- it sweetens the programming style, but it is not necessary to program effectively. You can get the same effect by writing those same VIs and stringing them along on a block diagram "railroad track" style. We'll probably get around to it in three or four versions of LV -- there are some major user requests that impact functionality that have to get done first.
    PS -- in the next version of LV, wiring the LV class to the property/invoke nodes will break the wire so we'll avoid confusion in the future of people thinking there's a way to use these nodes.
    Message Edited by Aristos Queue on 04-02-2007 09:56 AM
    Message Edited by tbd on 04-03-2007 12:39 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Can I use function "HS.NODE.METHOD" in Calc type?

    Can I use this statement in "Sub Calculation"?
         IF HS.NODE.METHOD("") = "EQUITY35" THEN
         END IF
    I try to use it but when I run consolidation, it's always show "aborted"
    Thanks in advance
    Refer to Administrator's Guide:
    Method
    Gets the consolidation method for the specified member. If there is more than one non-zero
    value, the system returns the first one found. This function can be used in these types of rules:
    l Calculation
    l Translation
    l Consolidation
    l Allocation
    Syntax
    HS.Node.Method("POVExpression")
    where POVExpression is a combination of Scenario. Year, Period, and Entity members.
    Return Value
    A String that specifies the consolidation method for the specified point of view.
    Example
    In this example, if the method for the point of view is GLOBAL, then statements between the
    If...Then and End If statements are executed.
    If HS.Node.Method("S#Actual"."Y#2009"."P#January". "E#Regional.Connecticut") = "GLOBAL"
    Then
    End If

    Hi,
    Please see the below link for the rules functions.
    http://docs.oracle.com/cd/E17236_01/epm.1112/hfm_admin.pdf
    And also the following KM IDs, might be helpful as well.
    Financial Management Rule Function Hs.Node.Isbase Returns True Even When the Entity is Inactive (Doc ID 1330580.1)
    Hs.Node.Method() generates "Expected Identifier" Error (Doc ID 1274123.1)
    Hope this helps,
    Thank you,
    Charles Babu J
    Edited by: CJX on Dec 14, 2011 1:40 AM

  • Regarding nodes shown in red colour in message mapping under test (tab)

    hi all.
    i just want to confrom one thing.
    i just created a file to rfc scenario and when i was tested and look in sxmb_moni its showing like the message was sucess but when i ltested in message mapping in design there were some nodes in sender Message type which were displayed in red colour.
    and when i look in runtime workbench the message is showing like system error.
    so can you guys tell me what could be the reason for this.
    waiting for your response.
    bye.
    regards.
    seeta ram.

    hi rinku .
    i think you havent understand my problem.
    here the message in moni was showing as succes but when i tested the same message which was in moni in message mapping (design) there were some nodes which were in red colour and these nodes are not populated to reciever message type  .but it was in sxmb_moni with all the nodes .
    what could be the reason for this.
    can u tell me fast and i case if u still havent understand the Q u can ask me.
    waiting for your response.
    bye.
    regards.
    seeta ram.

  • Regarding get_parameter_field method in webdynpro abap

    Hello Gurus,
    We have a requirement in to prepare selection screen.we are implimenting selection screen with two select options and one parameter using add_selection_field and add_parameter_field methods respectively.now i need these values at runtime.so,ihave used two methods for this are get_range_table_of_sel_field and get_parameter_field .but the method get_parameter_field is not working properly.how can i get parameter value at runtime.this is the correct metod or not to get the parameter value at runtime.
    Could anyone  suggest me solutions?
    could anyone  send me sample code or reference links if possible.
    Thanks in Advance for your replies.
    Regards,
    babu

    Hi Rajasekhar,
    Please go through below wiki. It uses another way to get data from all selection-screen items.
    [Complex Select Option USage|http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages]
    I hope it helps.
    Regards,
    Sumit

  • Need some explanations regarding static Method

    Hello,
    I have a code where a class has a static method access by other classes. This not working as I thought and I would like to understand why.
    Here below is the code.
    Here is a class having the static method "test"
    package test;
    public class StaticTest {
        public StaticTest() {
        public static void test (int i){
        while (i < 1000){
            System.out.println("i = " + i );
            i++;
    }Here is the code of another class (Thread) using this static method. This Thread can be initialized with an integrer value that will be passed to the static Method.
    package test;
    public class ThreadTester extends Thread {
        int x;
        public ThreadTester(int i) {
            x=i;
        public void run(){
            StaticTest.test(x);
    }Here is the code starting 2 Thread running in parallel and both are then calling the static method.
    //start 2 thread accessing the static method.
          ThreadTester test1 = new ThreadTester(0);
          ThreadTester test2 = new ThreadTester(200);
          test1.start();
          test2.start();
    ...As the second thread is started with a bigger value I thought that we would only have seen few printouts from the first thread starting by 0 and then printouts starting by 200.
    Here is what I thought regarding the result:
    i = 0
    i = 1
    i = 2
    i = 3
    i = 200 --> startup of the second thread, x in static method is overriden (at least this is what I thought!)
    i = 201
    i = 202
    i = 203
    i = 204
    i = 205
    i = 206
    i = 207
    i = 208
    i = 209
    But the real result is:
    i = 0
    i = 1
    i = 2
    i = 3
    i = 4
    i = 5
    i = 200
    i = 6
    i = 201
    i = 202
    i = 203
    i = 204
    i = 205
    i = 206
    i = 7
    i = 207
    i = 208
    i = 209
    i = 8
    It seems that there is 2 instances running in parallel. I thought that it would'nt be the case with the word "Static".
    Also I don't understand the result because if I use JBuilder in Optimizer mode I can see that there is only one instance of StaticTest object.
    Can anyone here explain me how is that possible?
    Thanks in advance for your help.
    Regards,
    Alain.

    >
    thread test1 creates its own stack and starts incrementing �i� starting at values 0. However, in the middle of incrementing, it gets kicked out by the OS (or JVM) into a �blocked� state to allow other threads to run. BUT before leaving the running state, test1 saves the stack state including the value of �i�.
    >
    Ok, now I understand, but then I have another question.
    What is the difference between the code shown in my first post and the following where we create 2 instances of StaticTest class (which is not static in this case for sure).
    How to decide (while coding) if it is better to use difference instances of class or not?
    package test;
    public class StaticTest {
        public StaticTest() {
        public void test (int i){ //Not static anymore
        while (i < 1000){
            System.out.println("i = " + i );
            i++;
    }We create new instance in the Thread.
    package test;
    public class ThreadTester extends Thread {
        int x;
        public ThreadTester(int i) {
            x=i;
        public void run(){
    StaticTest newInstance = new StaticTest(); //Create a new instance
            newInstance .test(x);
    }Alain

  • Regarding 'get_attribute_props_for_node'* method from if_wd_context_node

    hello gurus,
                    i have requirement in a view it has two radio buttons named as release and un release.if i select release button the view data in display mode only , it meaans in view one header information and one item table is there.in the second case when i select un release button the view data again in change mode.how can i achive this requirement.right now i can get the release status at runtime through radio button group by key ui element onselect action.now i need to impliment depends upon release information view data into change mode or display mode. for this can we use 'get_attribute_props_for_node' method from if_wd_context_node . if yes how can we pass parameters to this method and how can i achive my requirement through this.
    i am very new for webdynpro abap .could any one suggests me on this and could any one can send sample code regarding this if possible.
    thanks in advance for your reply
    regards,
    babu

    Hi Rajasekhar,
    For ALV you have to write some code like this.. follow this
    lr_column = lr_column_settings->get_column( 'FIELD' ). // Field is one field you wnat to display in edit mode..
          CREATE OBJECT lr_input_field
            EXPORTING
              value_fieldname = 'FIELD'.
          lr_input_field->set_read_only( abap_true ).
          lr_column->set_cell_editor( lr_input_field ).
    OR folow below
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1?quicklink=index&overridelayout=true
    http://forums.sdn.sap.com/click.jspa?searchID=72897441&messageID=6805421
    foolow LEkhas answer in this
    Edit few fields in an ALV table
    also this..
    ALV: columns in read-only mode look like editable columns in edit mode
    O/P ALV in edit mode
    Cheers,
    Kris.

  • Regarding Nodes created when creating a model from RFC

    Hi All
    When we create a model from RFC suppose FlightBook RFC, then node is created one as FlightBook_Input, and one as FlightBook_Output.
    Inside flightBook_input we have nodes and value attribute which we use to pass the data and also for output, but i still dont know what flightbook_output signifies and how we can use it
    Thanks & Regards
    Sandeep

    >>Inside flightBook_input we have nodes and value attribute which we use to pass >>the data and also for <b>output</b>
    How is that? You should always use model class assigned to relation "output" to get RFC FM result. BTW, don`t forget to invalidate it.

  • Regarding setValueAt method in JTable

    sir,
    i have a problem regarding JTable.
    now if u enter the data in cell
    then setvalueAt() method is called once
    now if u enter the data in a cell which is already
    having a dat in that cell, then the setvalueAt method
    is called twice.........
    why it so and how can i prevent it as i needed it in
    getting dataVector and when i print the values of dataVactor
    it gives recent values not the previuos set values
    i m just beginner in this concern
    i hope u be able to understand and solve
    thanks in advance

    Hi,
    I have looked at your code. You are still trying to control too much yourself. Let the table do it instead. The table is designed to handle all of its events and works best when you let it. I made a few code suggestions here. I didn't compile it, so please don't expect it to just work. It is merely a suggestion of an approach that may make your work easier.
      Vector tableData = new Vector();
      ArrayList newValues;
      ViewModel ()
        // in the constructor create an ArrayList for each row that will be displayed
        // and put them in the tableData Vector
        int count = newViewFrame.sortCombo.getItemCount(); // Count is the number of rows?
        for(int i=0;i<count;i++)
          newValues = new ArrayList();
          for (int j = 0; j < numColumns; j++)
            newValues.add();
          tableData.add (newValues);
      // These methods are used by the table and should be supplied
      public int getRowCount ()
      { return tableData.size(); }
      public int getColumnCount ()
      { return 5; }   // the number of columns in your table - this number is used a lot
                      // do not make it complicated to compute
      public void setValueAt(Object value,int row, int col)
        //super.setValueAt(value,row,col); - No point, this is an empty method
        // if the index is out of bounds or nothing was changed return
        if (row < 0 || row >= getRowCount())
          return;
        if (o == null)
        { return; }
        // get the data array for the row which was changed 
        newValues = (ArrayList)tableData.elementAt (row);
        // it doesn't look like your are doing anything for columns 1 -4 ?
        if (column == 0)
          return;
        if (column == 1) 
          return
        else if (column == 2)  
          return;
        else if (column == 3)   
          return;
        else if (column == 4) 
          // not first - do this after you have changed the array
          // fireTableChanged(new TableModelEvent(this,0,4,4));
          Integer colValues[] = TableComboBoxEditor.getColumnValues(((ViewModel)newViewFrame.viewTable.getModel()).getDataVector(),col);
          int retrunValue = alreadyExists(colValues , value);
          System.out.println("the value of row is "+retrunValue);
          if( retrunValue != Integer.MIN_VALUE && retrunValue != row)
            System.out.println("heyheyeheyeheye");
            Set setOfRows = TableComboBoxEditor.hash.keySet();
            Iterator iterator = setOfRows.iterator();
            setValueAtCalled=true;
            int count = newViewFrame.sortCombo.getItemCount();
            // newValues = new ArrayList(); use the one from the dataVector
            for(int i=0;i<count;i++)
              newValues.add(newViewFrame.sortCombo.getItemAt(i));
            // while(iterator.hasNext()){
            // setValueAt(new Integer(0),((Integer)iterator.next()).intValue(),col);
            validatingRemainingColumns(iterator,value,row);
            setValueAtCalled = false;
          // now refresh the table
          fireTableChanged(new TableModelEvent(this,0,4,4));
      // this method creates Integers to set the values in the table
      // If you want Strings instead change it
      public Object getValueAt (int row, int column)
        if (row < 0 || row >= getRowCount())
          return " ";
        newValues = (ArrayList) tableData.elementAt (row);
        if (column == 0)         // set number
          return new Integer (newValues.get(0));
        else if (column == 1)   
          return new Integer (newValues.get(1));
        else if (column == 2)  
          return new Integer (newValues.get(2));
        else if (column == 3)  
          return new Integer (newValues.get(3)));
        else if (column == 4)  
          return new Integer (newValues.get(4)));
        else if (column == 5)  
          return new Integer (newValues.get(5)));
      {\code]

  • Regarding percentage methods

    hi all
    my client is indian based i need clarificafication regarding calculation of
    percentages on different assets like buildings, plants,machinaries,and furniture,computers.
       my question is :is there any pre defined percentages for these assets to calculate depreciation,on what basis we calculate that means tax,p&l,balnsheet
    pls clarify my query
    regards
    chandra.

    Hello
    Multi-Level Method
    Use
    Base methods for certain depreciation calculation methods (Stated percentage and Total percentage in concessionary period) use either a total percentage rate or a periodic percentage rate to calculate depreciation. You can divide these calculation keys into as many levels as you like. A level, in this sense, represents the period of validity of a certain percentage rate. This percentage rate is then replaced by the next percentage rate when its period of validity has expired.
    Features
    Period of Validity for the Individual Levels
    You determine the validity period for the individual levels of a key by specifying the length of time in years and months. You can choose whether the defined validity period begins with
    The capitalization date
    The start date for ordinary or tax depreciation
    The original acquisition date of the asset under construction
    The changeover year
    The defined time periods of a key always have a common start date. This means that the period from the start of one key to its end will overlap with the next period, which has the same start date but a longer validity period. Therefore, you have to enter the validity periods for the levels in cumulative form.
    There is a special indicator you can use when you work with non-calendar fiscal years. The indicator allows you to specify that the definition of the levels applies to the fiscal year and not to the calendar year. However, be aware of the considerations involved when using shortened fiscal years (see Shortened Fiscal Years ).
    Depreciation Percentage Rates
    How you enter the depreciation percentage rate is dependent on the depreciation calculation method being used:
    When using the Total percentage in concessionary period depreciation calculation method, you also have to enter the depreciation percentage rate in cumulative form (see example).
    When using the Stated percentage depreciation calculation method, you do not enter the percentage rate in cumulative form.
    The following example shows the definition of five levels, each one of which should last for a year. The Total percentage in concessionary period depreciation calculation method is being used. The depreciation percentage rates in the individual years are 60, 10, 10, 10, and 10%.
    Validity period
    Percentage
    1 year
    60
    2 years
    70
    3 years
    80
    4 years
    90
    5 years
    100
    In addition, you can limit the levels according to specific acquisition years. This enables you, for example, to observe certain legal requirements that place time restrictions.
    Suresh

  • Invoke Node Method: Close FP (LV7)

    LabVIEW Masters:
    If an Invoke Node is used with the Close FP method, does any code remaining after the Invoke Node execute? Specifically, if you've invoked the Close FP Method (on the same top level VI that is calling the function) and then follow this function with the Close VI Reference function (for the same top level VI), does the Close VI Reference function ever execute? I'm aware that by closing the Front Panel the top level VI and all sub-routines are released from memory so is it necessary to call the Close VI Reference function as well?

    Hi Steve,
    Sorry no master, just Ben.
    Interesting question. I put together the attached VI to see if I could answer this Q for myself.
    The bottom line depends...
    If you want your VI to play nice and be usable as a dynamic VI called from a bigger badder VI TestStand, etc. you should close the reference.
    When you invoke the close FP method that closes the FP, Yes.
    If that VI is the only VI in memory and you exit LV, then get cleaned-up in your behalf when LV exits. In this case it is not required to lose the reference, but,
    "Flame suit on"
    It is concidered bad style.
    "flame suit off"
    If you trying running the LV7 demo I posted and open another new VI, then look at the VI hiarchy screen you will see what I mean.
    The demo I posted uses an event structure with a case structure in the timeout event case. This case lets you determine from a front panel boolean if the code executes an invoke node close FP. After the invoke node there is a seq structure that drives a boolean indicator to let you know the code following the invoke node does execute.
    The example also lets you experiment with close the VI ref. If you run the example and allow all of the references to be closed, then a front panel close event will close the VI and un-load it from memory. Closing a VI ref can be thought of as being an official way of telling LV "I do not care about this VI any more, unload it no no else cares either". If you le tthe demo loop a couple of times opening ref to itself and then start shutting down the refs, you will see that VI will say in memory.
    The example also shows that you can set up an event case that will fire on the close FP event giving you the ability to abort the operation programaticly. This demonstrates that the can run well beyond the close FP.
    The demo also illustrates DR VI's rule "if the refnum changes, close it" by type casting the ref's as an array of I32's.
    Summarizing:
    IF this is a top level "quicky" VI you do not HAVE to close the reference. You can get away with just the invoke node close FP.
    If you want to write re-usable code that will load and unload in a predictable manner, close the ref.
    Sorry about the rambling, I hope this makes sense,
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAutomation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Demo_close.vi ‏48 KB

  • HElp needed regarding oci methods..

    hi,
    Dont we have oci functions which perform same task like these methods in mysql : mysql_insert_id(),mysql_info(),mysql_select_db(), mysql_real_escape_string().Actually we are working on some conversion form mysql to oracle..so we need these methods...If anyone already worked in such conversion will definitely be of great help.
    Thanks.
    srinath.

    Hi,
    since MySQL is a completly different system, the functions to connect and access are also completely different.
    Oracle doesn't use fields, which are incrementet by "auto_increment". In a Oracle DB, you will instead use a Sequence and a Trigger for this:
    Let's say you have a table "katalog" with a primary key "KAID" it will look like this:
    -- Creating the Sequence:
    CREATE SEQUENCE SEQ_KATALOG_KAID INCREMENT BY 1 START WITH 1 MAXVALUE 999999999999 MINVALUE 1 ;
    -- Creating the Trigger, to use the Sequence:
    CREATE OR REPLACE TRIGGER "KT"."TR_KATALOG_KAID" before insert on "KATALOG"
    for each row begin
    if inserting then
    if :NEW."KAID" is null then
    select SEQ_KATALOG_KAID.nextval into :NEW."KAID" from dual;
    end if;
    end if;
    end;
    ALTER TRIGGER "KT"."TR_KATALOG_KAID" ENABLE;
    If you need to replace mysql_insert_id, you can use:
    SELECT SEQ_KATALOG_KAID.currval AS KAID from dual;
    Instead of using mysql_select_db(), you can select the database to use during connecting with OCI_connect(), or OCI_logon();
    To have another database connected, during the script-runtime, you can either use oci_new_connect(), or use "CONNECT username/password@host/service" as an SQL statement.
    Instead of using mysql_real_escape_string(), I think you have to test every single input, before using it as a value within your SQL statements.
    Greetings from Hamburg
    Thorsten

  • Question regarding a method of stocking data

    I know this thread already is in the "New to Java Technology" Forum, although I said the topic was closed there so I could open it back here.. I realized it would be more fitting here and it would probably get more replies...
    I am working with a friend on a Client for Ultima Online and we have to stock data concerning the various objects and characters in the same sector as the Client. We have 3 ideas of what the best method could be, but we have no clue which method would be the most performant (concerning both speed and memory), or if there is a better method to do so.
    Here's a description of the methods we thought about:
    Method #1
    Create many class files for each type of object, having the various related variables in their respective classes...
    Exemple: A principal class called DataObject which holds the data common to all objects/characters. Classes which extends DataObject such as DataMobile (for the Characters) and DataItem (for the Items) in which the data specific to characters and items is stocked. And also various classes for the various types of objects such as Containers which will extend DataItem...
    Method #2
    Create a single class file which would hold an Array containing the various variables and of which the size would be the maximum amount of parameters possible. The array would work in relation with a byte which would hold the type of data stocked into the Array, this way we could know the structure of data and retrieve this data where it is in the Array...
    M�thod #3 <= This one was the first idea and we know it is the worse one.. Telling you about it though
    Create a single class file which would hold all the possible variables. These variables would only be used when necessary.
    M�thod #4
    Create a single class file which would extend java.util.Hashtable. The parameters would be stocked this way: The Key mapped to the value would be the type of parameter (represented by a Byte (not byte)) (type of parameter such as Serial, Name, Strenght, Dexterity, etc...). And the value would be stocked as a String, Integer, Short or Byte according to the case (once again, it isn't primitives, it is the classes from java.lang.*).
    Thanks in advance for the suggestions :)

    This is not an advanced language topic. This is a beginner question, I would be very surprised if you got an answer in this forum.

  • Query regarding onNavigate method in a tableview control

    hi all,
    i am using a tableview control in jspdynpage to display the sales order details using the standard BAPI that is BAPI_SALESORDER_GETLIST.
    following is the flow:-
    i enter the customer number and the sales organization in the first i-view.
    it interacts with the backend and brings the data into a tableview control in the second i-view.
    the problem i am facing is:-
    when i click on the navigation button of the tableview control instead of showing the next row of records, it takes me back to the previous i-view.
    please help as i am unable to find the error myself.
    i can post the code if you want.....
    regards,
    raghav

    i am posting the code...
    main class
    package com.sap.training;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sap.portal.services.api.connectorgateway.IConnectorGatewayService;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.event.TableNavigationEvent;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class getsalesorder extends PageProcessorComponent {
         //private getdatabean first_bean;
         public DynPage getPage() {
              return new getsalesorderDynPage();
         public static class getsalesorderDynPage extends JSPDynPage {
              public getdatabean data;
              private getdatabean data1;
              public IRecordSet exportTable = null;
              private final static int INITIAL_STATE = 1;
              private final static int NEXT_STATE = 2;
              private int state = INITIAL_STATE;
              //private getdatabean myBean = null;
              IPortalComponentRequest request = null;
              IPortalComponentResponse response = null;
              IPortalComponentContext ctxt = null;
              private int visibleRow;
              public void doInitialization() {
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   switch (state) {
                        case INITIAL_STATE :
                             this.setJspName("getdata.jsp");
                             break;
                        case NEXT_STATE :
                             this.setJspName("showresult.jsp");
                             break;
              public void onShowClick(Event event) {
                   IPortalComponentResponse response =
                        (IPortalComponentResponse) this.getResponse();
                   InputField CUSTOMER_NUMBER =
                        (InputField) getComponentByName("myInputField1");
                   String customerNumber =
                        CUSTOMER_NUMBER.getValueAsDataType().toString();
                   InputField SALES_ORGANISATION =
                        (InputField) getComponentByName("myInputField2");
                   String salesOrganisation =
                        SALES_ORGANISATION.getValueAsDataType().toString();
                   request = (IPortalComponentRequest) getRequest();
                   response = (IPortalComponentResponse) getResponse();
                   IConnectorGatewayService cgService =
                        (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources()
                             .getService(
                             IConnectorService.KEY);
                   ConnectionProperties prop =
                        new ConnectionProperties(
                             request.getLocale(),
                             request.getUser());
                   IConnection client = null;
                   try {
                        client = cgService.getConnection("R3System", prop);
                   } catch (Exception e) {
                        response.write(e.toString());
                   try {
                        IInteraction ix = client.createInteractionEx();
                        IInteractionSpec interactionSpec = ix.getInteractionSpec();
                        interactionSpec.setPropertyValue(
                             "Name",
                             "BAPI_SALESORDER_GETLIST");
                        RecordFactory rf = ix.getRecordFactory();
                        MappedRecord input = rf.createMappedRecord("input");
                        input.put("CUSTOMER_NUMBER", customerNumber);
                        input.put("SALES_ORGANIZATION", salesOrganisation);
                        MappedRecord output =
                             (MappedRecord) ix.execute(interactionSpec, input);
                        Object rs = null;
                        Object result = output.get("SALES_ORDERS");
                        if (result == null) {
                             rs = new String(" ");
                        } else if (result instanceof IRecordSet) {
                             exportTable = (IRecordSet) result;
                             exportTable.beforeFirst();
                        //                    while (exportTable.next())
                        //                                   response.write("<script language='JavaScript'>");
                        //                                   response.write( "alert('" + exportTable.getString("MATERIAL")+"');" );
                        //                                   response.write("</script>");     
                        //                    exportTable.beforeFirst();
                   } catch (Exception e) {
                        response.write(e.toString());
                   } finally {
                        if (client != null) {
                             try {
                                  client.close();
                                  client = null;
                             } catch (Exception e) {
                   ctxt =
                        ((IPortalComponentRequest) getRequest()).getComponentContext();
                   Object O = ctxt.getValue("data");
                   if (O == null || !(O instanceof getdatabean)) {
                        data = new getdatabean(request, response);
                        data.createData(exportTable);
                   } else {
                        data = (getdatabean) O;
                        data.createData(exportTable);
                   ctxt.putValue("data", data);
                   state = NEXT_STATE;
              public void onBackClick(Event event) {
                   response = (IPortalComponentResponse) getResponse();
                   state = INITIAL_STATE;
              public void onNavigate(Event event) throws PageException {
                   if (event instanceof TableNavigationEvent) {
                        TableNavigationEvent tne = (TableNavigationEvent) event;
                        if (tne != null) {
                             this.visibleRow = tne.getFirstVisibleRowAfter();
                             if (data != null) {
                                  data.setVisibleRow(
                                       new Integer(this.visibleRow).toString());
    bean class
    package com.sap.training;
    import java.io.Serializable;
    import java.util.Vector;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class getdatabean implements Serializable {
         private String visibleRow="1";
         public IRecordSet exportTable = null;
         public DefaultTableViewModel model;
         public IPortalComponentRequest request;
         public IPortalComponentResponse response;
         public getdatabean(){
              model = new DefaultTableViewModel();
         public getdatabean(IPortalComponentRequest request,IPortalComponentResponse response)
              this.request = request;
              this.response = response;
         public DefaultTableViewModel getModel() {
              return this.model;
         public void setModel(DefaultTableViewModel model) {
              this.model = model;
         public void createData(IRecordSet exportTable) {
              this.exportTable = exportTable;
         public DefaultTableViewModel getModel1() {
              Vector data = createData1();
              Vector colName = new Vector();
              colName.addElement("Material");
              colName.addElement("Document Date");
              model = new DefaultTableViewModel(data, colName);
              return model;
         private Vector createData1() {
              Vector retVec = new Vector();
              try {
                   while (exportTable.next()) {
                        //response.write("data is in export");
                        Vector dataVec = new Vector();
                        dataVec.addElement(exportTable.getString("MATERIAL"));
                        dataVec.addElement(exportTable.getString("DOC_DATE"));
                        retVec.addElement(dataVec);
              } catch (Exception e) {
                   response.write("EXCEPTION...........");
                   response.write(e.toString());
              return retVec;
         public void setVisibleRow(String string) {
              visibleRow = string;          
         public String getVisibleRow(){
              return visibleRow;
    1st jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean
         id="data1"
         scope="application"
         class="com.sap.training.getdatabean"
         />
    <hbj:content
         id="myContext">
         <hbj:page
              title="PageTitle">
              <hbj:form
                   id="myFormId">
                   <hbj:textView
                        id="CUSTOMER_NUMBER"
                        text="CUSTOMER_NUMBER"
                        design="EMPHASIZED"/>
                   <hbj:inputField
                        id="myInputField1"
                        type="String"
                        value=""
                        maxlength="30">
                   </hbj:inputField>
                   <br>
                   <br>
                   <hbj:textView
                        id="SALES_ORGANIZATION"
                        text="SALES_ORGANIZATION"
                        design="EMPHASIZED"/>
                   <hbj:inputField
                        id="myInputField2"
                        type="String"
                        value=""
                        maxlength="30">
                   </hbj:inputField>
                   <br>
                   <br>
                   <hbj:button
                        id="show"
                        text="show"
                        width="100px"
                        tooltip="click here to show result"
                        onClick="onShowClick"
                        disabled="false"
                        design="STANDARD">
                   </hbj:button>
              </hbj:form>
         </hbj:page>
    </hbj:content>
    2nd jsp
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean
         id="data"
         scope="application"
         class="com.sap.training.getdatabean"
         />
    <hbj:content
         id="myContext">
         <hbj:page
              title="PageTitle">
              <hbj:form
                   id="myFormId">
                   <hbj:tableView
                        id="tv"
                        design="ALTERNATING"
                        headerVisible="true"
                        footerVisible="true"
                        fillUpEmptyRows="false"
                        navigationMode="BYLINE"
                        headerText="sales order details"
                        onNavigate="onNavigate"
                        visibleFirstRow="<%= data.getVisibleRow() %>"
                        visibleRowCount="5"
                        rowCount="20"
                        width="300 px">
                        <%
                        tv.setModel(data.getModel1());
                        %>
                   </hbj:tableView>
                   <hbj:button
                        id="back"
                        text="back"
                        width="100px"
                        tooltip="click here to go back"
                        onClick="onBackClick"
                        disabled="false"
                        design="STANDARD">
                   </hbj:button>
              </hbj:form>
         </hbj:page>
    </hbj:content>
    deployment descriptor
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
        <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/>
      </application-config>
      <components>
        <component name="getsalesorder">
          <component-config>
            <property name="ClassName" value="com.sap.training.getsalesorder"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

Maybe you are looking for

  • How to create result file path and name in teststand

    Hi,  I would like to create specific path(folder) and file name to result files. For example ..\date\ArticleNr\DateTimeSerialNr.xml.  Thank you very much in adance. Kri. 

  • Firefox, as default browser, opens Outlook 2010 hyperlinks very slowly, but other browser open, the links, at normal speed, whats going on?

    Running Windows 7, 64-bit, with Firefox 19.0 as default browser. When opening hyperlinks in Outlook 2010, Firefox takes an exceeding amount of time to open the link. All other browsers, when set as default, open links at normal rate. Have tried clear

  • Import photos from iDisk to iPhoto to replace lost pics?

    I lost many photos a couple of years ago from my iPhoto. The thumbnails showed up but when I tried to enlarge them all I saw was white. A genius at Apple tried to fix but ended up almost losing all 4000 of my photos. He was able to rebuild the librar

  • V$session comand...

    I was wondering if there is a better method to identify the command being executed to establish a session via pl/sql. v$session gives only the name of the command, not the full path to that command, and this is somewhat limiting. example: I might run

  • Changing some text

    Hi, please help I'm new to DW . I have an DW application that i've inherited, it requires some small text wording changes, The application lauches from a database icon on a Lotus Notes Client. One problem is I don't which version of DW was used to cr