Show TOC

App Extensibility: Adjust StockLocate this document in the navigation structure

Use

You can extend Adjust Stock according to your business needs for different aspects. For this purpose, extensibility options that allow you to do the following are available:

  • Add new customer fields to the Information section of product detail view

  • Add a new section to the product detail view and add new fields to it

  • Validate a product count before it is submitted to the back-end system

  • Validate the amount of an adjustment before it is sent to the back-end system

  • Customize a response or an action after a product count is submitted to the back-end system

  • Add logic to the submit process before, after, or in both instances when an adjustment is submitted to the back-end system

  • Configure navigation to the Look Up Retail Products, Transfer Stock, and Order Product apps in the product detail, count, and adjustment views of the app.

  • Customize the navigation menu at the bottom right side of the screen

  • Connect a custom barcode scanning device to the app and customize scan results

  • Provide a list of valid units of measure against which to filter all available units of measure in the adjustment view

Further Extensibility Entities

Business Add-Ins (BAdIs)

The following Business Add-Ins are available for extensibility purposes:

BAdI

Use

Methods

RETAIL_ST_SC_PRODUCT_ENH

BAdI: Enhancement of Product Details

Retrieves additional product information for the Product Detail screen

GET_PRODUCT_SUPP_DATA: To retrieve data from the back-end system

RETAIL_ST_SC_SINGLE_PROD_ENH

BAdI: Enhancement of Details for a Single Product

Retrieves additional product information for a single product in the Product Detail screen

GET_SINGLE_PRODUCT_SUPP_DATA

If there are additional fields available in the OData service, you can display these fields on the UI. 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 Extension Points End of the navigation path.

UI Utility Hooks

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.

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

Utility Class

Hook

Use

retail.store.stockcorrection.utils.BarcodeScanHandler~

utilityExtHookOnBarcodeScanHandler

Allows you to connect a custom barcode scanning device to the app

To implement the UI utility hook, do the following:

  1. Add the following code to Component.js of the extension app:

    jQuery.sap.require("retail.store.z_your_extended_stockcorrection_app.utils.BarcodeScanHandler");

  2. Add a new BarcodeScanHandler.js file to the utils folder of the extension app with the following content:

    jQuery.sap.declare("retail.store.z_your_extended_stockcorrection_app.utils.BarcodeScanHandler");

    jQuery.sap.require("retail.store.stockcorrection.utils.BarcodeScanHandler");

  3. Implement the extension hook as follows:

    retail.store.stockcorrection.utils.BarcodeScanHandler.utilityExtHookOnBarcodeScanHandler = function(fnGetBarcodeScanHandling) {//extension implementation};

Display of UI Controls

To ensure proper function of the app, no UI controls should be hidden on the app UI.

For more information about hiding UI controls, 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 Hiding UI Controls 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.