Hi All,
I want to create a Purchase Requisition from my WebDynPro form.
I have imported the BAPI_PR_CREATE.
I have created a Custom Controller where the Context looks like
Bapi_Pr_Create_Input
-
PrHeader
-
PrHeadertext
-
PrHeaderx
-
PrItem
-
PrItemtext
-
PrItemx
Foll is my code in the method executeBapiPRCreate()
Bapi_Pr_Create_Input prCreateInput = new Bapi_Pr_Create_Input();
wdContext.nodePR_Creation().bind(prCreateInput);
Bapimereqitem itemInput = new Bapimereqitem();
Bapimereqitemx itemInputX = new Bapimereqitemx();
Bapimereqitemtext itemtextInput = new Bapimereqitemtext();
Bapimereqheader headerInput = new Bapimereqheader();
Bapimereqheaderx headerInputX = new Bapimereqheaderx();
Bapimereqheadtext headtextInput = new Bapimereqheadtext();
itemInput.setAcctasscat("U");
itemInput.setPreq_Name("NikhilBansal");
itemInput.setMaterial("000000000000034621");
itemInput.setPlant("0002");
itemInput.setPur_Group("RD3");
itemInput.setMatl_Group("COMPDT");
itemInput.setPurch_Org("STPO");
itemInput.setStore_Loc("SB01");
itemInput.setTrackingno("LOUB0101");
itemInput.setQuantity(new BigDecimal("01"));
itemInputX.setAcctasscat(true);
itemInputX.setPreq_Name(true);
itemInputX.setMaterial(true);
itemInputX.setPlant(true);
itemInputX.setPur_Group(true);
itemInputX.setMatl_Group(true);
itemInputX.setPurch_Org(true);
itemInputX.setStore_Loc(true);
itemInputX.setTrackingno(true);
itemInputX.setQuantity(true);
itemtextInput.setText_Line("Text Line 1");
headerInput.setPr_Type("NB");
headerInputX.setPr_Type(true);
headtextInput.setText_Line("Text Line 2 ");
wdContext.nodePrheader().bind(headerInput);
wdContext.nodePrheadertext().bind(headtextInput);
prCreateInput.setPrheader(headerInput);
prCreateInput.setPrheaderx(headerInputX);
<b>However, when I try this line
prCreateInput.setPritem(itemInput);</b>
then I get compilation error : AbstractList argument expected.
Can someone tell me what should I do give argument of type AbstractList.
Plz help.
Regards
Nikhil Bansal