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

Deletion Utility Program for Sales Order.

Former Member
0 Likes
776

Hi Experts,

We decided to have a deletion utility program for Sales orders.

The program should take sales order numbers from a source file, and delete one by one, also the program should generate process log details at the end.

For creating the above program i need to create a new program or there is any BAPI for deleting the Sales Orders.

Thanks & Regards,

Ramana

Hi Experts,

We decided to have a deletion utility program for Sales orders.

The program should take sales order numbers from a source file, and delete one by one, also the program should generate process log details at the end.

For creating the above program i need to create a new program or there is any BAPI for deleting the Sales Orders.

Thanks & Regards,

Ramana

5 REPLIES 5
Read only

Former Member
0 Likes
735

Hi,

BAPI_SALESORDER_CHANGE

SALESDOCUMENT = Sales Documnet Number

BAPISDH1X-UPDATEFLAG = 'D'. "For delete Sales Order

Thanks,

Durai.V

Read only

0 Likes
735

Hi Durai,

Thanks for your Reply.

But can you Explain in detail how to give BAPISDH1X-UPDATEFLAG = 'D'.

We have to change that BAPI or need to create a program.

Thanks,

Ramana

Read only

0 Likes
735

Hi,

Possible UPDATEFLAGS:

BAPISDH1X-UPDATEFLAG = 'D'.

U = change

D = delete

I = add

If you go to SE37 give BAPI_SALESORDER_CHANGE --> Display ---> In application tool bar Last Buttion Function Module Documentaion --> Here you get some usefull information.

Dont Change the BAPI Just pass the Header X = 'D'.

Try this Sample Program.

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.

Thanks,

Durai.V

Edited by: Durai V on Aug 19, 2008 8:22 AM

Read only

Former Member
0 Likes
735

Hi ,

Please check the following link for the bapi

Regards

Byju

Read only

Former Member
0 Likes
735

thanks