Show TOC

App Extensibility: Approve Purchase ContractsLocate this document in the navigation structure

Use

You can extend the Approve Purchase Contracts app for different aspects. For this purpose, the following extensibility options are available:

  • Add fields to the master list (S2.view.xml)

  • Add fields to the purchase contract item view (S3.view.xml)

  • Add fields to the purchase contract item details view (ItemDetails.view.xml)

  • Add fields to item service line overview (ItemServiceLine.view.xml)

Add Fields to Master List

To add customer fields to each work item in the master list, the following extensibility entities are available on the different software layers. You have to extend each of these entities according to your specific business needs:

UI

Back End/ABAP

View

Extension Point

Design Time: Name of Entity Set

Design Time: Extension Include (in DDIC Structure)

Runtime: BAdI to Be Implemented

S2.view.xml

extListItemInfo

WorkflowTaskCollection

SRA001S_PC_WORKFLOW_TASK_INCL

BAdI: SRA001_APC_RDP

Method: IF_SRA001_EX_PC_RDP~CHANGE_WORKFLOW_TASK_API

Add Fields to Purchase Contract Item View

To add customer fields to the header area and to the Information area of the purchase contract item overview, the following extensibility entities are available on the different software layers. You have to extend each of these entities according to your specific business needs:

UI

Back End/ABAP

View

Extension Point

Design Time: Name of Entity Set

Design Time: Extension Include (in DDIC Structure)

Runtime: BAdI to Be Implemented

S3.view.xml

extInformationS3

HeaderDetailCollection

SRA001S_PC_HEADER_DETAILS_INCL

BAdI: SRA001_APC_RDP

Method: IF_SRA001_EX_PC_RDP~CHANGE_HEADER_DETAILS_INFO_API

 
Add Fields to Purchase Contract Item Details View

To add customer fields to the header area and to the Information area of the purchase contract item details view, the following extensibility entities are available on the different software layers. You have to extend each of these entities according to your specific business needs:

UI

Back End/ABAP

View

Extension Point

Design Time: Name of Entity Set

Design Time: Extension Include (in DDIC Structure)

Runtime: BAdI to Be Implemented

ItemDetails.view.xml

extMaterialHeaderInfo

ItemDetailCollection

SRA001S_PC_ITEM_DETAILS_INCL

BAdI: SRA001_APC_RDP

Method: IF_SRA001_EX_PC_RDP~CHANGE_ITEM_DETAILS_INFO_API

extServiceHeaderInfo

extInformation

Add Fields to Item Service Line Overview

To add customer fields to the header area and to the Information area of the service line details view, the following extensibility entities are available on the different software layers. You have to extend each of these entities according to your specific business needs:

UI

Back End/ABAP

View

Extension Point

Design Time: Name of Entity Set

Design Time: Extension Include (in DDIC Structure)

Runtime: BAdI to Be Implemented

ItemServiceLine.view.xml

extServiceLineHeaderInfo

ServiceLineCollection

SRA001S_PC_SERVICE_LINE_INCL

BAdI: SRA001_APC_RDP

Method: IF_SRA001_EX_PC_RDP~CHANGE_ITEM_DETAILS_INFO_API

Further Extensibility Entities

Business Add-Ins (BAdIs)

The following BAdIs are available for extensibility purposes:

  • SRA001_APC_MDP

    You can use this BAdI to enhance the entities, that is, the OData model, of the sra001_pcapproval Gateway service. You can do this to add your own fields, for example.

  • SRA001_APC_RDP

    You can use this BAdI to change the runtime data that is returned by the Gateway service and displayed on the user interface of the Approve Purchase Contract app. This includes the use of pictures, changing the list of attachments and notes displayed, and changing the workflow. For more information, see the BAdI documentation and the example implementation.

    The above described BAdIs are available in Customizing for Materials Management under Start of the navigation path Purchasing Next navigation step  Contract Next navigation step Approve Purchase Contracts App End of the navigation path.

UI Controller Hooks

To plug in and execute custom code, the following hooks are available in the controller code:

Controller

Hook

Use

ItemDetails.controller.js

  • extHookOnInit

  • extHookSetHeaderFooterOptions

  • With this controller method you can enhance the onInit method of the ItemDetails.controller.js controller.

  • With this controller method you can enhance the setLocalHeaderFooterOptions method of the ItemDetails.controller.js controller to change the HeaderFooterOptions.

ItemServiceLine.controller.js

  • extHookOnInit

  • extHookSetHeaderFooterOptions

  • With this controller method you can enhance the onInit method of the ItemServiceLine.controller.js controller.

  • With this controller method you can enhance the setLocalHeaderFooterOptions method of the ItemServiceLine.controller.js controller to change the HeaderFooterOptions.

S2.controller.js

  • extHookOnInit

  • extHookSetHeaderFooterOptions

  • extHookModifySearchableODataFieldsForMasterListSearch

  • extHookDefineSearchableUITextsForMasterListSearch

  • With this controller method you can enhance the onInit method of the S2.controller.js controller.

  • With this controller method you can enhance the setLocalHeaderFooterOptions method of the S2.controller.js controller to change the HeaderFooterOptions.

  • With this controller method you can enhance the _getODataSearchFields method of the S2.controller.js controller.

  • With this controller method you can enhance the _getTextsFromUIElementsForSearch method of the S2.controller.js controller.

S3.controller.js

  • extHookOnInit

  • extHookSetHeaderFooterOptions

  • With this controller method you can enhance the onInit method of the S3.controller.js controller.

  • With this controller method you can enhance the onDataLoaded method of the S3.controller.js controller to change the HeaderFooterOptions.

S4.controller.js

  • extHookOnInit

  • extHookSetHeaderFooterOptions

  • With this controller method you can enhance the onInit method of the S4.controller.js controller.

  • With this controller method you can enhance the setLocalHeaderFooterOptions method of the S4.controller.js controller to change the HeaderFooterOptions.

If there are additional UI controller hooks available in the controller code, you can add own code. For more information, see the extensibility documentation for the respective SAP NetWeaver release on your front-end server at http://help.sap.com/fiori_implementation Start of the navigation path Extensibility Information for SAP Fiori Next navigation step Extending the UI Layer Next navigation step UI Extensibility Workflow Next navigation step  Next navigation step Checking the SAP-Enabled Extension Options Next navigation step UI Controller Hooks End of the navigation path.

More Information

For a general description of the extensibility options and procedures of SAP Fiori apps, see http://help.sap.com/fiori_implementation Start of the navigation path Extensibility Information for SAP Fiori End of the navigation path.