Skip to Content
0
Oct 20, 2005 at 01:08 PM

Executing BAPI through Webdynpro

27 Views

Hi All,

i'm trying to use the Bapi BAPI_SALES_ORDER_FROMDATA1 from webdynpro. When i'm executing the bapi from webdynpro side its getting executed but its not giving the same set of values as output as it is giving from the R3 side for same input. I'll give the codesample that i'm using to pass value from webdynpro.

Bapi_Salesorder_Createfromdat1_Input inp = new Bapi_Salesorder_Createfromdat1_Input();

wdContext.nodeBapi_Salesorder_Createfromdat1_Input().bind(inp);

Bapisdhead bp = new Bapisdhead();

bp.setSales_Org("S100");

bp.setDistr_Chan("DS");

bp.setDivision("D1");

bp.setDoc_Type("OR");

inp.setOrder_Header_In(bp);

Bapiitemin itm = new Bapiitemin();

itm.setMaterial("BL8");

itm.setReq_Qty("12");

inp.addOrder_Items_In(itm);

Bapipartnr bpart = new Bapipartnr();

bpart.setPartn_Numb("2330");

bpart.setPartn_Role("SP");

inp.addOrder_Partners(bpart);

After this when i execute the rfc its giving me the message

"Sales document type OR is not defined"

But when i gave the same input from the R3 side it gave the output and a sales order got created .

hope you guys understood the scenario. Any sort of help is very much appreciated.