Ansicht
Dokumentation

MMPUR_S4_CTR_FLDCTRL - Change of Field Control for Purchase Contract Header and Items

MMPUR_S4_CTR_FLDCTRL - Change of Field Control for Purchase Contract Header and Items

BAL Application Log Documentation   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

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 the header and item levels of the purchase contract.

Based on the fields, you can provide one of the following field statuses 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.

Note: This BAdI is designed to increase the level of restrictions on fields of a purchase contract. It is advised not to use the BAdI to reduce the stringency of the standard SAP restrictions. For example, you can use this BAdI to change the control of a field from ‘optional’ to ‘mandatory’. However, changing the field control from ‘mandatory’ to ‘optional’ is not recommended.

  • 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 Purchase Contract Header and Items(MM_PUR_S4_CTR_MODIFY_FLDCTRL) 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 display an error message.

Header Fields Available in the Changing Parameter of the BAdI

  • CASHDISCOUNT1DAYS,,
  • PAYMENTTERMS,,
  • INCOTERMSCLASSIFICATION,,
  • DOCUMENTCURRENCY
  • EXCHANGERATE,,
  • TARGETAMOUNT
  • CORRESPNCEXTERNALREFERENCE,,
  • SUPPLIERQUOTATIONEXTERNALID,,
  • PURCHASINGGROUP
  • SUPPLYINGSUPPLIER
  • PURCHASECONTRACT,,
  • SUPPLYINGPLANT
  • SUPPLIER
  • PURCHASINGORGANIZATION
  • INCOTERMSTRANSFERLOCATION
  • QUOTATIONLATESTSUBMISSIONDATE
  • VALIDITYSTARTDATE
  • VALIDITYENDDATE
  • SUPPLIERADDRESSID
  • PURCHASINGDOCUMENTDELETIONCODE
  • INVOICINGPARTY
  • PURCHASINGDOCUMENTTYPE
  • COMPANYCODE
  • CASHDISCOUNT2DAYS
  • NETPAYMENTDAYS
  • CASHDISCOUNT1PERCENT
  • CASHDISCOUNT2PERCENT
  • EXCHANGERATEISFIXED
  • SUPPLIERPHONENUMBER
  • CORRESPNCINTERNALREFERENCE
  • SUPPLIERRESPSALESPERSONNAME
  • QUOTATIONSUBMISSIONDATE
  • CREATEDBYUSER
  • INCOTERMSVERSION
  • INCOTERMSLOCATION1
  • INCOTERMSLOCATION2

Item Fields Available in the Changing Parameter of the BAdI

  • PLANT
  • PURCHASINGDOCUMENTITEMCATEGORY
  • PURCHASINGINFORECORD
  • STORAGELOCATION
  • ACCOUNTASSIGNMENTCATEGORY
  • PLANNEDDELIVERYDURATIONINDAYS
  • TARGETQUANTITY
  • ORDERQUANTITYUNIT
  • ISORDERACKNRQD
  • NETPRICEAMOUNT
  • PRICEISTOBEPRINTED
  • PURGDOCPRICEDATE
  • PURGDOCRELEASEORDERQUANTITY
  • TAXCODE
  • PURCHASINGDOCUMENTITEMTEXT
  • MANUALDELIVERYADDRESSID
  • CUSTOMER
  • REQUIREMENTTRACKING
  • SUPPLIERMATERIALNUMBER
  • PURGDOCORDERACKNNUMBER
  • PURCHASINGDOCUMENTDELETIONCODE
  • STOCKTYPE
  • UNDERDELIVTOLRTDLMTRATIOINPCT
  • INCOTERMSCLASSIFICATION
  • OVERDELIVTOLRTDLMTRATIOINPCT
  • UNLIMITEDOVERDELIVERYISALLOWED
  • MATERIALGROUP
  • INCOTERMSTRANSFERLOCATION
  • ORDERPRICEUNIT
  • INVOICEISGOODSRECEIPTBASED
  • EVALDRCPTSETTLMTISALLOWED
  • GOODSRECEIPTISEXPECTED
  • PARTIALINVOICEDISTRIBUTION
  • SHIPPINGINSTRUCTION
  • SUPPLIERCONFIRMATIONCONTROLKEY
  • REFERENCEDELIVERYADDRESSID
  • SUBCONTRACTOR
  • MATERIAL
  • NETAMOUNT
  • MATERIALTYPE
  • ORDERITEMQTYTOBASEQTYNMRTR
  • ORDERITEMQTYTOBASEQTYDNMNTR
  • BASEUNIT
  • ORDERQUANTITY
  • ORDERPRICEUNITTOORDERUNITNMRTR
  • NETPRICEQUANTITY
  • NODAYSREMINDER1
  • NODAYSREMINDER2
  • NODAYSREMINDER3
  • ORDPRICEUNITTOORDERUNITDNMNTR
  • INVOICEISEXPECTED
  • GOODSRECEIPTISNONVALUATED
  • MULTIPLEACCTASSGMTDISTRIBUTION
  • VOLUMEUNIT
|

The following parameters are available:

Import Parameters

  • IS_HEADER: Structure containing the purchase contract header
  • IS_ITEM: Structure containing the purchase contract item
  • IV_CTX: Context that mentions the source of the call, that is, at the header or item levels of the purchase contract. Depending on the context, relevant fields are filled in the changing parameter

Changing Parameters

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

Interface: IF_MM_PUR_S4_CTR_MODIFY_FLDCTR

Example Implementation

You can find example implementations in the BAdI Builder on the Enhancement Spot Element Definitionstab in the Implementation Example Classessection. The following example implementation is available:

Example Class: CL_MM_PUR_EXMP_CTR_FIELDCNTRL (Example Class for Field Control in Pur. Contr. Header & Item)

Method: MODIFY_FLDCTRL (Modify Field Control at Header & Item Level of Pur. Contract)

|

For information about implementing BAdIs as part of the enhancement framework, see SAP Library for SAP NetWeaver Platform on SAP Help Portal at SAP NetWeaver Platform. Choose a release and then Application Help. In SAP Library, choose SAP NetWeaver Library: Function-Oriented View-> Application Server -> Application Server ABAP -> Application Development on AS ABAP -> Customer-Specific ABAP Development -> Enhancement Framework.






BAL_S_LOG - Application Log: Log header data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 11709 Date: 20240523 Time: 220902     sap01-206 ( 140 ms )