on 07-20-2008 10:36 AM
Hi,
guys i am developing an application to change poitem data from the webdynpro. Everythign is done, the problem inam facing is
AbstractList lsx = null;
AbstractList ls = null;
Bapi_Po_Change_Input inputc = new Bapi_Po_Change_Input();
inputc.setPoitem(ls);
inputc.setPoitemx(lsx);
in the setPoitem function i need to the items as a AbstractList, i have created the items as collections of object Bapimepoitem and Bapimepoitemx.
Now how to set them in the abstract list so that i can pass it.
points will be rewarded.
Regards,
Khusro Habib
Hi Khusro,
Instead of inputc.setPoitem(ls); use
inputc.addPoitem(new <ModelClass>());
Poitem is an internal table used in RFC. So you can add multiple records in Poitem.
When writing above code, click Ctrl+Space you will automatically come to know for which RFC Model Class you have to create the object.
Regards,
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Khusro Habib .
I am also developing application to change Sales Order from WebDynpro.
But getting problem while setting update flag for BAPI.
Can it is possible for you to post code snip of change PO.Here I am using like this.....
wdContext.currentBapi_Salesorder_Change_InputElement().setSalesdocument("90");
wdContext.currentOrder_Item_InxElement().setUpdateflag("U");
wdContext.currentOrder_Header_InxElement().UPDATEFLAG.valueOf(true);
wdContext.currentOrder_Item_InxElement().setUpdateflag("U");
wdContext.currentOrder_Item_InxElement().setMaterial(true);
wdContext.currentOrder_Item_InElement().setMaterial(wdContext.currentOrder_Item_InElement().getMaterial() );
wdContext.currentOrder_Item_InElement().setMaterial("GOLDSPOT");
wdThis.wdGetChangesalesorderCustController().ChangeOrderMethod();
wdThis.wdGetChangesalesorderCustController().ChangeOrderCommitMethod();
Any help is appreciated and points will be rewarded
Regards
Sunil Pawar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this code
My dynrpo was first getting the data from BAPI_PO_GETDETAIL then passing it to BAPI_PO_CHANGE
but for simplicity i have changed those variables to fixed values.
//@@begin updateData()
Bapi_Transaction_Commit_Input commit = new Bapi_Transaction_Commit_Input();
Bapi_Po_Change_Input inputc = new Bapi_Po_Change_Input();
String result = "";
boolean cont = true;
try {
Bapimepoitem itemmod = new Bapimepoitem();
Bapimepoitemx itemmodx = new Bapimepoitemx();
itemmod.setPo_Item("00010");
itemmodx.setPo_Item("00010");
itemmodx.setPo_Itemx(true);
itemmod.setShort_Text("THIS IS THE TEXT");
itemmodx.setShort_Text(true);
inputc.addPoitem(itemmod);
inputc.addPoitemx(itemmodx);
wdContext.currentPOCHANGEElement().setPurchaseorder("4500000000");
wdContext.currentPOCHANGEElement().modelObject().execute();
wdContext.nodeOutputCH().invalidate();
commit.execute();
} catch (Exception e) {
// TODO: handle exception
result = e.toString();
}
return result;
//@@end
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.