on 03-04-2008 5:01 AM
hi all,
iam able to retrieve the values when i use jco codings.but when i use adaptive rfc model iam not able to retieve the values.When i try printing the size of table in backend it gives the value in case of jco and it gives 0 when i try doing that using adaptive rfc.plz hep me to fix this issue.
Thanks n Regards
Sharanya.R
hai nikil,
the output value is in the internal table ET_VOLTAGE so i need to get the size of that node oly
Thanks n Regards
Sharanya.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
saranya!!
Please try that code in the executeBAPI() method. i.e. where you are invoking modelObject().execute() method. and before invalidating the node, you print the size. If you are getting the actual size printed there, then go for trying those code in the view.
deploy and run appln and give me status
At least you can come to that your RFC model part is fine.
nikhil
saranya!!
take the exact output node which has the output value in RFC structure.
Let me clarify these things:
1. From the model, you have to map the whole BAPI_xxx_input structure to the component controller.
e.g. Zmmin_Display_Voltage_Input
2. conform you are retrieving the correct output node which is supposed to hold the RFC output recordset.
you can find something like
wdContext.nodeET_VOLTAGE().size();
3. try printing a value instead of getting the size ( as you can get the correct root node easily)
wdContext.currentET_VOLTAGEElement.get.....();
regards,
nikhil
hi saranya!!
You have to invalidate the node to get new values to be reflected.
try getting size in the try block itself immediately calling modelObject().execute();
if it is not, hard-code input to RFC and try again
tell me status
regards,
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai all,
In the init method of custom controller i have placed the following coding
try
{
Zmmin_Display_Voltage_Input spec=new Zmmin_Display_Voltage_Input();
wdContext.nodeZmmin_Display_Voltage_Input().bind(spec);
wdContext.currentZmmin_Display_Voltage_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
In the init method of view iam trying to print the size of the table containing the output values in backend as follows.
try
{ wdComponentAPI.getMessageManager().reportSuccess("size :"+wdThis.wdGetSpecrrllerController().wdGetContext().nodeEt_Voltage().size());
}
catch(Exception e)
{
e.printStackTrace();
}
The output iam getting is size:0
Thanks n Regards
Sharanya.R
Edited by: Sharanya.R on Mar 4, 2008 7:09 AM
Edited by: Sharanya.R on Mar 4, 2008 7:11 AM
Hi
Plz check Is there any mandatory inputs for the rfc.
try
{
Zmmin_Display_Voltage_Input spec=new Zmmin_Display_Voltage_Input();
wdContext.nodeZmmin_Display_Voltage_Input().bind(spec);
wdContext.currentZmmin_Display_Voltage_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
wdContext.currentZmmin_Display_Voltage_InputElement().modelObject().modelInstance().disconnectIfAlive();
}
catch(Exception e)
{
e.printStackTrace();
}
Regards
Chandran S
try
{
Zmmin_Display_Voltage_Input spec=new Zmmin_Display_Voltage_Input();
wdContext.nodeZmmin_Display_Voltage_Input().bind(spec);
// here specify input for your BAPI
wdContext.currentZmmin_Display_Voltage_InputElement().set...
//after that you execute the BAPI
wdContext.currentZmmin_Display_Voltage_InputElement().modelObject().execute();
// for printing the size
int size = wdContext.nodeZmmin_Display_Voltage_Input().size();
wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
wdContext.nodeOutput().invalidate();
}
// be specific in raising exceptions
catch(WDRFCException e)
{
wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
}
put this code in wdInit() and tell me result
nikhil
Hi
Can you able to view all the rfc's using the JCO destination in adaptive rfc. If possible send your coding.
Regards
Chandran S
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 |
---|---|
80 | |
24 | |
11 | |
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.