cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi_Quotation_Createfromdata_Input: Cannot add an Order_Partners node

Former Member
0 Kudos

Hi!!!

I have a Development component that creates quotations with BAPI Bapi_Quotation_Createfromdata_Input for R/3, but I have problems creating a node for order partners. Here is the code:


  public void wdDoInit()
  {
    //@@begin wdDoInit()
    //$$begin Service Controller(1946649475)
    Bapi_Quotation_Createfromdata_Input input = new Bapi_Quotation_Createfromdata_Input();
    wdContext.nodeBapi_Quotation_Createfromdata_Input().bind(input);
   	Bapipartnr partner = new Bapipartnr();
	input.setOrder_Partners(partner);
    //$$end
    //@@end
  }

The problem is in the last line:

input.setOrder_Partners(partner);

It throws the following error:

The method setOrder_Partners(AbstractList) in the type Bapi_Quotation_Createfromdata_Input is not applicable for the arguments (Bapipartnr)

Please help me how to do it. I think it is because it needs a collection or something like that.

thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Miguel,

go to models and expand the model which you are using .you will find the model classes.

lets assume Order_Partners(Tables parameter) is of type ZOrder_Partners.

then you need to code like

ZOrder_Partners.ZOrder_Partners_List order = new ZOrder_Partners.ZOrder_Partners_List();

ZOrder_Partners table = new ZOrder_Partners();

table.setXXX();

order.addZOrder_Partners(table);

input.setOrder_Partners(order);

Thanks

Bala Duvvuri

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Bala,

Points awarded