Addition of Node based on some criteria

Hi Experts,
My scenario is to add the details of one table of a tab1 to another table of tab2.
I need to add the details of a Msg_Id of status "High" of the table of tab1 to the table of tab2. I need to check the condition and then add..
Can any one provide me the code..
Thanks & Regards,
Priya

Try the following
for(int j=0;j< wdContext.nodeTable1().size();j++)
String id1= wdContext.nodeTable1().getElementAt(j).getAttributeValue("MsgId");
// The following will check and add the element to Table2 node
if(id1.trim().equals("HIGH))
IPrivate<ViewName>.ITable2Element ele=wdContext.createTable2Element();
ele.set<<ATTR1>>(wdContext.nodeTable1().getElementAt(j).get<ATTR1>>());
wdContext.nodeTable2().addElement(ele);
Regards,Anilkumar
Message was edited by:
        Anilkumar Vippagunta

Similar Messages

  • Filter an array of arrays based on some criteria

    Hi Folks:
    Is there a way to filter an array of arrays based on some criteria?
    Say I have the below set of records in an array of arrays. testArr[][]
    ID     DTLNUM           PARTNUM          PARTDESC
    AB11     AB11-1           6531079          bath towel
    AB11     AB11-2           5122830          bathtub mat
    AB11     AB11-3           3649100          shower curtain
    AB11     AB11-4           1143784          hamper
    AB11     AB11-5            2672324          bath scaleI want to filter the above array and get all records having PARTDESC beginning with the letters "bath" into another array of arrays, resultArr[][] //I want to get the result in this one.
    How could this be done?
    Please help.
    Thank you for your time.

    Say I have the below set of records in an array of arrays. testArr[][]
    Why array of arrays? Why not an array of objects of a class say 'Part'?
    class Part{
         String id;
         String dtlnum;
         String partnum;
         String partdesc;
         // getters and setters
    }As far as filtering is concerned, regex match would be very easy...
    Part[] parts;
    Part[] filtered;
    //initiallize parts
    void filter(String keyword){
         ArrayList<Part> list=new ArrayList<Part>();
         for(Part p:parts){
             if(p.getPartdesc().matches(keyword+".*"))list.add(p);
         filtered=list.toArray();
    // call filter function to filter
    filter("bath");Thanks!
    PS: This code is neither tested nor compiled.

  • How to delete a node based on some attribute value

    Hi,
    I want to delete one node from xml file.
    My XML file is given below::::
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <config>
    <employeeDetails>
    <employee id = "1" name = "aa" salary = "1000" />
    <employee id = "2" name = "bb" salary = "2000" />
    <employee id = "3" name = "cc" salary = "3000" />
    <employee id = "4" name = "dd" salary = "4000" />
    </employeeDetails>
    </config>
    Lets say i want to delete the row whose id = "2" means whole employee node of id 2, but i don't know how to delete?
    Please somebody help me its very very urgent.

    madforjava wrote:
    Please somebody help me its very very urgent.Is someone going to die if you don't get answered within a couple of minutes?

  • How to query headers based on some criteria in lines

    Hi,
    I have header table and lines table, header has columns like header_id, customer_id, etc.
    lines table has columns like line_id, header_id, project_id, etc
    Currently i am having queryRN with autoCustomizationCriteria, where I have customer_name (LOV) as search field and provided mapping to customer_id. This is working perfectly fine.
    Now, I want to search all headers where we have alreast one line corresponding to given project.
    I tried writing the code in CO after capturing Go button to setWhereClause and to setWhereClauseParam (i.e. only when project is not null).
    but it is not fetching any headers, even if i don't give any criteria.
    Please help. Preferably I don't want to go for Manual Search.
    is it achievable?
    Thanks,
    Hrishikesh

    Solved it by adding exists clause on lines ...
    I added field in the search panel and added code for Go button in CO to set where clause ..
    Hrishikesh

  • Displaying contents from UCM based on some criteria

    Hello All,
    I am usin jdev 11.1.1.6
    Depending upon docType
    For ex:
    docType can be cars, bikes, planes
    I want to retrieve from UCM some contents
    For example,
    i want to get ID's TEMP000001, TEMP000002, etc
    then i want to display all contents for that id,
    ID
    Revision
    Folder
    Formats
    TEMP000001
    4
    /Temp1
    TEMP000002
    5
    /Temp2
    Any help is appreciated

    Thank you Vinay.
    Link dealt more with UCM creation.
    Can you give me more details on the query part..."get all docType from UCM.,make a check on docType... and call another services to display"
    I want to know conceptually how its done and a basic code if possible.
    Thank you

  • Assignment of users to groups in portal based on some filter criteria

    Hi All,
    I have some 200 users in portal and the UME is portal database. Now I want to assign 50 users who belong to a specific department to a new group in portal.
    Unfortunately during the assignment of users to groups there is no advanced search option where I can search for the users based on some criteria like department,organisation unit,first name etc. We can only search for the user based on user id or name.
    How can we do a mass assignment of users to groups based on filter?
    Any suggestions / solutions are highly appreciated. Points are rewarded for sure.
    thanks
    Sreeram

    Hi Sreeram,
    three possibilities:
    1.) Develop a small component which does a search based on the criteria you want to use and which then assigns the found users to the group in question. Not really hard, but every development takes some time to develop, some time to test. So if you really want this actione done just once, development may take too long; if the scenario may happen more often, it may make sense to have such a component ready.
    2.) Search for the users based on the criteria you want to use via the portals UI. Copy the result into some wordpad, and assign all results afterwards manually, as you have described. Ugly, but (for a one-time action) faster than 1.).
    3.) Start like 2.), but use the copied result within the wordpad to "import" the group definition via a text file, see http://help.sap.com/saphelp_nw04/helpdata/en/1a/cde2fb82644d98bfb6d558440d6806/frameset.htm and around. Probably the fastest and most efficient way to go!
    Hope it helps
    Detlev

  • Person DFF Context Value based on 2 criteria (Business Group and Emp Type)?

    Hello,
    We're implementing HR module into multiple business groups.
    I need to define context value for DFF "Additional Personal Details" based on 2 criteria Business Group ID and Employee Type
    Any idea how to do it?
    Thank you
    Elie

    Hello Elie,
    I am not sure on it,However have you tried creating a context with combination of Business Group and Person Type using merging,
    business_group_id || "_"|| person_type_id And structures would be something like 80_2112 Business Group id = 80 and Person Type id=2112.
    It may resolve your issue if this works out.
    Regards,
    Saurabh

  • Syntax for sum in Smart Form based on Selection criteria in Program.

    Hi,
    We have created smart form for printing confirmation entries in desired format. We have given some selection criteria in the program. Now, we want to do the sum of certain fields in the smart form based on selection criteria given in program and selection screen.
    But we are getting wrong sum in the smart form than expected.
    When we debug the program during run time, we are getting correct records as per our expectations. But result of sum in the out put is not as per given selection criteria.
    Do we need to establish link between "select option" and "Smart form"? How can we use internal table created for select option in the smart form?
    Thanks & regards
    Vijay

    Hi,
    There will be no option to sum the values in smartforms, You just have to sum and append the data to internal table and display the internal table data in the form.
    Regards,
    Satish

  • How to implement paging in webdynpro jave based on search criteria.

    Hi All,
    In a requirement I need to implement paging in webdynpro java development.
    I successfully did it when there is no search criteria is available i.e webdynpro fetched all data from the BO object and I did it using a "indexNO" (unique serial no from 1,2,3,4.....) field available in BO object.
    But when there is search criteria available , i.e the data to be fetched from the BO based on some specific field , at that time the "indexNo"  field of all data fetched based on search criteria are discrete i.e not continious. In that case how to implement the paging concept.
    I am using CE version 7.1 EHP 1.
    Thanks in advance
    Srikanta Satapathy

    Hi,
    If you go to your VO and generate the ViewObjectImpl, in there you can create a method which will contain two parameters, 1 the attribute name and 2 the value.
    Then you can follow something like explained in this post:
    ADF Tutorial: How to apply bulk actions to a view object rows
    The only difference is that you will need to create a method like this:
    public void updateAttribute(String attribute, Integer value){
            RowSetIterator iter = createRowSetIterator(null);
            while (iter.hasNext()){
                Row row = iter.next();
                row.setAttribute(attribute, value);
    Then you expose that as a client interface and then after you filter your table by your criteria you just need to execute this method passing the right parameters.
    Regards

  • Returning Different Results Based on Input Criteria

    I have a complex nested select statement. Based on selection criteria I want to return different results. Say for instance I had an input parameter Called Products which could contain a Yes/No Flag. If the Flag was Yes then I would want the "top" select, statement to be The following:
    Select Product, Time_ID, Amt
    From
    My Complex Nested Select
    But if Product was set to "No", I would want the following:
    Select Time_ID, Amt
    From
    My Complex Nested Select
    I know, or course that I can have two COMPLETE set of SQL which are invoked based upon testing the value of the PRODUCT Parameter, but If I duplicate the "inner nested select" then I have 2 sets of select staments to maintain. Is there an alternative to this? Could I make the inner portion which does not change a function of some sort so that my code would look something like this?
    Select Product, Time_ID, Amt
    From
    Execute myNestedSelectFunction
    But if Product was set to "No", I would want the following:
    Select Time_ID, Amt
    From
    Execute myNestedSelectFunction
    This would atleast ensure that I only have to go one place to maintain the logic of the "static Nested Select" statement.
    Just want to make sure I do not have a real viable alternative to "duplicating code"
    Thanks

    Hi,
    Look in TFM for PIPELINED functions which will allow you to:SELECT Product, Time_ID, Amt FROM TABLE(myPipelinedFunctionReturningSelectResult()) T;
    SELECT Time_ID, Amt FROM TABLE(myPipelinedFunctionReturningSelectResult()) T;There are samples if you look on AskTom too.
    Regards,
    Yoann.

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to populate the context nodes based on an event

    Hi All,
    I am having a basic problem. I have created a new Webdynpro Abap application. Here, in the main view, i have define a text view as well as a table. I have created context nodes A and B in component controller. The attributes under A are A1 and the attributes of B are B1,B2, and B3. I have also created an action button C in the same view. These have been mapped to the context nodes in the main view. A1 is mapped to the text view and B1, B2 and B3 are mapped to the table.
    My requirement is as follows. When user Clicks on execute, i want to use the value A1 from the text view in a function module and return the values to B1, B2 and B3. B1, B2 and B3 are multiple values mind you.
    I have successfully executed the function module within the WDONACTIONC method. How to i accomplish this Basic Task. Please Help
    Best Regards
    Mazin

    Hi Mazin,
    Step 3 is as follows...
    Say you have a context node, you have to bind this node with table UI element, now this node must contain some context attribute which you have to bind with your columns of table. now say name of context node is cn_table. now what you have to do is get data from FM in the internal table..........
    now move data by using move corresponding or by looping depending on requirement to an internal table which has fields with the same name as that of name of your attributes... this is imp to display the data...... now you can bind this internal table with context node using code below.......
    data lo_nd_cn_table type ref to if_wd_context_node.
      data lo_el_cn_table type ref to if_wd_context_element.
      data ls_cn_table type wd_this->element_cn_table.
      data it_table type wd_this->elements_cn_table.
      data wa_table type wd_this->element_cn_table.
      data it type standard table of t005t.
      data wa type t005t.
    **   navigate from <CONTEXT> to <CN_TABLE> via lead selection
    select * from t005t into TABLE it.
      loop at it into wa.
        wa_table-ca_one = wa-land1.
        wa_table-ca_two = wa-landx.
        wa_table-ca_three = wa-natio.
        wa_table-ca_enable = abap_true.
       append wa_table to it_table.
        endloop.
    lo_nd_cn_table = wd_context->get_child_node( name =
    wd_this->wdctx_cn_table ).
    *   get element via lead selection
        lo_el_cn_table = lo_nd_cn_table->get_element(  ).
    lo_nd_cn_table->bind_table( it_table ).
    ca-one, ca_two, ca_three and ca_enable are name of my context attribute......
    regards
    Pranav
    Edited by: Pranav Nagpal on Dec 22, 2008 10:08 AM

  • Adding additional j2ee node

    Hello,
    we are running BI 7 - abap+java stacks with 16 GB ram (recently added)
    i would like to know what is the thumb rule for adding additional j2ee node?
    when is it neccassary to add additional j2ee node?
    Regards,
    Moshe

    Hi,
    The JLaunch starts a Java program. It loads the JVM into its own address space and then represents the required cluster element. The program can receive notification from the JControl process via named pipes to stop the cluster element, and terminates, if the JControl stops running (fork emulation under Windows).
    So Jlaunch consuming high CPU time means that server, dispatcher or bootstrap process consume it. If there are not enough system or application threads avaliable means that the engine must buffering requests for web application or system processes. Things to check in this case are:
    SAP NOTE 1016241 - J2EE Engine hangs because of unsufficient system threads
    SAP note: 716604  and upgrade JDK.
    SAP note: 723909 -> set correct VM parameters
    and if issue persists, then you will need to analyse the application causing teh leak...
    SAP note: 1259465: Memory analyser.
    Regards,
    Hemanth

  • Sorting nodes based on Alias

    Dear DRM gurus
    I have a requirement where i have to sort employees by their surname which is part of the full Alias name.
    Alias Name looks like this - Leatherface,Texas (USD) - Slaughterer
    Leatherface is the surname, Texas is the first name, USD is the currency and Slaughterer is the Job Title. There are 10000 employees.
    I tried creating a derived sort property with the formula If(Equals(String,Substring(Propvalue(Core.PrimaryName_MDM),1,4),EMP_),Propvalue(Custom.Surname),Propvalue(Core.SortOrder)) and assigned it to Default Hierarchy Sort property, but it doesn't seem to work (I tried to capture the surname part of the full Alias string before the comma in my actual formula).
    I have tried tweaking the formula using the Node ID as well to check whether if it dynamically sorts the nodes (after reloading all the nodes in the right order) whenever i create new nodes, but to no avail.
    What i have done now is reloaded all the employees in the correct sort order (done this in Excel) and exported it. But i want DRM to sort all nodes based on surname and also insert any new nodes correctly in the order automatically going forward.
    Having to manually update sort orders for thousands of employees doesn't sound like a great idea for maintenance.
    I'm using DRM 11.1.2.1.102.
    Many Thanks for your help.
    Cheers
    Area 51

    Dear DRM gurus
    I have a requirement where i have to sort employees by their surname which is part of the full Alias name.
    Alias Name looks like this - Leatherface,Texas (USD) - Slaughterer
    Leatherface is the surname, Texas is the first name, USD is the currency and Slaughterer is the Job Title. There are 10000 employees.
    I tried creating a derived sort property with the formula If(Equals(String,Substring(Propvalue(Core.PrimaryName_MDM),1,4),EMP_),Propvalue(Custom.Surname),Propvalue(Core.SortOrder)) and assigned it to Default Hierarchy Sort property, but it doesn't seem to work (I tried to capture the surname part of the full Alias string before the comma in my actual formula).
    I have tried tweaking the formula using the Node ID as well to check whether if it dynamically sorts the nodes (after reloading all the nodes in the right order) whenever i create new nodes, but to no avail.
    What i have done now is reloaded all the employees in the correct sort order (done this in Excel) and exported it. But i want DRM to sort all nodes based on surname and also insert any new nodes correctly in the order automatically going forward.
    Having to manually update sort orders for thousands of employees doesn't sound like a great idea for maintenance.
    I'm using DRM 11.1.2.1.102.
    Many Thanks for your help.
    Cheers
    Area 51

  • How to dynamically add/remove a button from the ribbon based on some condition? (Ribbon XML)

    Hi,
    I have a ribbon (done using ribbon XML) with menu options. I need to remove few buttons from the menu dynamically based on some condition. Also, I want to change the label of another button. How to achieve this programmatically? (C#)
    Thanks in advance.
    Thanks Prasad

    Hello Prasad,
    Use callbacks for populating Ribbon controls such as menu, dropDown, gallery and etc. Then you can use the
    Invalidate or
    InvalidateControl methods of the
    IRibbonUI interface to get your callbacks invoked when required. Thus, you will be able to delete the required item(s).
    You will find the following articles in MSDN helpful:
    Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
    Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)
    To change the label of your controls at runtime you need to use the getLabel callback and call the Invalidate or InvalidateControl methods of the IRibbonUI interface. The following series of articles describe the Fluent UI in depth:
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)

Maybe you are looking for

  • How to lookup an EJB from JSP on a Remote Server in JES2005Q4

    Hi, I am having two different domain (domain1,domain2) respectvely. My ABC.ear j2eee application is deployed on domain2 and its iiop port is 33703.In domain1 i have xyz.war (web application) and it's IIOP port is 3700 .In xyz.war i am having CallEJB.

  • Mac users DO NOT use this Desktop software! it will cause hours of heartache

    I have exactly the same issue with a Bold and have still to find any option to resolve the issue other than to entirely wipe the device and go through the tiresome process of reinstalling and updating everything to the way i had it. I am utterly furi

  • Replacement IPod comes with a sad Ipod icon

    This is my problem. I received a replacement IPod yesterday and I haven´t been able to make it work since then. I have downloaded the last updates of the IPod and the ITunes software, but I can´t restore it, my computer just doesn´t recognize the IPo

  • Creating new Variables/objects in OLAP Universe

    Hi, We are currently using BOXI 3.1 Sp2. We have defined BEX queries on which Universes have been generated (using MDX). We are then creating WEBI reports using these Unvierses. We are not able to add variables/objects at universe level as the XML ta

  • Need Image to be transperent so that the Text would be also visible below that .

    Hi , I am having some Text content (About Companys information  3 paragraphs of data) , getting displayed on the screen with the help of TextArea componet . All this is working fine . Now i am trying to display an Image on to  the screen , in such a