When creating or changing purchasing documents, certain fields (texts, prices etc.) are not ready for input although indicator “optional entry” has been set correctly for the field selection reference key in the customizing, or at least, it looks like it has been done correctly.
The best way to explain how to solve this issue is with an example. Let´s have one with the “material group” in a purchase order, that appears in the transaction ME22N as not ready for input.
We might check in the customizing, for the field selection reference keys, but we might not find anything wrong.
But in a purchase order, as well as in any other purchasing documents, there are more than one field selection key involved in each transaction for a certain document type. It is sometimes difficult to see which keys are influencing the fields, and we have so many keys, that it can be very tiresome to check all of them, one by one.
For this reason you can determine exactly the field selection reference keys that are addressed in the relevant transactions, via a debugging session.
1. In Transaction SE37, display function module MEX_FELDAUSWAHL and set a break point at the first statement.
2. Start the transaction you have the issue with, in this case ME22N.
The program should stop at the break point set above.
Copy the import fields I_AUSWAHL0, I_AUSWAHL1, I_AUSWAHL2, I_AUSWAHL3, I_AUSWAHL4, I_AUSWAHL5, and I_AUSWAHL6 to the list of field names.
The corresponding field contents show the field selection reference keys that are composed as follows:
· AUSWAHL0: contains the key for the transaction code
· AUSWAHL1: contains the key for the activity type (AKT + V/H/A;
where V = Change, H = Create, A = Display)
· AUSWAHL2: contains the field selection key of the document type
· AUSWAHL3: contains the key for the item type
· AUSWAHL4: contains the key for deleted items
· AUSWAHL5: contains the key for the price display (Table T160D)
· AUSWAHL6: contains the key for the sub-item type
3. You can check the field selection reference keys found in Customizing. After checking the 3 keys shown via debugging: ME21N, AKTV, NBF, we could find that the key that was wrong customized was the NBF:
4. All keys from the AUSWAHLn fields are used to determine the field
selection and their status. They are set according to the following
Alternatively, the following can be stated:
- Field status ‘Hidden’ takes highest priority. This means that if a reference key has defined the field as ‘Hidden’, all other reference keys are overruled.
- Then follow statuses ‘Display’, ‘Mandatory’, and finally ‘Optional’. Accordingly, a field is assigned the attribute ‘Optional’ only if all reference keys for the field are set to ‘Optional’.
I hope this will help you in the future, as it has helped me in the past.