cancel
Showing results for 
Search instead for 
Did you mean: 

Default order reason in sales order

edi_simanjuntak
Explorer
0 Kudos


Dear team,

How to set-up default order reason in sales order for certain customer.

For example. If customer AZ1 placing order then he will have order reason "Stock level too high" as default.

Customer GCX2 --- default order reason " Guaranttee Order", etc.

Kindly help how to make it happen.

Thanks for your valuable advise in advance.

Rgds,

Edi Sim

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello Edi Sim,

You can design custom table as suggested by BOJJA SIVASANKAR REDDY.

And if you want to set default reason code with field enable/disable you can use the FORM USEREXIT_FIELD_MODIFICATION or else USEREXIT_MOVE_FIELD_TO_VBAK with below the sample code.

if sy-subrc isINITIAL.

          vbak-augru = 'V01'. "the codes are from custom table

endif.



Please let me know if you need further help.


Regards,

Vadamalai A

hiteshks79
Explorer
0 Kudos

Hi Edi

You can use user exit MV45AFZZ.

Put the logic based on customer code for default Order Reason.

Regards

Hitesh

former_member182378
Active Contributor
0 Kudos

Edi,

This is an interesting requirement!

Please explain the business reason behind having fixed order reasons per customer and in each and every sales order?

Does this mean, any type of order - sales, returns, credit etc. etc. there should be the order reason which is fixed per customer?

TW

Former Member
0 Kudos

Hi,

you can try to create a parameter ID for th field and assign it to your user.

See if helps http://scn.sap.com/thread/1634998

Regards,

JM

edi_simanjuntak
Explorer
0 Kudos

Hi Joan,

Not clear the steps... could you pls elaborate? Tks

bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

normally order reason required in return, credit , debit memo.


First clear which order types , customers you need to fix the order reason

based on that create Ztable , for  order type +customer+order reason

after Maintain ZTABLE , write logic , in INCLUDE : MV45AFZZ

USEREXIT:

USEREXIT_MOVE_FIELD_TO_VBAK .





bsivasankarreddy_reddy
Active Contributor
0 Kudos

Hi

use below logic

first ztable creare like below

after maintain this table

Write logic in  USEREXIT_MOVE_FIELD_TO_VBAK

TABLES: ZORDER_REASON.

   DATA: WAUGRU TYPE AUGRU.

   SELECT SINGLE  AUGRU FROM ZORDER_REASON INTO WAUGRU

       WHERE auart = VBAK-AUART

        AND  KUNNR = vbak-KUNNR.

     IF SY-SUBRC EQ 0.

       VBAK-AUGRU = WAUGRU.

       ENDIF.

i think it is satisfy your requirement

Regards

bojja

Lakshmipathi
Active Contributor
0 Kudos

Try with MV45AFZZ

G. Lakshmipathi

0 Kudos

Hi Sim,

Please refer the link:

Regards,

C. Lakshmipathi