Application Development 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: 

Delete billing block in the sales orders

Former Member
0 Kudos

Hi,

I'm creating different order types in a program using FM: SD_SALESDOCUMENT_CREATE.

Immediately after creating orders, I want to delete billing blocks for certain type of orders.

For this I used FM: SD_WF_ORDER_DEL_BILLING_BLOCK.

This FM is directly raising errors instead of raising exeptions and so my program is ending abruptly.

Is there any way to delete billing blocks?

Thanks and Regards,

Ravi Valluri

5 REPLIES 5

former_member196079
Active Contributor
0 Kudos

Hi..

between the 2 function do a commit work or call BAPI_TRANSACTION_COMMIT.

regards

Marco

Former Member
0 Kudos

Hi...

FM: SD_SALESDOCUMENT_CREATE doesn't contains intenal commit. so the order created is not stored in database tables. So, call BAPI_TRANSACTION_COMMIT after calling FM: SD_SALESDOCUMENT_CREATE.

Regards,

Lokeswari.

Former Member
0 Kudos

Base on the criteria, remove the billing block while creating the sales order using "SD_SALESDOCUMENT_CREATE".

Fill the structure sales_header_in-bill_block = ' ', sales_header_inx-bill_block = 'X' to remove the billing block.

And execute "BAPI_TRANSACTION_COMMIT" after executing "SD_SALESDOCUMENT_CREATE"

Regards

Vinod

Former Member
0 Kudos

Hello Ravi,

What kind of error are you getting?

One thing you can def. do (if not already done and as adviced by others here is to use 'COMMIT WORK and WAIT'.

Thanks,

Neeraj

Former Member
0 Kudos

SD_SALES_DOCUMENT_CHANGE

will help delete the billing block