cancel
Showing results for 
Search instead for 
Did you mean: 

how to bind an input field with an rfc input

Former Member
0 Kudos

Hi Experts,

I am trying to call one rfc in my custom widget template.

RFC is visible in the rfc explorer of eclipse. This rfc is having one input and one output field.

I am trying to connect rfc input to a c.inputfield.

Please tell me how can i map my input field with rfc input and how to call the rfc in a submit button.

Thanks in advance,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

Kindly have a look at page - 59 of the "SAP Enterprise Widget Development Guide.pdf" - Adding Modified Search functionality to a Widegt.In page 61, you can get the code.

Let me know if you still face problem.

Regards,

Shilpa B.V

Former Member
0 Kudos

Hi, Shilpa,

Thanks for the help.

I am referring the same guide only. But i am facing some issues.

My RFC having 2 import parameters and one export parameter.

Now i trying to map the import parameters with textcell which is having a data mapping option

But in the textcell properties, when i select the rfc, it is showing only export parameters.

So how can i pass my input to rfc.

Also tell me how to call this rfc from a button submit, means what code i should write in button event.

Can i call a rfc directly from a button action.

Waiting for u r replay

John

Former Member
0 Kudos

Hi John,

You cannot map Import parameters, there is a different way to do it.

Kindly have a look at page number 49 - point 23 and page number 50

First of all let me explain one example which I have worked.

Requirement: To display the Bank list (BAPI_BANK_GETLIST)

based on the inputs (This Bapi takes 2 Import parameters) - BANK_CTRY & MAX_ROWS

Now as explained in page 49 - I added this code (In red color) in the Controller tab.

Controller.refresh = function(){

{color:red}Controller.showMain_View({"BANK_CTRY" : "IN"});

}

Then I created header-elements-view as explained in page - 59,

as explained I dragged and dropped this small view to the nested cell.

I just followed what is given in the document.

But the important thing to understand here is that whatever input I give, say I give the country "IN" in the

input field, When I click on the Search button, this button event handler takes care to pass the import parameter to the Controller.showMain_View.

To Make it clear:

You can by default set the import parameters in the code i.e

Controller.refresh = function(){

Controller.showMain_View({"BANK_CTRY" : "IN"});

} - In this case whenever you launch the widget, it will display only the Bank list related to India

(Note that I am not giving the other import parameter which is MAX_ROWS which when not specified will take the default value) ,

But if you want a search functionality, i.e dynamically if you want to change the name of the country then apart from the code mentioned just above,

also add the code in the button event handler...as given in the pdf (page 61).

Let me know if this is not clear

Regards,

Shilpa B.V

Former Member
0 Kudos

Hi Shilpa,

Thanks for this grt help. Now its working perfectly.

John

Answers (0)