cancel
Showing results for 
Search instead for 
Did you mean: 

Which method of Order_Save BADI to use ?

Former Member
0 Kudos

Hi Experts,

I have to create an implementation for the BADI 'Order_Save' with in which I need to check if the ordered quantity Q1 is greater than a value Q2 (available in CRM).

If this condition fails, I need to replace the Ordered Quantity Q1 with Q2.

I have written code to update the same in the Order. But I'm not sure in which method of the BADI to place this code.

Within the Order_Save BADI, there are three methods CHECK_BEFORE_SAVE, PREPARE, CHANGE_BEFORE_UPDATE.

Also, this code must get executed only when the Order is being created. The same should not get called when the same order is updated.

Any pointers/inputs would be of great help.

Points Assured.

Regards,

Kris.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200342
Active Contributor
0 Kudos

Hi Kris,

Which method to be used depends on your requirement.

As per your requirement you can use the CHECK_BEFORE_SAVE method,also you need to write a code that if the order is already updated then it should exit the badi.

Regards,

PePe

Answers (1)

Answers (1)

saumya_govil
Active Contributor
0 Kudos

Hi Kris,

Use CHECK_BEFORE_SAVE method.

Write a code in this method to check if the order already exists aor not. If yes then exit the BADI else execute the code to replace the Ordered Quantity Q1 with Q2.

Hope this helps!

Regards,

Saumya