cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop BDOCs generation for a particular transaction type.

Former Member
0 Kudos

Hello Experts,

"There is a BADI, ORDER_SAVE, that can be changed to <b>prevent BDOCs</b> from being sent. The method is called <b>CHANGE_BEFORE_UPDATE</b>. With this solution, you can prevent BDOCs of a <b>particular document type</b> from being sent."

How do I do this? What should I write in the method which is mentioned above?

Regards,

Amit

*Award points assured for helpful answers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Instead of using the Order Save BADI you will have to use the CRM_DATAEXCHG_BADI and in the CRM_BDOC_SEND method based on the transaction type set the value for variable CV_BDOC_SEND.

For example.

IF ls_order-process_type = 'ZSO'.

cv_bdoc_send = '' ". " Dont Send the Sales Order.

ENDIF.

Reward with points if this helps.

Regards,

Gaurav Gera

Former Member
0 Kudos

Hi Gaurav,

Thanks for the reply. I would like to know whether the code given by will stop creating BDOCs for a specific transaction type only('ZSO') and not for other transaction types like service order.

My requirement is to stop BDOCS generation for Service order and not for Activity and sales order. So BDOCS should be generated for last two.

Can you tell me how to achieve it using ORDER_SAVE as I found the statment given in my first post in one of the SAP Note (772267).

Regards,

Amit

Former Member
0 Kudos

This code wont generate BDOCs only transaction type ZSO. Here ZSO can be of any transaction category like sales order, service order etc.

If you want to use ORDER_SAVE badi, you can prevent the order from being transferred by changing the status of order to "Distribution Lock".

I feel using the Data exchange badi is a better method to achieve this.

I hope this helps.

Regards,

Gaurav Gera

Answers (0)