Skip to Content
0
Former Member
Mar 13, 2009 at 03:49 AM

Transferring a Node with multiple elements

43 Views

Hi there, Just want to ask the experts out there am I doing the right coding to transfer all elements of a node to another node? Thanks for your guidance! 😊

for (int n =0; n < wdContext.nodeItem().size();n++) {

IPublicDemoWSController.ISa_Item3Element ele = wdContext.nodeSa_Item3().currentSa_Item3Element();

ele.setEMESS(wdContext.nodeItem().getElementAt(n).getAttributeValue("EMESS").toString());

wdContext.currentSa_Item3Element().setITM_NUMBER(wdContext.nodeItem().getElementAt(n).getAttributeValue("ITM_NUMBER").toString());

wdContext.currentSa_Item3Element().setKUNAG(wdContext.nodeItem().getElementAt(n).getAttributeValue("KUNAG").toString());

wdContext.currentSa_Item3Element().setKUNRE(wdContext.nodeItem().getElementAt(n).getAttributeValue("KUNRE").toString());

wdContext.currentSa_Item3Element().setKUNRG(wdContext.nodeItem().getElementAt(n).getAttributeValue("KUNRG").toString());

wdContext.currentSa_Item3Element().setKUNVE(wdContext.nodeItem().getElementAt(n).getAttributeValue("KUNVE").toString());

wdContext.currentSa_Item3Element().setKUNWE(wdContext.nodeItem().getElementAt(n).getAttributeValue("KUNWE").toString());

wdContext.currentSa_Item3Element().setMATERIAL(wdContext.nodeItem().getElementAt(n).getAttributeValue("MATERIAL").toString());

wdContext.currentSa_Item3Element().setPLANT(wdContext.nodeItem().getElementAt(n).getAttributeValue("PLANT").toString());

wdContext.currentSa_Item3Element().setREF_1(wdContext.nodeItem().getElementAt(n).getAttributeValue("REF_1").toString());

wdContext.currentSa_Item3Element().setSALES_UNIT(wdContext.nodeItem().getElementAt(n).getAttributeValue("SALES_UNIT").toString());

wdContext.currentSa_Item3Element().setSHORT_TEXT(wdContext.nodeItem().getElementAt(n).getAttributeValue("SHORT_TEXT").toString());

wdContext.currentSa_Item3Element().setSTORE_LOC(wdContext.nodeItem().getElementAt(n).getAttributeValue("STORE_LOC").toString());

wdContext.currentSa_Item3Element().setTARGET_QTY(wdContext.nodeItem().getElementAt(n).getAttributeValue("TARGET_QTY").toString());

wdContext.currentSa_Item3Element().setTARGET_QU(wdContext.nodeItem().getElementAt(n).getAttributeValue("TARGET_QU").toString());

wdContext.nodeSa_Item3().addElement(wdContext.currentSa_Item3Element());

}