Ansicht
Dokumentation

BADI_MM_PUR_S4_CCTR - Change of Field Controls for Central Purchase Contracts

BADI_MM_PUR_S4_CCTR - Change of Field Controls for Central Purchase Contracts

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Field Control

This Business Add-In (BAdI) is used in the Fiori UI for Manage Purchase Contracts (MM-FIO-PUR-SQ-CON) component. You can use this BAdI to change the field control properties of specific fields in the FIORI user interface at header, item, and distribution facets.

One of the following statuses can be set for the configurable fields through this BAdI:

  • Hidden (-): the field is not displayed, so it cannot be edited.
  • Displayed (*): the field is displayed and an entry cannot be made.
  • Mandatory (+): the field is displayed and an entry must be made.
  • Optional (.): the field is displayed and an entry can be made.
  • In the standard system, the BAdI is not active.
  • With the app Custom Fields and Logic, you can create exactly one active implementation.

For more information about the standard settings such as filters, single or multiple uses, see the “Enhancement Spot Element Definitions” tab in the BAdI Builder (transaction SE18).

The SAP configuration defines a status for each field. You can change this status by following the rules given in the following table:

Status | Symbol | Stronger Than | Example
Hidden | - | * + . | '-' and '*' results in '-'
Displayed | * | + . | '*' and '+' results in '*'
Mandatory | + | . | '.' and '+' results in '+'
Optional | . |   | '.' and '.' results in '.'

In sum, the "stronger" status - independent of whether it is from SAP or from the BAdI implementation - defines the effective status.

Example: If SAP defines the status 'Optional' for the field "Non-Valuated Goods Receipt" and the BAdI defines 'Displayed', then the field will be displayed (read-only).

Note:

The BAdI Change of Field Control for Central Purchase Contract (MM_PUR_S4_CCTR_FLDCTRL_SIMPLE) allows you to influence the field control of the below-mentioned fields. A few field properties that are business critical per process cycle may get overwritten through application logic even after this BAdI. It does not perform any checks that may be required after the change of the status properties.

For example, if your BAdI implementation defines the status of a field as 'Mandatory' that SAP has defined as 'Optional', the system does not perform a check and does not output an error message.

Header Fields Available in the Changing Parameter of BAdI

  • CASHDISCOUNT1DAYS,,
  • PAYMENTTERMS,,
  • INCOTERMSCLASSIFICATION,,
  • DOOCUMENTCURRENCY,,
  • CORRESPNCEXTERNALREFERENCE,,
  • SUPPLIERQUOTATIONEXTERNALID,,
  • PURCHASINGGROUP,,
  • INCOTERMSTRANSFERLOCATION,,
  • VALIDITYSTARTDATE,,
  • VALIDITYENDDATE,,
  • CENTRALPURCHASECONTRACTTYPE,,
  • COMPANYCODE,,
  • CASHDISCOUNT2DAYS,,
  • NETPAYMENTDAYS,,
  • CASHDISCOUNT1PERCENT,,
  • CASHDISCOUNT2PERCENT,,
  • SUPPLIERPHONENUMBER,,
  • SUPPLIERRESPSALESPERSONNAME,,
  • QUOTATIONSUBMISSIONDATE,,
  • DISTRIBUTIONTYPE,,
  • INCOTERMSVERSION,,
  • INCOTERMSLOCATION1
  • INCOTERMSLOCATION2

Item Fields Available in the Changing Parameter of BAdI

  • CONTRACTNETPRICEAMOUNT,,
  • PRICEISTOBEPRINTED,,
  • TAXCODE,,
  • SUPPLIERMATERIALNUMBER,,
  • UNDERDELIVTOLRTDLMTRATIOINPCT,,
  • OVERDELIVTOLRTDLMTRATIOINPCT,,
  • UNLIMITEDOVERDELIVERYISALLOWED,,
  • INVOICEISGOODSRECEIPTBASED,,
  • EVALDRCPTSETTLMTISALLOWED,,
  • GOODSRECEIPTISEXPECTED,,
  • CONFIRMATIONCONTROL,,
  • INVOICEISEXPECTED,,
  • GOODSRECEIPTISNONVALUATED

Header/Item Distribution Fields Available in the Changing Parameter of BAdI

  • PLANT,,
  • STORAGELOCATION,,
  • PURCHASINGGROUP,,
  • PAYMENTTERMS,,
  • CASHDISCOUNT1DAYS,,
  • CASHDISCOUNT2DAYS,,
  • NETPAYMENTDAYS,,
  • CASHDISCOUNT1PERCENT,,
  • CASHDISCOUNT2PERCENT
|

Interface: IF_MM_PUR_S4_CCTR_FLDCTRL_SMPL

Example Implementation

Example Class: CL_MM_PUR_EX_S4_CCTR_FLDCTRL

Method: IF_MM_PUR_S4_CCTR_FLDCTRL_SMPL~MODIFY_FIELDCONTROLS

|

Import Parameter

IS_HEADER: Central Contract Header

IS_ITEM: Central Contract Item

IS_HDR_DISTR: Central Contract Header Distribution

IS_ITM_DISTR: Central Contract Item Distribution

IV_CTX: Context that tells where the call has come from, i.e., header / item / header distribution / item distribution. Depending on context, relevant fields are filled in changing parameter.

Changing Parameter,,

CT_FIELDSELECTION: Field selection tables with supported fields and default properties.






BAL Application Log Documentation   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 7773 Date: 20240608 Time: 021727     sap01-206 ( 79 ms )