Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
mauro_bianchi
Active Contributor

Sometimes happen that when you create or change Purchasing documents (external or internal), certain fields are not present or are defined in a different way that you aspected.

This may be due an incorrect Customizing setting, and more in detail because of the field selection reference key in the Customizing section "screen layout at document level". You can find this Customizing function in IMG under material management -> Purchasing -> for :

  • Purchase requisition
  • Purchase order
  • RFQ/Quotation
  • Contract
  • scheduling agreement

here you can specify the input attributes of fields by using field selection keys.          A field selection key determines whether a field is:

  • Required
  • Optional
  • Displayed
  • Suppressed

When you run a purchasing transaction the System use and combined up to six different field selections key in order to determine the correct status of the field. So, check all the relevant combinations in Customizing could be really difficult, but with the help of the debugging you can determine the exact setting combination. 

All the purchasing document specified above use function module MEX_FELDAUSWAHL to manage the field selection, debugging this F.M. you can easily determine the field reference key.

EXAMPLE : yo noticed that in transaction ME51N the field material disappear from the tab "material data" :

How to analyse this via debugging :

Run transaction SE37, display function module MEX_FELDAUSWAHL 


 Push the button display and set the breakpoint :

 

Run transaction ME51N ( the same for trx. me51n, me31k, me21n, etc...)     
The program 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 :

 This mean that the attribute of the field material is determinated from the field selection reference key ME51N, AKTH, NBB and PT0B... so, now you must to check the customizing :
 

For the field selection present in the debugging session (ME51N, AKTH, NBB, PT0B), you need to check the field "material" .

select field selection :

select field selectio group :

Here you can see that the material field is set as Optional

do the same for AKTH, NBB and PT0B... you can see that in PT0B the field material is not set (so result suppressed) :

set the field as optional, and save. now you can see that the field is present in ME51N as optional :

Content/ meaning  of the fields I_AUSWAHL :

I_AUSWAHL0 : The field selection key that corresponds to the transaction code (in our example ME51N)

I_AUSWAHL1 : contains activity type:

-   AKTH    In creation mode

-   AKTV    In change mode

-   AKTA    In display mode

-   AKTE    With PO extension

I_AUSWAHL2 : Contains the field selection key that you have assigned to the document type for the purchasing document. For example, in the standard System, field selection key NBB is assigned to document type NB.

I_AUSWAHL3 :  contains the key for the items type (es. PT0B for standard item requisition). FYI, the first 2 character are fixed PT, the third represent the item category (see table T163Y) the fourth represent the doc. category (-   A   for RFQs,  B   for purchase requisitions, F   for purchase orders,  K   for contracts,   L   for scheduling agreements.

Combination of field selection keys and Priority : as in the example the field status "suppressed" have the higest priority, then "display", "required" and the last is "optional", this means that the field is defined optional only if all reference key are defined as optional, viceversa if at least one ref. key is suppressed (not defined) all the other reference keys have no importance.