cancel
Showing results for 
Search instead for 
Did you mean: 

Calling RFC problem...

david_fryda2
Participant
0 Kudos

Hi everyone,

I have a real strange problem trying to call custom RFC via WebDynPro.

If I call for example the BAPI_HELPVALUES_GET passing table and structure...everything works.

But if I call a simple custom RFC, it seems that the RFC gets emty tables...

Can someone help with this issue....

Thanks in adavnce for any help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

After the execute function invalidate the output node as given below

wdContext.nodeOutput.invalidate();

Check for syntax.

Do get back for further clarifications.

Regards,

Vijith

david_fryda2
Participant
0 Kudos

Hi Vijith,

I did write the wdContext.nodeOutput.invalidate();

after the execution.

Here is the description of this simple RFC :

- <b>import</b> : 2 parameters ->

sname1 type char6 (pass by value checked)

sname2 type char10 (pass by value checked)

- <b>export</b> : 1 parameter ->

ex_msg type text100 (pass by value checked)

- <b>tables</b> : 1 parameter ->

mytable like mytype

where mytype is a type that I created which is composed of 2 fields : fname type char6 and lname type char10.

I repeat that any other standard BAPI, I success calling them.

Do you see something wrong with that ?

Thanks for the help.

Former Member
0 Kudos

Hi David,

Just check whether you have used table from the input node or from the output node.

And whether your RFC is giving output independent of the input values?

means if i m not passing any values then is it giving nothing or it is giving some result?

Let me know.

Regards,

Bhavik

former_member200748
Contributor
0 Kudos

try invalidating in the view.

That might work.

Regards

Priya

david_fryda2
Participant
0 Kudos

Hi Bhavik,

I am using the table which is defined in the Output node that is located in the RFCInput.

I hope it is clear...if you need more precision, let me know.

Regards

david_fryda2
Participant
0 Kudos

Hi Priya,

I invalidate the nodeOutput right after the execution.

Regards.

Former Member
0 Kudos

Hi,

Invalidate the node before execution of the RFC.

Regards,

Sowjanya.

Former Member
0 Kudos

Hi David,

I think problem is lying here only.

I m guessing that you want to pass some values in the table.And depending upon these table values you are giving some response.

You have to use table from the RFCInput node and outside the Output node.

Let me know that which are the mendatory parameters to get some output?

Regards,

Bhavik

david_fryda2
Participant
0 Kudos

Hi everyone,

We solved the problem.

The problem was on the ABAP side.

In fact, I was sending the tables right but the person who wrote the code did a wrong checking about the tables.

He wrote in the RFC :

if table is initial.

return a wrong message.

exit.

etc.

He was only looking at the header of this table and of course when you send a table via RFC, the header is empty.

Notice that this RFC works good when you execute it from SAP/R3.

Thanks to everyone.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi David,

Is ur RFC alone working (ABAP side or not)..

If ur RFC is taking any Input and r u supplying all the fields properly with correct types means check for type compatablility. so please just check and let me know if everything is correct.

Thanks & Regards,

Sirisha.R.S

Former Member
0 Kudos

Hi David,

Is ur RFC alone working (ABAP side or not)..

If ur RFC is taking any Input and r u supplying all the fields properly with correct types means check for type compatablility. so please just check and let me know if everything is correct.

Thanks & Regards,

Sirisha.R.S

Former Member
0 Kudos

Hi David,

Is ur RFC taking any Input and r u supplying all the fields properly with correct types and all.. so please just check and let me know everything is correct and ur RFC alone is working on ABAP side or not..

Thanks & Regards,

Sirisha.R.S

david_fryda2
Participant
0 Kudos

Hi Rowtula,

Everything is working good on the SAP/R3 side.

Regards.

Former Member
0 Kudos

Hi David,

As you said that the RFC is working on the R/3 side check out with the input parameters you are providing to the RFC from Dynpro.I mean are you binding the input values to the node.

Check out if you are invalidating the required output node.Do check that the input you are setting are correct.

Regards,

Vijith

david_fryda2
Participant
0 Kudos

Hi Vijith,

The invalidate is done after the execution methode.

In my wdDoInit() method, I wrote :

RFC1Input input = new RFC1Input();

wdContext.nodeRFCInput().bind(input);

input.setSname1(new String());

input.setSname2(new String());

Maybe something must be define in the ABAP code in order to receive tables.... ???

Former Member
0 Kudos

Hi

If you are doing a invalidate after the execute method please do the invalidate() statement outside the Catch Block. My guess is that you are doing it immediately after the execute. Do the invalidation outside and see. You will get the data :).

Apart from that your code seems fine.

You dont have to do anything for tables until and unless you want to pass some data to the tables as input.

regards

ravi