Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Filter order reason in sales order creation

sri6666
Active Participant
0 Kudos
1,775

Hi Experts,

Need assistance on filter the order reason while create sale order.

When ever sale order is created user want to see only few order reason only in drop down for order reason. Suggest any exit or badi to enhance existing functionality.images.jpeg

1 ACCEPTED SOLUTION
Read only

sri6666
Active Participant
1,406

we can restrict order reason drop down values by implementing the SAP NOTE 2477027

6 REPLIES 6
Read only

former_member1716
Active Contributor
0 Kudos
1,406

Hello sri6666,

You just have to remove the unwanted order reasons through SPRO transaction.

Recommend you to refer the LINK for details.

Regards!

Read only

FredericGirod
Active Contributor
0 Kudos
1,406

The field VBAK-AUGRU is linked to the default Search help (you could see it in SE11). This search help is directly linked to the value table.

So if you want to filter the possible value, you need to create a search help based on a view; In this view you could filter values expected.

And you need to modify the field dynpro to specify your search help

Read only

sri6666
Active Participant
0 Kudos
1,406

They ask me to filter using coding..They are not ready to change any existing functionalities. Need to apply filter via coding

Read only

0 Kudos
1,406

They ask for Functionality change, so they have to accept the impact of their requierement

Use /h or /hs and try to press F4 on your field, did you see the debugger open ? no ? so coding is not possible

Read only

RaymondGiuseppi
Active Contributor
0 Kudos
1,406

You may be required to use some implicit enhancement spots in standard SAP code) for search help to add your own BAdI.

Define your own BAdI and interface with a filter based on search-help name and a method to change the selected values internal tables.

Add a call of this BAdI at the end of forms of SDSD function group such as

  • GET_VALUES_SH
  • GET_VALUES_FV
ENHANCEMENT 1  ZXXXX_HIDE.    "active version
* Specific Filter in Search Help
  DATA: lo_handle TYPE REF TO zXXXX_hide.
  GET BADI lo_handle
    FILTERS
      shlpname = shlp-shlpname.
  CALL BADI lo_handle->change_value_tab
    EXPORTING
      shlp      = shlp
    CHANGING
      value_tab = value_tab[].
ENDENHANCEMENT.

Then using the filter, implement your filering BAdI for some search-help

NB: You may also handle the number of record to return, so you may be required to save it at entry of form, clear it and at end of form delete excess records. (for search help with many records)

Read only

sri6666
Active Participant
1,407

we can restrict order reason drop down values by implementing the SAP NOTE 2477027