cancel
Showing results for 
Search instead for 
Did you mean: 

Order Reason to Order Type

Former Member
0 Kudos

Hello,

While creating a sales order I need to populate the drop down - Order Reason with a list of values which are present in my z table.

I have created my custom table with : Order type/ Order reason/ Description.

I need to populate the drop down with the entries which are present in the ordertype in my Z custom table.

I have found a User exit in the Include MV45AFZZ with the help of the thread :

http://scn.sap.com/thread/1804112.

But I am unable to acheive this.

Kindly share all your valuable thoughts.

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

I need to populate the drop down with the entries which are present in the ordertype in my Z custom table.

But I am unable to acheive this

Since this is purely an enhancement done by your technical team, only they can help you as to why it is not working. 

G. Lakshmipathi

j_mathur
Explorer
0 Kudos

Hi Vishnu,

You have found the useful thread as mentioned in your message regarding assignments of various reasons to specific order type. As indicated there, the user exits in program   MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAK can help out here. You will need to engage a Developer to complete the required coding.

My advice here is to do some stress testing once the code is in place to make sure that it is not affecting in anyway the system performance and speed, since MV45AFZZ is used extensively across the landscape in sales order creation, If you have multiple sales organization in the SAP landscape than this coding may affect their performance also.

Jitendra

mahendra_jani3
Contributor
0 Kudos

Hi Jitendra,

Infect this is my requirement also, but I am confused on a point that, USEREXIT_MOVE_FIELD_TO_VBAK would be used to add value in some fields in VBAK, but how will it help in terms of Drop Down list at Order Reason field?

Hi Vishnu,

If you achieve this requirement then let us know as well that how you achieve the same and what coding you did.

Regards,

MJ.

Former Member
0 Kudos

Hi Mj,

I was successful in acheiving this. Do not worry I will guide you.

Please follow the below steps:

I maintained the order types and their respective order reasons in a custom table.

1. Create a Search help exit for the search help H_TVAU(you will need a access key inorder to do this).

2. Create a Z copy of the FM F4IF_SHLP_EXIT_EXAMPLE.

3. In the search helpexit in the search help 'H_TVAU' mention this custom FM .

4.In the Source code of your FM at the step:

IF

CALLCONTROL-STEP = 'DISP'.

include your code.

VBAK-AUART will be present in the Global Memory.

I used the Parameter ID AAT (parameter for the AUART field) to get values.

In the Record_tab you will have the complete drop down list values, so you can delete the record tab according to the order type.

Please let me know if you are not clear,.

Thanks.

mahendra_jani3
Contributor
0 Kudos

Hi Vishnu,

Thanks for helpful details.

Does that mean we will not be needing USEREXIT_MOVE_FIELD_TO_VBAK?

By above settings itself that Order Reason availability in Drop Down list will be managed?

Regards,

MJ.

Former Member
0 Kudos

Hi,

Yes, there is no need of other user exits.

I managed to do this with this search exit and it is working fine for me.

Let me kno if you have any issues, I will guide you through.

Cheers.

mahendra_jani3
Contributor
0 Kudos

Hi Vishnu,

Thanks for clarification. Very helpful.

I had done similar type of search but had not got perfect solution.

Regards,

MJ.