on 07-06-2009 11:07 PM
Hi ! , i have a problem , this code needs to add like 80 different values from the context node but the values are repeated 80 times with the 80th value and then send 80 same values to the bapi, !?, does anyone knows why ? thanks
, i tried with zproductoswebPed.addPosnr but it is not such method, zproductoswebPed is an structure from an rfc....
for (int x = 0; x < wdContext.nodeCarrosDocumentados().size(); x++) {
zproductoswebPed.setPosnr(wdContext.nodeCarrosDocumentados().getElementAt(x).getAttributeValue("Peso").toString());
bapiPedidos.addIt_Posiciones(zproductoswebPed);
}
"call rfc" bla bla bla. . .
Hi,
You are using the same "Object Reference" when adding it to the Collection. This is due the fact you're probably using the "new zproductoswebPed" outside the "for" loop.
Try declaring it inside your "for" logic, set the properties you want, and add it to the Collection before the loop ends, like you're already doing.
Hope it helps.
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is the answer duhhhh , i didnt notice, thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.