cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing RFC ( table ) for inputfield f4 help

Former Member
0 Kudos

Hello Friends,

I have to call the RFC in order to retrieve the table which I have to display as f4 help for input field.

This RFC should be called with importing parameter, where I can set the values of these importing parameter ? is there any example avaiable ?

I have went through that pdf doc, of accessing abap function in web dynpro application, but there in example he is not setting the import parameters,

thanks and kind regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shah,

For your problem Object Value Selector (OVS) is the right solution. Its used for F4 help for an input field. Follow the below link:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

Now to set the import parameters do the following steps:

You have to perform the model binding to only Z<RFC>_Input model, not Z<RFC>_Output. After the model node is bound it will contain a node "Output" which will contain the output data. In order to set the import parameters first create Z<RFC>_Input object say "input" and set the import parameter [input.setName("name");]. Now bind it to the model node [wdContext.node<ModelNode>().bind(input);]. Now execute the model.

Better approach is to first analyze the import parameters and its type and then set those in webdypro.

Regards,

Piyush.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

if you observe the code here

this line initializes a class of Bapi_Flight_Getlist_Input

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

//this line binds your newly created object to the model node

wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

// Create new elements in the Destination_From and Destination_To nodes

// this statement is to set pass Destination_from parameter to the Bapi

//once you say control+spacebar you will get what parameter

//does setDestination_From method take

//here the destination_from is taken directly from the inputfield in the view

//so we have created an instance to hold the value

// similarly if you want to pass a value

<b> Bapisfldst fldst = new Bapifldst();

fldst.setDestination_From( "FrankFurt");

input.setDestination_From(fldst);</b>

//here is the normal code

input.setDestination_From(new Bapisfldst());

input.setDestination_To(new Bapisfldst());

Hope it is clear.

Regards

Abhimanyu L

Former Member
0 Kudos

Hello Abhimanyu,

From where comes "Bapisfldst" ? is this BAPI Ref ?

Regards,

aah okey this is structure ....

I will give it a try and get back to you thanks

Message was edited by:

Shah H

Former Member
0 Kudos

Hi Shah,

This list is actually an AbstractList which gets generated automatically when u create the RFC model.If u check the model,it will be available there.

regards

Sumit

Former Member
0 Kudos

Hello Abhimanyu,

Thanks I will try out this,

can you please let me know how I will access the out component of RFC ? can I retrieve the out component in same way as you mentioned for set purpose ?

Regards,

Former Member
0 Kudos

Hi Shah,

What exactly u mean by out component of RFC??If it is output node,it will be available in the node structure of the model.inside the request node itself,output node will be available.

regards

Sumit

Former Member
0 Kudos

Hello Sumit,

Okey here I will summrize what i am trying to do:

I have to call a RFC which will return me a table which I have to show when user click on f4 help button of my input field. The RFC requires 4 import parameter inorder to call if. So I went like this:

I created a new model with this RFC. it created me following model classes:

Zport_get_variant_input

Zport_get_variant_output

Uusr_var

I went to my component and add this model. Then I went to my custom controller and did the mapping of four fields ( which are aviable in Zport_get_variant_input ) and output node which is also surprisinglly avaiable in the Zport_get_variant_input class ( I thought it will be avaiable in Zport_get_variant_output ) but the documentation which i am following ( this getFlight example, in that example he is also mapping the Flight_List node from *input class )

Any way, till now things are okey, now I have to call this BAPI while providing the four import parameter value and retrieve the table.

Any suggestion now how I can proceed ?

Thanks and kind regards,

Former Member
0 Kudos

Hi Shah,

Whatever u r doing,i don't see any problem with that.Since u r starting with RFC now,i will suggest u to go thru this document also.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de">Do's & Dont's with RFC</a>

regards

Sumit

Former Member
0 Kudos

while executing the RFC I have to set some import parameter, is there any example avaiable how I can set the import parameter, and retrieve the table ?

Regards,

Former Member
0 Kudos

hi,

Is the input values are coming from the R/3 system?

If the values are coming from the R/3 system means u need to create the instance of your class and simple bind the DDK to your valueattribute getting from R/3 system.

Thanks,

Lohi.