Skip to Content
author's profile photo Former Member
Former Member

Problems to get the content of context to R/3

Hello,

i have problems with connection between the context in web dynpro and r/3. I use a rfc function, which i wrote on my own (no standard) in order to get persons from web dynpro to r/3. In web dynpro I created a multi selection table where the user can choose a list of persons. the selection works in web dynpro. for example: when i choose two persons then i can see those two persons in my context (model node) but not in the table of the rfc function in r/3. that's my problem. here some coding of my view implementation.

		
for (int i = 0; i < wdContext.nodeBearbeiter().size(); i++) {
  if (wdContext.nodeBearbeiter().isMultiSelected(i)) {
    String str = wdContext
                 .nodeBearbeiter()
                 .getElementAt(i) 
                 .getAttributeValue("Bname")
                 .toString();
				
    Usr03 bearb = new Usr03();
				
    IWDNodeElement fb_bearb = 
                     wdContext
                     .nodeZ_Fh0002_Datenverwaltung()
                     .nodeImt_Bearbeiter()
                     .createImt_BearbeiterElement(bearb);

     fb_bearb.setAttributeValue("Bname", str);
				
     wdContext.nodeZ_Fh0002_Datenverwaltung()
              .nodeImt_Bearbeiter()
              .addElement(fb_bearb);
  }
}

the node z_fh0002_datenverwaltung is mapped to the controller context. the mapping between view and controller works. in the example: I can also see those two selected persons in the context node of the controller context just before calling the r/3 function. but the table imt_bearbeiter() is always empty in r/3.

can anybody help me please?

best regards

petra

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2005 at 06:29 AM

    Hi

    I think if every thing is correct

    u need to write this piece of code.

    u have written

    wdContext.nodeBearbeiter().getElementAt(i).getAttributeValue("Bname").toString();

    whereas i feel u shuld write like this

    wdContext.nodeBearbeiter().getBearbeiterElementAt(i).getAttributeValue("Bname").toString();

    Just Check This

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2005 at 11:13 AM

    try the following

    for (int i = 0; i < wdContext.nodeBearbeiter().size(); i++) {

    if (wdContext.nodeBearbeiter().isMultiSelected(i)) {

    String str = wdContext

    .nodeBearbeiter()

    .getElementAt(i)

    .getAttributeValue("Bname")

    .toString();

    Usr03 bearb = new Usr03();

    wdContext.nodeImt_Bearbeiter().addElement(bearb);

    bearb.setAttributeValue("Bname", str);

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.