on 01-21-2008 4:41 AM
Hi,
I have to treat one of my model nodes as a table and loop it to pass more than one value before i execute the function module.
For doing this, when i do just invalidate, i face a problem.
wdContext.nodeExt_Text_Tbl().invalidate();
The old value is not getting cleared from the second time.The new values are getting appended to the old values every time my code passes new values.
So, the only solution i had is to remove values through one of the below codes (every time after invalidation).
wdContext.nodeExt_Text_Tbl().invalidate();
if
(wdContext.nodeExt_Text_Tbl().size() > 0)
{for(int size=0;size<wdContext.nodeExt_Text_Tbl().size
();size++)
{wdContext.nodeExt_Text_Tbl().removeElement
(wdContext.nodeExt_Text_Tbl().getElementAt(size));}
}
OR
wdContext.nodeExt_Text_Tbl().invalidate();
while ( wdContext.nodeExt_Text_Tbl().size() > 0 ) wdContext.nodeExt_Text_Tbl().removeElement( wdContext.nodeExt_Text_Tbl().getElementAt(0) );
This solves the issue.But i face another big problem. That is, for the first time i call the method, my values are not getting added to the node. Only from the second time i call the method, the values are getting added.
I'm using the same method for another similar node and it works fine. I dont have a clue why i face this behaviour for this node alone. Please do help out..
Thanks in advance,
Kavitha
My problem solved with my collegue's help. All we did is, just add the values in an alternate method as shown below. Eventhough my previous method should work fine, we donot have a reason for the issue.
Bapimepotextheader LongTexts = new Bapimepotextheader();
LongTexts.setText_Line(SubstringVal);
LongTexts.setPo_Item("00000");
LongTexts.setText_Form("*");
LongTexts.setText_Id("F01");
IPublicCC_OrderReliefAid.IExt_Text_TblElement objExt_Text_TblElement = wdContext.nodeExt_Text_Tbl().createExt_Text_TblElement(LongTexts);
wdContext.nodeExt_Text_Tbl().addElement(i,objExt_Text_TblElement);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kavitha,
Use same code before executing the Function Module.
Hope this will solve your problem
Thanks
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.