on 12-12-2008 4:39 AM
Hii,
I have a RFC which fetch values for me after giving some input values.The code for fetching is
ResultNode : model node containing values fetched from RFC execution.
OutputDetailsNode : value node for populating the fetched values to the table in View.
OutputDetailsNode.invalidate();
wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();
if(ResultNode.size()!=0)
{
wdComponentAPI.getMessageManager().reportSuccess(""ResultNode.size() "resultnode's size");
for(int i=0;i<ResultNode.size();i++)
{
ResultElement = ResultNode.getT_ResultElementAt(i);
OutputDetailsElement = OutputDetailsNode.createCtx_vn_OutputDetailsElement();
OutputDetailsElement.setTeam(ResultElement.getTeam());
OutputDetailsElement.setESA(ESA);
OutputDetailsElement.setUtilization(utilization);
OutputDetailsElement.setPercent_Sum(Percent_Sum);
OutputDetailsElement.setPercent_Alloc(percent_alloc);
OutputDetailsNode.addElement(OutputDetailsElement);
}
}
if(BapiNode.size()!=0)
{
for(int i =0;i<BapiNode.size();++i)
{
BapiElement = BapiNode.getBapiReturn_T_MessageElementAt(i);
wdComponentAPI.getMessageManager().reportSuccess(""
BapiElement.getMessage_V1()""+BapiElement.getMessage_V2());
OutputDetailsNode.invalidate();
BapiNode.invalidate();
//ResultNode.invalidate();
}
}
The problem lies : When at cases ResultNode size is 0, that is it does not fetch any values and BapiNode prints the message
"Data does not exist" ....after that when it is expected to fetch values, evrytime the ResultNode size prints to 0 and no
data is displayed.....
invalidating both ResultNode and OutputDetailsNode did not help.
Please do suggest.
i think you are invalidating the node if there is data right?
So try to put the invalidation code in the controller.
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First The object of the Function module is set to null;
<FUnction module> obj=null;
obj=new <FUnction >;
CHeck wether the input values given by you are correctly set to the function module.
and to clear your dout print the size of the Result node in the method itself nad print the size there itself
wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();
wdComponentAPI.getMessageManager().reportSuccess("The size of the Result node is>"wdContext.nodeResult().size());
Regards
Padma N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
u can write like this na,
OutputDetailsNode.invalidate();
wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();
if(ResultNode.size()!=0)
{
wdComponentAPI.getMessageManager().reportSuccess(""ResultNode.size() "resultnode's size");
for(int i=0;i<ResultNode.size();i++)
{
ResultElement = ResultNode.getT_ResultElementAt(i);
OutputDetailsElement = OutputDetailsNode.createCtx_vn_OutputDetailsElement();
OutputDetailsElement.setTeam(ResultElement.getTeam());
OutputDetailsElement.setESA(ESA);
OutputDetailsElement.setUtilization(utilization);
OutputDetailsElement.setPercent_Sum(Percent_Sum);
OutputDetailsElement.setPercent_Alloc(percent_alloc);
OutputDetailsNode.addElement(OutputDetailsElement);
}
}else{
// here give error message.
}
use external debugging to know the rfc returns the value or not ?
why you using the bapinode to check the no data exists ?
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();
In this method check that your are invalidating the Result node first as soon as you execute the function module ans then check the result
Regrads
Padma N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
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.