cancel
Showing results for 
Search instead for 
Did you mean: 

Set Method undefined for Iprivateflightbooking -an error

Former Member
0 Kudos

Hi,

I am doing the 5th Web dynpro, Flight Booking Tutorial. for the set methods I am getting an error which states,

"The Method setReserve_Only(boolean) is undefined for the type IPrivateFlightBookingView.IBapi_FlBooking_Create_from_Data_Input".

Could you please tell me how to fix this?.

Thanks,

Sunita.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi

Check if any boolean variable called

Reserve_Only is there if not declare it, and right click your mouse on edit viewsourcegenerate getters and setters-- click on that select check box for Reserve_Only click ok.

Regards

Abhijith YS

former_member751941
Active Contributor
0 Kudos

Hi Sunita,

Check the data type of attribute <b>Reserve_Only</b> whether it is Boolean or not .

wdContext.currentBapi_Flbooking_Createfromdata_InputElement()

.setReserve_Only(true);

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c">Handling Transactions with BAPIs in Web Dynpro</a>

Regards,

Mithu

Former Member
0 Kudos

Hi Sunita,

Ca you copy the line where you are trying to use this method setReserve_Only. It will only accept boolean argument.

Regards,

Murtuza

Former Member
0 Kudos

Correct the method call in the

method public void onActionBook to


     wdContext.currentBapi_Flbooking_Createfromdata_InputElement()
	.modelObject()
	.setReserve_Only(false);

and

method public void onActionReserve to

 		
     wdContext.currentBapi_Flbooking_Createfromdata_InputElement()
	.modelObject()
	.setReserve_Only(true);

Former Member
0 Kudos

Hi,

Just check if you have done this.

//Create a new element in node Bapi_Flbooking_Createfromdata_Input

Bapi_Flbooking_Createfromdata_Input input =

new Bapi_Flbooking_Createfromdata_Input();

wdContext.nodeBapi_Flbooking_Createfromdata_Input()

.bind(input);

Hope this helps....revert back for any further help.

Regards,

Abhishek.

Former Member
0 Kudos

hi,

I have that code already. can somebody suggest any further help on this problem. I dont have any clue why is it showing the error.

Thanks-in-advance.

/sunita