SAP BLOG How to change Field control in ME5*N?

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,855
Tepki puanı
7
Puanları
6
Example of a requirement: Disable edit mode for the Fixed supplier field at the Item level if the Source of supply is determined for dependent requirements for a production order. System: SAP S4/HANA 1909.

Use BADI MM_PUR_S4_PR_FLDCNTRL_SIMPLE Change of Field Control for Purchase Requisitions

It is necessary to set conditions and to fill the FIELDSTATUS which can be populated with the following values:

  • ‘-‘ Field is Hidden
  • ‘*’ Field is only Displayed, which means no entry is possible
  • +’ Field is Mandatory, which means an entry must be made
  • ‘.’ Field is Optional, which means an entry may be made

Kod:
    FIELD-SYMBOLS <fs> TYPE mmpur_s_pr_fldsel.

    READ TABLE fieldselection_table ASSIGNING <fs> WITH KEY field = 'FIXEDSUPPLIER'.
    IF sy-subrc EQ 0 AND
       purchaserequisitionitem-accountassignmentcategory EQ 'F' AND
       purchaserequisitionitem-fixedsupplier IS NOT INITIAL.
      <fs>-fieldstatus = '*'.
    ENDIF.

Okumaya devam et...
 
Üst