on 08-31-2007 6:12 AM
Hi All,
I am using Bapi_salesorder_change to add a partner in partners table in sales order. I have written following code. It returns following messages:
'ORDER_HEADER_IN has been processed successfully. No data was saved.'
Is there any parameter missing in the code?
Bapiparnr partner;
String partnerId;
partner = new Bapiparnr();
partnerId = "200000";
partner.setItm_Number("000000");
partner.setPartn_Role("Z6");
partner.setPartn_Numb(partnerId);
salesOrderDetails.addPartners(partner);
salesOrderDetails.setSalesdocument("0000010173");
try {
wdThis.wdGetNewAppController().wdGetContext() .currentBapi_Salesorder_Change_InputElement() .modelObject().execute();
view.getComponent().getMessageManager().reportSuccess(wdThis .wdGetNewAppController().wdGetContext().nodeOutput().nodeReturn() .currentReturnElement().getMessage());
} catch (Exception exp) {
view.getComponent().getMessageManager().reportSuccess("exp in saving sales data:" + exp.getMessage());
}
Bapi_Transaction_Commit_Input commitChanges =new Bapi_Transaction_Commit_Input();
wdThis.wdGetNewAppController().wdGetContext() .nodeBapi_Transaction_Commit_Input().bind(commitChanges);
try {
wdThis.wdGetNewAppController().wdGetContext() .currentBapi_Transaction_Commit_InputElement().modelObject() .execute();
} catch (Exception exp) {
view.getComponent().getMessageManager().reportSuccess(exp.getMessage());
}
Thanks and Regards,
Deepti
Message was edited by:
deepti d
hi Deepti,
i want use bapi_salesorder_change for updating items but im having difficulty in setting the sales document number. can u tell me the class which is used to set the sales document number. i just want to know salesOrderDetails is an instance of which class? kindly reply as early as possible.
Thanks and Regards,
Rajasekar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepti,
Just before your first execute statement in try block bind your salesorderdetails element.
wdContext.nodeBapi_Salesorder_Change_Input().bind(salesOrderDetails);
try executing after this.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.