cancel
Showing results for 
Search instead for 
Did you mean: 

Shipping type in Sales Order

harshsisodia31
Participant
0 Kudos

Dear Experts,

I need to apply a validation at the time of sales order creation, if the user selects the shipping type that does not have any condition records maintained in VK13 then I need to display error message and shall not allow sales order creation.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member186385
Active Contributor
0 Kudos

Hi Harsh,

This is not standard

probably you may have to look to put a piece of code

check standard user exit MV45AFZZ

thanks

santosh

harshsisodia31
Participant
0 Kudos

Hi Santosh,

There are multiple Form in user exit in program MV45AFZZ I am not sure which one to use. I need to write code which would be called when user enters shipping type in shipping tab.

Lakshmipathi
Active Contributor
0 Kudos

As long as your query is not addressed fully, please dont change the status to "Answered" which will lead to confusion to others.

G. Lakshmipathi

Lakshmipathi
Active Contributor
0 Kudos

You can try with USEREXIT_PRICING_PREPARE_TKOMP in the include already referred

G. Lakshmipathi

harshsisodia31
Participant
0 Kudos

Hi,

I have written code in USEREXIT_PRICING_PREPARE_TKOMP, but the problem is pricing condition at header are not getting update. I have to manually do and update "Carry out new pricing" .

Answers (1)

Answers (1)

phanikumar_v3
Active Contributor
0 Kudos

I believe you maintained Shipping type as one condition in determining the condition records.

Have you tried by using sub-total field(KOMP-KZWI1 Etc) and include this KZWI in your Incompletion procedure--there by not allowing the user to save sales order without the condition record for this requirement.

Hope this helps.

Phanikumar

harshsisodia31
Participant
0 Kudos

Hi ,

Sorry but I cant figure out the solution you are suggeting.

Former Member
0 Kudos

If the solution of Phanikumar is not working, you an always add the check in userexit_save_document_prepare (MV45AFZZ). You have to check if the subtotal of the new lines is empty or not.

Ex.:

LOOP AT xvbap.

CHECK  xvbap-kzwi1 = '0.00'.

...

Naturally you must assign the freight condition to kzwi1 (or 2, 3, 4, 5, 6) in calculation scheme.

Gr.

J.

harshsisodia31
Participant
0 Kudos

Hi Jimmy,

Actually I have written code for in userexit_pricing_prepare_tkomp  but the problem is the code is written for shipping type. But since its gets executed when i enter material and throws a error i cant do anything further.

My requirement is that, when user create a sales order, system should check the freight master maintained in VK13 and condition type ZFRD shall have value as maintained  in VK13.