How to add a new element to a model node in the view controller?

View Context
    myNode
         attri1
         attri2
myNode is a web service model node. How to add a new element to this node?
Regards,
Hui
Edited by: Hui Wang on Feb 15, 2008 12:05 PM

Sudhir Gorantla wrote:>
> Hi,
>
> myNode
> attri1
> attri2
>
> IMyNodeElement ele=wdContext.myNode().createMyNodeElement();
>
> ele.setAttri1("");
> ele.setAttri2("");
>
> wdContext.nodeMyNode().addElement(ele);
>
> Regards,
> Sudhir
Hi we need a model as an input parameter when creating a element for a model node. How to get the instance of the model?
Regards,
Hui

Similar Messages

  • How to add a new Element to the Context

    Hello all.
    I created in the wdInit()
    ArrayList datas = new ArrayList();
         for (int i = 0; i < 25; i++) {
              MyData data = new MyData();
              data.setMethods();
              datas.add(data);
         wdContext.nodeMyData().bind(datas);
    Now, I want by clicking on the Button "Create new Element", forward user to the other View, which elements are connected with the same model -> context, the new element should be added to context, the user should fill the form and click Save-Button.
    How can I add a new Element to the Collection I created and choose it as a current element?
    If I do: wdContext.nodeMyData().bind(new MyData()) all information will be lost. And I will have only one field.
    If I do it like this:
    IWDNodeElement dynTabElem=(IWDNodeElement)wdContext.nodeMyData().createElement();
    wdContext.nodeMyData().addElement(dynTabElem);
    I get an error: com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(DataComp.MyData): value node is created without a reference
    Well I can pass to my new View a Collection as a parameter and then
    Collection.add(new MyData()) and then bind it. But I find this solution not good.
    Is there any possibility to get the existing Collection from the Context without passing it to the view?
    Can I just add a new element to the existing collection?
    Thanks in advance.

    Hallo Monalisa,
    I did as you said. But I can't add something to my model class, because it is not collection.
                            MyData data = wdContext.currentBelegElement().modelObject();
                   data.add() ???? - don't work
                   wdContext.nodeMyData().invalidate();

  • How to add a new element in xmltype

    hi!
    updatexml may update value of element which must exist in xmltype instance,but i want add new element in xmltype which existed.

    Does anyone have an example of using the insertBefore() or append() Methods with pl/sql?

  • How to add a new instance to a 2 node SQL 2008 R2 Cluster under the same networkname

    Hello All,
    I'm fairly new to sql and have just deployed a new 2 node SQL 2008 R2 cluster.
    During installation, I created a networkname SQLCLU and a named instance I01.
    I now would like to add another Instance (I02) under the same networkname.
    What is the proper procedure to do this?
    I don't believe that I should do this using the action: "New SQL Server failover cluster" from the setup menu, but rather using the action "New Installation or add features to an existing installation"
    With the second option, I'm however not sure how I should make this instance clustered..
    Should I also execute the "New Installation or add features to an existing installation" action on the 2nd node in the cluster?
    Many thanks for your  advice!
    Filip

    You cannot use the same network name for 2 instances. You need to use a different network name for the second instance I02
    A failover cluster instance contains:
    A combination of one or more disks in a Microsoft Cluster Service (MSCS) cluster group, also known as a resource group. Each resource group can contain at most one instance of SQL Server.
    A network name for the failover cluster instance.
    One or more IP addresses assigned to the failover cluster instance.
    One instance of SQL Server that includes SQL Server, SQL Server Agent, the Full-text Search (FTS) service, and Replication. You can install a failover cluster with SQL Server only, Analysis Services
    only, or SQL Server and Analysis Services
    http://msdn.microsoft.com/en-in/library/ms179410(v=sql.105).aspx

  • How to bindi a UI element to 2 model nodes different in the same view

    I want to know how I can bind a set of inputfields, in a form view, to 2 different model nodes ?
    <u>example:</u>
    Im working with 2 adaptional RFC, both working, in my Custom Context.
    Ztest_Search
    Ztest_Update
    In my ResultView I have 2 Model nodes (one for each RFC) I show a set of inputfields in a form view, binded to the Ztest_Search_output of Ztest_Search. This works.
    now I want to update the changes, but I can't find the ways of binding the same inputfields to my other Model node (Ztest_Update) in the context of ResultView.
    Note: If I create a duplicate set of inputfields , one for Ztest_Search binded to the Ztest_Update_output and the other to the Ztest_Update_Input Works. But I wanna avoid this duplicated set of inputfields.
    Thx

    Rodrigo,
    If I understood correctly, your problem is to get the data from the input fields which are bound to a
    model node, Ztest_Search_output and set it to the model node of another RFC, Ztest_Update.
    This can be done by getting the suitable values from the model attributes of Ztest_Search_output
    and setting it to Ztest_Update.
    <b>/**
    * valueOne, valueTwo are the name of the model   
    * attributes that are bound to the Input fields.
    */</b>
    String firstValue = wdContext.currentZtest_Search_outputElement
         ().get<valueOne>;
    String secondValue = wdContext.currentZtest_Search_outputElement
         ().get<valueTwo>;
    Ztest_Update_Input update = new Ztest_Update_Input();
    wdContext.nodeZtest_Update_Input().bind(update);
    <b>/*
    *<b>Zstructure is the structure of the model node under
    *Ztest_Update_Input to which the values have to be 
    *updated.</b>
    */</b>
    ZStructure structure = new ZStruture();
    structure.setValueOne(valueOne);
    structure.setValueTwo(valueTwo);
    update.addZStructure(structure);
    try
       update.execute();     
    catch (Exception ex)
       wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);                     
    wdContext.nodeZtest_Update_Output().invalidate();
    Bala

  • How to add a new element in dropdown menu in PA30 screen

    Hi All,
    In the sreen of PA30, click 'Utilites(M)' on the menu, there are some elements in this dropdown list.
    In some system, if i set MOL to 22, 'Reports(japan)' will be appended at the end of the list. But some system, even if i set mol to 22, there is no this new elment in the corresponding position.
    Where to do such kind of settings?
    Many many thanks in advance!

    hai..
    Possible Answer:
    The Utilities in the tool bar is standard settings and come with country independent..settings...

  • How to add a new plant from a different R3 into the existing new GL design

    Hi Experts,
    We have a scenario where we have a BI system already functional and the the FI reports like balance sheet is already available on the Portal.
    This flow is based on standard business content for new GL concept
    Now a new plant has been acquired and that plant already has R/3 and it's own G/L accounts.
    Now we have to build 2 reports:
    1 - The balance sheet for the new plant.
    2 - Consolidated balance sheet for the complete organization including the new plant G/.L accounts.
    DS: Leading Ledger Balances (0FI_GL_10)
    0FI_GL_10 --> 0FIGL_O10 --> 0FIGL_C10 (for Totals)- 0FIGL_V10
    0FI_GL_10 --> 0FIGL_R10 (Remote cube) --> 0FIGL_V11
    How best can we merge this new plant?

    Hi,
    SEM-BCS or BI-BPC NW 7.0N is meant for similar kind of requirements. You'll probably need to get a functional guy involved for mapping the GL accounts from the new company to your existing one and have journal entries for inter-company transactions. After doing the same you can then consolidate both the data and have a common output.
    search about BPC or BCS and you'll find out more. If you still need to do it in existing BI setup then get someone from FI and set the mappings of GL Accounts from both set the business rules and create a new cube to load the consolidated data.
    Hope this helps
    Regards
    Raj

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    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 add a new url link in a view of an existing webdynpro component?

    How to add a new url link in a view of an existing webdynpro component?

    hi ,
    refer SAP online hep :
    Implementing Enhancements in a View
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/233f2189f74f08e10000000a114a6b/frameset.htm
    To enhance the layout of the view, you can create new UI elements. This procedure is no different u2013 from a technical viewpoint u2013 from creating UI elements in components themselves. All UI elements created within the enhancement implementation can then be processed as usual.
    Enhancements  means inserting user developments into SAP development objects at predefined positions.
    The Enhancement Framework enables you to add functionality to standard SAP software without actually changing the original repository objects, and to organize these enhancements as effectively as possible.
    refernce :
    have a look at this article
    How to Create Enhancement Implementation in Web Dynpro ABAP
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81&overridelayout=true
    as pointed correctly by Saurav in earlier thread
    regards,
    amit

  • SQL Server Distributed Partitioning Views how to add a new node online

    We are using distributed partitioning views in SQL Server 2012 Enterprise Edition for scaling out our data across more than one servers. Now we faced to question how to add a new node (server) into the scale outed db servers system without sending the servers
    down, so our users will be able to use them during the process as well.
    For example we have 4 servers with scaled out data. When we add the new empty server, the CHECKINGs for the partitioning columns should be reorganized. But during the process the partitioning views are not working.
    The High Availability, Always On or Failover Cluster approaches seem are not resolve the problems.
    So my question is how to add new node online?
    KH

    Thank you Erland for the reply.
    Yes, it's sounds as possible solution but has some not resolvable nuance in it. Let's say we copied some data from Node5 to new added Node6. Let's assume in Node5 we had data in Table1 with partitioning column's values 100,101,102,103,104,105,106.  Now
    we want to copy part of the rows with partitioning column's values 103,104,105,106 from Node5.Table1 into Node6.Table1. With this Node5 will contain less data and will work more quickly (less IO, less CPU usage etc), and the rest data will be contained on
    Node6. But because of Node5 is already in use, the Node5.Table1 contains CHECK CONSTRAINT = ParttionColumn should be from 100 up to 106. This is check for Node5. The Distributed Partitioning Views are already using the CHECKs to identify what server should
    be used to get data from.
    Now when we copied part of the Node5.Table1 rows to Node6.Table1 the views are still using the 103-106 rows from Node5.Table1 because the CHECK points there. Then we include the newest Node6.Table1 in the distributed partitioning views. OK, but we should
    set some CHECK on new Node6.Table1 which will be used by views. We can't set intersecting checking like Node5 has CHECK 100-106 and Node6 has CHECK 103-106. We also can't edit Node5 check and set it 100-102 untill the data will be removed in it. But this means
    that the data will not be available during the execution. 
    So, any ideas ?
    KH

  • How to add a new character set encoding?

    Hello,
    can anybody please explain to me, how to add a new character set encoding to Mac OS Tiger?
    I have two Mac laptops, a new one with Snow Leopard and an older one with Tiger, and on the old one i cannot use or enable anywhere the "Russian (DOS)" character set encoding, which i need to be able to use some old text files.
    On the Snow Leopard, this encoding is present in the list of available encodings of TextWrangler, but not in TIger.
    If i have understood correctly, this is not a problem of TextWrangler, and the same encodings are available systemwide.
    So, the question is: how to add new encodings to Tiger (or to Mac OS in general)?
    Thanks.

    I think possibly that's in the Get Info window of Finder?
    I don't think either that or the input menu have any effect on available encoding choices. Adding languages to system prefs/international/languages can do that, but once you have added Russian there, I don't know of any way to add an additional Russian encoding (there are quite a number of them).

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to add a new field in MM01, with say contaminent  as a field?

    How to add a new field in MM01, with say contaminent  as a field? I process that i know is i has to go the user exit and check out the three user exits that are available for MM01 after that what i have to do please can any one help me out with the procedure to proceed?

    Hai      venkateshwar reddy ,
    try with these user exits
    MGA00001 Material Master (Industry): Checks and Enhancements
    MGA00002 Material Master (Industry): Number Assignment
    MGA00003 Material Master (Industry and Retail): Number Display
    Refer these steps also
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/screen-exit-on-mm01-mm02-mm03-322717#

  • How to add a new tab for the project?

    Dear All Experts,
        Could you tell me how to add a new tab for the project?
        Pls refer to the screenshot as below:
    Thanks!
    Xinling Zhang

    Hi,
        The new tab in cj20n , and the new tab can only be displayed in the highed level.Pls refer to below
        And in cj02, there is no this tab also in the wbs detailed screen,
    Thanks!
    Xinling

Maybe you are looking for