cancel
Showing results for 
Search instead for 
Did you mean: 

Employee marked for deletion

Former Member
0 Kudos

Hi,

We maintain Sales Employee in Customer master which gets copied into sales order. When the sales Employee is no longer with the compnay, HR changes the status.

When we create the sales order in such case, system still copies the employee and gives warning "Employee XXX marked for deletion"(Message No. VPD002).

User wants system to not to accept the Emplyee unless it has a active status.

I want to know if there is a standard setting to prevent this or I have to use User Exit.

Regards,

Rahim

Accepted Solutions (1)

Accepted Solutions (1)

sarthak_mohantysd
Active Contributor
0 Kudos

Hello,

KIndly check out the following list of user exit and do let us know if this helps you in blocking the Sales Order which has Sales Employee which has inactive status.

1. USEREXIT_MOVE_FIELD_TO_VBAK : When you are creating a Sales Order, the value from different master data are being transferred to Order level and dirrectly hits the VBAK table. So here you can put a logic in the ABAP code such that if the Sales employee is not active then Sales Order is barred from creation.

2. USEREXIT_SAVE_DOCUMENT_PREPARE: Before saving document, some basic events are checked and you can also put your code to prevent the Sales Order creation.

Regards,

Sarthak

Former Member
0 Kudos

Problem is resolved,

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you set the FLAG FOR DELETION in XD06/VD06, then system will give the Warning message, this is internally written in the Program.

If you want to block it from creating the sales order, you use the Transaction code XD05/VD05. then system will prevent the sales order creation.

Please check the revert

regards,

santosh