on 08-29-2007 2:02 PM
Hello Friends,
I am facing strange behaviour as follows:
I have three input fields with f4 help. I have set EVS in wdinit method of view. ( call RFC function to retrieve the table which i display as f4 help ). so far is okey,
Then some other businss logic implemented which will add more contents in table, thus I again call the RFC to retrieve the new records, ( and in debug mode I can see that the backend gave back the new records ) but when I read the output node, its empty...
any idea what I am doing wrong ?
its more or less same coading which i once call in wdinit, and later in one plugin method .....
Regards,
if it helps, i can past the coading here....
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okey, I am pasting my code:
public void wdDoInit() {
IWDAttributeInfo attribute_var = wdContext.getNodeInfo().getAttribute("varname");
ISimpleTypeModifiable fileName_var = attribute_var.getModifiableSimpleType();
IWDMessageManager msgMgr = this.wdThis.wdGetAPI().getComponent().getMessageManager();
Zport_Get_Tables_Input input = new Zport_Get_Tables_Input();
wdContext.nodeInput().bind(input);
Zport_Get_Variant_Input variant_input = new Zport_Get_Variant_Input();
wdContext.nodeZport_Get_Variant_Input().bind(variant_input);
variant_input.setClient(WDClientUser.getCurrentUser().getSAPUser().getJobTitle()); variant_input.setPuser(WDClientUser.getCurrentUser().getSAPUser().getUniqueName().toUpperCase());
try {
wdContext.nodeZport_Get_Variant_Input().currentZport_Get_Variant_InputElement().modelObject().execute();
} catch (Exception e) {
msgMgr.reportWarning("Files not available.");
}
fileName_var.setFieldLabel("varname");
IModifiableSimpleValueSet valueSet2 = fileName_var.getSVServices().getModifiableSimpleValueSet();
msgMgr.reportSuccess("SIZE-before" + wdContext.nodeVartab().size());
for (int i = 0; i < wdContext.nodeVartab().size(); i++)
{
valueSet2.put(wdContext.nodeVartab().getVartabElementAt(i).getVarname(), wdContext.nodeVartab().getVartabElementAt(i).getVarname());
}
valueSet2.sort(true, true , true);
Till here works fine, and my wdContext.nodeVartab() is filled with the table I retrieved from back end system.
Then control goes to other view, and some changes happens in the backend table, from other view I come back in this view agian, and in plugin method then I do the same code again, and after excuting the bapi, my nodeVatrab is still empty...
But before It works fine, and in plugin method I did something like this
wdContext.nodeVartab().clearSelection() ( the intention behind was to refresh the node and as I did not find any method refresh or clear, I just tried this method )
But to my surprise in wdDoinit method after executing the bapi the node if filled, but when I try now in plugin method or in some other method it empty...
I gave another try, and i.e. from plugin method I again called wdDoinit method, in debug mode I can see the control goes to this method, but again the node was empty. ( only first time when wdDoInit method executes the node is going to be filled )
PLS HLEP !!!!!
Regards,
Shah,
You should call the wdInit() method programatically.
- Move your code to a method and call that method from wdIniti() and onPlug so that always you are using same code. The other thing I found in your code is, you should invalidate the nodes then only new data is refreshed.
Add the following after executing the BAPI:
try
{
wdContext.nodeZport_Get_Variant_Input().currentZport_Get_Variant_InputElement().modelObject().execute();
<b>wdContext.nodeVartab().invalidate();</b>
}
Regards
Abhilash
catch (Exception e) {
msgMgr.reportWarning("Files not available.");
}
okey, atleast one things works for me now,
from plugin method I called again wdDoInit method ( i know its not good way ) but I did for test purpose and this time the node is filled,
Okey, I will try to invalidate the node and see if it works for me ?
By the way what is the reason behind this that we have to invalidate the code ?
Regards,
Right now from my plugin method I am calling wdDoInit () method again, and then it takes the newly added values into the output node, I know this is not the right approach, and what I do not understand is why in my plugin method it did not takes the new values ( pls note these values I am assigning to the f4 help to my input field )
Any suggestions for me ?
Regards,
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.