on 08-28-2007 12:12 PM
Hi all,
What will happen if we didnt write wdContext.nodeOutput1().invalidate(); after
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
Regards
Padma
Hi Padma
invalidate() method has different meaning for model node and value node
for model node, the value is refreshed with the latest value.
for value node it clears the data in the value node.
Regards
Abhimanyu L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
But only ome of my module is working.The scond is not working.
I folloewd the same for both.
The code i wrote in my wdDoInit() of CustomController is
try
{
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
wdContext.nodeOutput1().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of Pooutputnode"+wdContext.nodePo_Items().size());
wdContext.currentZ_Po_F4_Help_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of F4outputnode"+wdContext.nodeI_Ekko().size());
}
catch(Exception e)
{
e.printStackTrace();
}
In the firstcase the size i am getting is 0 and next case the size is 3000
can u plz tell me where the problem may be
Regards
Padma
Hi
I am selecting purchaseorder from EVS which got populated by the F4Model.
But here i want the data related to that Purchaseorder from PoModel.
But that Model is not getting executed.It is giving size as Zero.
The code i used to execute this Model is
//@@end
public void executeBapi_Po_Getitems_Input( )
{
//@@begin executeBapi_Po_Getitems_Input()
try
{
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of outputnode"+wdContext.nodePo_Items().size());
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
wdContext.nodeOutput1().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of outputnode"+wdContext.nodePo_Items().size());
}
catch(Exception e)
{
e.printStackTrace();
}
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of outputnode"+wdContext.nodePo_Items().size());
//@@end
}
Is there any wrong in code or there may be any wrong in mapping
Hi,
Are you passing the correct inuput for the first function module? Can you check it once again with the back end system.
Other wise general coding needs to be write the following way.
// instantiate the input class and bind to the component node.
Bapi_Po_Getitems_Input input = new Bapi_Po_Getitems_Input();
wdContext.nodeBapi_Po_Getitems_Input().bind(input);
// the FNModule rewuires any input pass it following way.
input.set<param1>("S000112");
input.setCustomer("6504");
try
{
wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
wdContext.nodeOutput1().invalidate();
wdComponentAPI .getMessageManager().reportSuccess("Controller:size of Pooutputnode"+wdContext.nodePo_Items().size());
} catch (Exception e)
{
e.printStackTrace();
}
The general way to call the function module and execute it.
The node size 0 means it returns nothing from the back end that means u passing bad input or your finding node doesnt return.
Try this way.
This might helps you.
Thanks,
Lohi.
Hi Padma
invalidate function is used to clear the contents of a node.i mean it will make the content fresh by deleting all the records in the table.
What happens if you don use invalidate
1)if you are displaying some data in the table , the records will be appended to the exsisting data
Ex: if there are 5 records in the table if you repopulate the table's data next time you will see 10 records ( old 5 records + new 5 records) this will happen always as you are not refreshing the node
2) if you invalidate the node it will clear the contents and displays the new 5 records only
Regards
Chaitanya.A
Hi,
When you call the invalidate() method you mark the node as dirty and hence the node will repopulated ( may be via supply methods).
To be more specific: If you don't put the call wdContext.nodeOutput1().invalidate(); after wdContext.currentBapi_Po_Getitems_InputElement().modelObject().execute();
the results will not be repopulated in UI.
Regards,
Ashwani Kr Sharma
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 | |
11 | |
10 | |
9 | |
9 | |
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.