cancel
Showing results for 
Search instead for 
Did you mean: 

adaptive rfc model

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

nikhil_bose
Active Contributor
0 Kudos

int size = wdContext.nodeET_VOLTAGE ().size();

// put particular node name of which you want size

Former Member
0 Kudos

hai nikhil,

plz take a look at the coding which i ve posted before.

I have done the same.Its iving 0 but its working with jco.but i need to use adaptive rfc oly.

Thanks n Regards

Sharanya.R

nikhil_bose
Active Contributor
0 Kudos

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

Former Member
0 Kudos

nikhil,

I tried priniting the size in the custom controller where i execute the bapi but even then the output is size:0

Thanks n Regards

Sharanya.R

nikhil_bose
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

Were you able to resolve this issue? I am facing the same problem.

Any help is highly appreciated.

Thanks in advance,

Divya

Former Member
0 Kudos

hai divya,

The client configured for adaptive rfc will be different when compared to jco where we do connect directly to server.So check if the data is available in the client for adaptive rfc.

Thanks n Regards

Sharanya.R

nikhil_bose
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

nikhil_bose
Active Contributor
0 Kudos

node().invalidate() will flush off all the values in the current node. Give node().getSize() before invalidating the node. You can put that code inside the first try itself.

It will get you the number of records in the RFC return. You do the mappings for View then

regards

nikhil

Former Member
0 Kudos

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

Former Member
0 Kudos

hai ,

i tried printing the values immediately after model object execute i.e before invalidating the output, but still it gives 0 as size .but the size is printed if i use jco instead of adaptive rfc.

Thanks n Regards

Sharanya.R

nikhil_bose
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi nikhil,

There is no input fot this particular bapi.there is only output i.e voltage.

Thanks n Regards

Sharanya.R

nikhil_bose
Active Contributor
0 Kudos

ignore wdContext.currentZmmin_Display_Voltage_InputElement().set...

statement and execute it.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi sharanya,

Follow the link

[original link is broken]

It describe all about Adaptive RFC.

Regards

- Vinod

*