Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module for deleting the perticular sales order

Former Member
0 Likes
1,138

Hi Experts

I wanted a function module name for deleting the perticular sales order document ,when i enter the import parameter as sales order no and some value as export parameters so that i can use that for the program (message :successfully deleted ).

Hi Experts

I wanted a function module name for deleting the perticular sales order document ,when i enter the import parameter as sales order no and some value as export parameters so that i can use that for the program (message :successfully deleted ).

2 REPLIES 2
Read only

Former Member
0 Likes
591

HI,

Check this Link...

Read only

Former Member
0 Likes
591

Hi Satya,

Use BAPI BAPI_SALESORDER_CHANGE as follows:

DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

DATA: BAPISDH1X LIKE BAPISDH1X.

PARAMETERS: P_VBELN LIKE VBAK-VBELN.

*SET THE DELETION FLAG

BAPISDH1X-UPDATEFLAG = 'D'.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = P_VBELN

order_header_inx = BAPISDH1X

tables

return = T_RETURN

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Hope this will help.

Regards,

Nitin.

Edited by: Nitin Karamchandani on Dec 8, 2008 8:36 AM