Show TOC

App Extensibility: Transfer StockLocate this document in the navigation structure

Use

You can extend the Transfer Stock app 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 header section of transfer document to provide additional information about the transfer.

  • Add new customer fields to the product section of transfer document to provide additional product information in the transfer.

  • Add new logic to the submit process to act on the transfer before it is submitted to the back-end system.

  • Add additional information or hide information for any product in the master list

  • Change or disable standard links in the app, such as links to the Look Up Retail Products and Adjust Stock apps.

  • Add, replace, or hide standard links in the app.

  • Connect a custom barcode scanning device to the app

  • Integrate your own scanning implementation.

  • Provide additional criteria for a product search

  • Execute a custom process when a transfer receiving site is selected

  • Define custom or default values for the Reason for Transfer movement type field

  • Execute a custom process when a transfer reason is selected

  • Allow other fields in the transfer creation screen to be updated when the receiving site is changed

  • Gather and send all custom attributes to the back-end system along with the standard transfer details

  • Replace standard validation logic on quantity fields

  • Replace the standard data validation process for the create transfer view with a custom validation process

  • Add a specific unit of measure for a product in addition to the quantity entered by an associate in a transfer

  • Suppress display of the product search dialog box after a transfer is created

  • Allow store associates to transfer products to a site that does not carry those products

  • Include any additional attributes in the transfer

  • Customize the list of transfers by customizing the structure of a line item in the list

  • Specify the quantity and unit of measure to set for a specific product that is added to a transfer

  • Specify the quantity and unit of measure to set for a specific product that is added to a transfer through a scan

  • Enable or disable the quantity field for products that are not normally carried at a location

  • Round up or down the total price of each line item in a transfer
Further Extensibility Entities

In addition to the extensibility elements described in the product BOM, the following extension elements are available:

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.

The following Business Add-Ins are available for extensibility purposes. In most cases they are used in conjunction with specific extensibility elements, such as extension hooks or points, to fully implement the desired extensibility feature. The BOM provides this information in the list of available extensibility elements for the app.

BAdI

Use

Methods

RETAIL_ST_TS_PRODUCT_ENH

BAdI: Enhancement of Product Details

Retrieve additional product information for the transfer

  • GET_TRF_DETAILS_SUPP_DATA: To retrieve data from the back-end system

Modify logic that influences products displayed in search and scan results based on details entered by store associates

  • PRODUCT_SEARCH: To replace the product search logic

  • GET_SCANNED_PRODUCT_NUM: To replace the product scan logic

RETAIL_ST_TS_TRANSFER_HEAD_ENH

BAdI: Enhancement of Transfer Document Header

Allows you to retrieve additional data for the transfer document.

  • GET_TRF_HEADER_SUPP_DATA: To retrieve data from the back-end system

Allows you to retrieve additional data for several transfer documents.

  • GET_TRF_HEADERS_SUPP_DATA: To retrieve data from the back-end system

RETAIL_ST_TS_PARSE_PROD_ENH

BAdI: Enhancement for Parsing of Product Information

Parses the product string when creating, deleting, or updating a transfer document. This allows you to send or modify product information.

  • PARSE_PRODUCT: To parse the product string in the back-end system

RETAIL_ST_TS_SUBMIT_ENH

BAdI: Enhancement of Product List Before It Is Submitted

Enhances the list of products in a transfer document before submitting it to the back-end system

  • ENHANCE_SUBMITTING_LIST: To enhance data in the back-end system

RETAIL_ST_TS_UPD_DETAIL_ENH

BAdI: Enhancement to Update Additional Product Details

Updates supplemental product information for a transfer

  • UPDATE_TRF_DETAILS_SUPP_DATA: To update data in the back-end system

BADI_RTST_TRANSFER_TYPES

BAdI: Enhancement of Transfer Types

Retrieves additional data and modifies the logic to retrieve transfer types, such as the movement type or reasons for the transfer

  • READ_TRANSFER_TYPES: To retrieve data in the back-end system

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 utility hooks are available in the code:

Utility Class

Hook

Use

retail.store.transferstock.utils.BarcodeScanHandler~

utilityExtHookOnBarcodeScanHandler

Allows you to integrate your own scanning implementation.

retail.store.transferstock.utils.Utilities~

utilityExtHookEnableNonListedProducts

Allows you to enable or disable the quantity field for unlisted products

retail.store.transferstock.utils.Context~

utilityExtHookOnAddProductByProductNumberToTransfer

Allows you to specify the quantity and unit of measure to set for a specific product that is added to a transfer

utilityExtHookOnAddProductByBarcodeNumberToTransfer

Allows you to specify the quantity and unit of measure to set for a specific product that is added to a transfer through a scan

utilityExtHookGetTransferDetailsCustomAttributeNames

Gathers and sends all custom attributes to the back-end system along with the standard transfer details

utilityExtHookInitializeCustomAttributesForProduct

Allows you to initialize any custom attributes added to the product description

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_transferstock_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_transferstock_app.utils.BarcodeScanHandler");

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

  3. Implement the extension hook as follows:

    retail.store.transferstock.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.