on 10-12-2005 1:53 PM
Hi,
After calling a BAPI I want to add another element to a model node. My problem is, that when I use bind() or addElement() all elements are deleted and only the one i added is there in the end.
My coding for that is the following:
// Add SalesOrg 9999 = Combo
IPublicZ_Hus_P22_Get_Properties.IIt_Sales_OrgNode soNode =
wdContext.nodeOutput_Z_Hus_P22_Get_Properties().nodeIt_Sales_Org();
Zvkorg model = new Zvkorg();
model.setVkorg("9999");
model.setVtext("Combo");
IPublicZ_Hus_P22_Get_Properties.IIt_Sales_OrgElement combo =
soNode.createIt_Sales_OrgElement(model);
wdContext.nodeIt_Sales_Org().addElement(combo);
Would be great, if you can tell me what's wrong with that coding. Thanks in advance.
Hi Timo,
If i am not wrong, you want to add one element in your node after executing your BAPI. Means, you want to append one more element in result.
Try following code for the same:
wdContext.node<Node name>().validate();
IPublic<controller>.I<node>Element ele = wdContext.create<node>Element(new <model structure type>());
ele.set<attribute name>("<value>");
wdContext.node<node name>().addElement(ele);
wdContext.<node name>().invalidate();
Regards,
Bhavik
P.S. : Don;t forget to reward points if it was helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.