cancel
Showing results for 
Search instead for 
Did you mean: 

problem calling same RFC twice

Former Member
0 Kudos

hi

i have called my RFC init() for the firsttime

which populates the data in the itemlistboxes

next time iam calling the same RFC in a button

after the RFC is called second time

data in the itemlistboxes are gettig blank or invalidated

is that this problem is due to calling the same RFC

twice or may be problem with any code

Zlgs_Car_Data carData= new Zlgs_Car_Data();

carData.setP_Make(gCarMake);

carData.setP_Body_Type(gCarBodyType);

//carData.setP_Fuel_Typ(gCarFuelType);

carData.setP_Model(gCarModel);

carData.setP_Year(gCarFromYear);

carData.setP_Year(gCarToYear);

wdContext.currentZlgf001_Outfit_Match_InputElement().modelObject().addIt_Car(carData);

wdThis.wdGetCustomerCompController().executeZlgf001_Outfit_Match_Input();

can any one help me out ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi kishore,

When we are calling same RFC twice, then this problem was come.

After importing the model, you generated the executeZlgf001_Outfit_Match_Input() in component controller, by right clicking controller, and click on the Apply Template.

Do the same process once agaign, while doing you get the error as already context is there.Just rename the context variables.Suppose you rename Zlgf001_Outfit_Match_Input as executeZlgf001_Outfit_Match_Input2, then you get two execute methods for your RFC in controller.Call one method for itemlistbox and another for button.Bind context variables with corresponding UI elements.So, selecting one UI element will not effect another UI element.

I think this will help you.

Thanks

Rajani

Former Member
0 Kudos

hi

thanks for the response

so i have to create other model in the

MVC (open modeler )

then create other executable method

executeBAPI_Input1 then call this method in the

button .

is that so .

Former Member
0 Kudos

Hi,

The code you have given is in Init method or button?

If on button click then the problem is when you execute a function module second time,it removes its first instance.

For this you will have to again pass values for itemlistboxes (means you will have to set same inputs again which you have set in Init() method along with which you want to set on button action) and execute function module.

This will help.

Thanks,

Prajakta