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, the following extensibility options are available:

  • You can add new customer fields to the Information section of product detail view.

  • You can add a new section to the product detail view and add new fields to it.

  • You can add logic to the submit process before, after, or in both instances when a count document is submitted to the back-end system.

  • You can add logic to the submit process before, after, or in both instances when an adjustment document is submitted to the back-end system.

Add Fields to Information Section and to New Section of Product Detail View

To add new fields in the Product Information section, or in a new section, of the product detail 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: Gateway Project

Design Time: Gateway Entity

Design Time: Extension Include (in DDIC Structure)

Runtime: Superclass/Method to Be Redefined

ProductDetails.view.xml

  • To add new fields to Information section:

    product_details_item_ext1

  • To add new fields to new section in the Information section:

    Product_Details_Sections_Ext

RETAILSTORE_STOCK_COR

Product entity in RETAILSTORE_STOCK_COR project

RETAIL_ST_SC_ARTICLE_INCL

CL_RETAILSTORE_STOC_01_DPC methods:

  • PRODUCTS_GET_ENTITY

  • PRODUCTS_GET_ENTITYSET

  • PRODUCTS_CREATE_ENTITY

  • PRODUCTS_DELETE_ENTITY

Note

You must copy the code from the original class and use the enhanced structure where needed. The enhanced structure is available in the redefined GET methods signature (ER_ENTITY type).

UI Controller Hooks

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

Controller

Hook

Use

ProductDetails.Controller.js

extHookOnProductDetailsDataReceived

Allows you to execute code to validate or enrich product information after product data is received from the back-end system

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.

Business Add-Ins (BAdIs)

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

  • BAdI: Enhancement of Product Details

    RETAIL_ST_SC_PRODUCT_ENH

    You can use this BAdI to retrieve additional product information for the Product Detail screen. This BAdI uses the GET_PRODUCT_SUPP_DATA method to retrieve data from the back-end system.

  • BAdI: Enhancement of Details for a Single Product

    RETAIL_ST_SC_SINGLE_PROD_ENH

    You can use this BAdI to retrieve additional product information for a single product in the Product Detail screen. This BAdI uses theGET_SINGLE_PRODUCT_SUPP_DATA method.

Add Logic to Submit Process for Count Data

You can add logic to validate count data before, after, or in both instances when it is submitted to the back-end system. For this purpose, 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 Controller Hooks

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

Controller

Hook

Use

ProductCount.Controller.js

extHookOnProductCountBeforeSubmit

Allows you to execute code to validate count data before it is submitted to the back-end system

ProductCount.Controller.js

extHookOnProductCountAfterSubmit

Allows you to execute code to validate count data after it is submitted to the back-end system

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.

Add Logic to Submit Process for Adjustment Data

UI Controller Hooks

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

Controller

Hook

Use

ProductShrink.Controller.js

extHookOnProductShrinkBeforeSubmit

Allows you to execute code to validate adjustment data before it is submitted to the back-end system

ProductShrink.Controller.js

extHookOnProductShrinkAfterSubmit

Allows you to execute code to validate adjustment data after it is submitted to the back-end system

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.