on 03-02-2006 9:55 AM
has anyone used the BAPI_SALESORDER_CHANGE and knows how to set the value of ORDER_HEADER_INX?
i've tried to set the value update flag:
//@@begin onActionSave(ServerEvent)
wdContext.currentOrder_Header_InxElement().setUpdateflag("X");
wdThis.wdGetOdvCompController().executeBapi_Salesorder_Change();
//@@end
but in debug mode it says wdContext.currentOrder_Header_InxElement() = null how can i pass this value?
notes: the view inputfield takes the attribute value from BAPI_SALESORDER_GETLIST output
thanks,
Daniele
Hi Daniele,
I haven't worked with the BAPI in the question..
But, what I would do in this case
1) I would check the size of the Order_Header_Inx node by wdContext.nodeOrder_Header_Inx().size(). If it is 0, means there is no element of that type.
2) I would create an element of that type and then set the value of its property.
Try this...hope it helps
Regards,
Mausam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's long but the node i'm tring to set is
Bapi_Salesorder_Change_Input
>Order_Header_Inx
>>...
>>...
>>Updateflag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Make sure supplyingRelationRole is set for Order_Header_Inx.
2. Do the following in action handler:
final Bapi_SalesOrder_Change_Input query =
wdContext
.currentBapi_SalesOrder_Change_InputElement()
.modelObject();
final Order_Header_Inx headerLine;
if ( query.getOrder_Header_Inx() == null ||
query.getOrder_Header_Inx().size() == 0)
query.addOrder_Header_Inx
(
headerLine = new Order_Header_Inx()
);
else
headerLine = (Order_Header_Inx)query.getOrder_Header_Inx().get(0);
headerLine.setUpdateflag("X");
wdThis.wdGetOdvCompController().executeBapi_Salesorder_Change();
VS
ok now works but when i try to execute the BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK occurs an error:
java.lang.NullPointerException in the custom controller
//@@begin executeBapi_Transaction_Commit()
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try {
wdContext.currentBapi_Transaction_Commit_InputElement().modelObject().execute();
wdContext.nodeBapi_Transaction_Commit_Input().invalidate();
} catch (WDDynamicRFCExecuteException ce){
manager.reportException(ce.getMessage(), false);
}
//@@end
it's because the node is empty?
what does it need do do the commit/rollback?
thanks,
Daniele
Daniele,
Please post structure of node that corresponds to Bapi_Salesorder_Change_Input model class.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniele,
Order_Header_Inx is a structure.
Page 9 of <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/linking%20rfc%20to%20web%20dynpro.pdf">this</a> PDF shows how to set values of params in structures. It's a very good resource about calling RFC's from WebDynpro in general, have a look at it.
Best regards,
Patrick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.