on 01-31-2007 4:14 AM
Can I delete my sales order using a BAPI. I know it is possible using the screen transaction.
But I need to do it using a BAPI ?
Thanks in advance.
use 'BAPI_SALESORDER_DELETE'
and
Set UPDATEFLAG in ORDER_HEADER_INX.
Possible UPDATEFLAGS:
U = change
D = delete
I = add
PARAMETERS: p_vbeln TYPE vbap-vbeln OBLIGATORY.
DATA: i_hdrx TYPE bapisdh1x.
i_hdrx-updateflag = 'D'.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_inx = i_hdrx
TABLES
return = i_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
LOOP AT i_ret.
WRITE / i_ret-message.
ENDLOOP.
After dont forget to use bapi
Use BAPI_TRANSACTION_COMMIT after you use BAPI_SALESORDER_CHANGE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure for this: try BAPI_SALESSUPDOCUMENT_DELETE.
pls. reward if helpful
regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.