Ansicht
Dokumentation

MM_PUR_S4_PR_FLDCNTR - BAdI: Change of Field Control for Purchase Requisitions

MM_PUR_S4_PR_FLDCNTR - BAdI: Change of Field Control for Purchase Requisitions

CL_GUI_FRONTEND_SERVICES - Frontend Services   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the MM-PUR-REQ component. You can use this BAdI to modify the properties of different fields that appear on the user interface of purchase requisition apps. You can make the fields hidden, read-only, mandatory, or optional as per your requirements. You can influence the field control properties for the following apps:

  • Create Purchase Requisition
  • Manage Purchase Requisitions - Professional

To change the field control properties, assign one of the following values to FIELDSTATUS:

  • '-': To hide the field
  • '*': To make the field read-only
  • '+': To make the field mandatory
  • '.': To make the field optional

Example Implementation:

FIELD-SYMBOLS <fs> TYPE mmpur_s_pr_fldsel.

       READ TABLE fieldselection_table ASSIGNING <fs> WITH KEY field = 'PRODUCTTYPE'.

       IF sy-subrc EQ 0.

         <fs>-fieldstatus = '*'.

       ENDIF.

Implementing this piece of code makes the field Product Type read-only in purchase requisitions.

Example

A sample implementation is available that illustrates the intended of this BAdI.

Method for BAdI: MM_PUR_S4_PR_ FLDCNTRL_SIMPLE

Use

The method IF_MM_PUR_S4_PR_FLDCNTRLof the Business Add-In MM_PUR_S4_PR_FLDCNTRL_SIMPLEenables you to change the field control properties of different attributes that appear on the user interface of purchase requisition apps.

Parameters

Import Parameters

  • PURCHASEREQUISITION:This parameter holds details for purchase requisition header.
  • PURCHASEREQUISITIONITEM: This parameter holds details for purchase requisition item.
  • ISEXTPURGSCENARIO:This parameter holds value as ‘X’ in case of central requisitioning, and “ “ in case of local purchasing.

Changing Parameters

FIELDSELECTION_TABLE:This table holds a list of supported fields and its default properties retrieved from configurations defined in the apps. You can overwrite these properties based on the values of importing parameters.

Note: This BAdI cannot overwrite the configurations done at the app level.






rdisp/max_wprun_time - Maximum work process run time   General Material Data  
This documentation is copyright by SAP AG.

Length: 3148 Date: 20240523 Time: 215029     sap01-206 ( 45 ms )