Extensibility-Customer CookBook SP04 1

  • Published on
    13-Nov-2015

  • View
    223

  • Download
    4

Embed Size (px)

DESCRIPTION

Extensibility-Customer CookBook SP04 1

Transcript

  • SAP

    SAP SRM Add-On 1.0 Extensibility Cookbook

    2/21/2014

  • Copyright 2013 SAP AG or an SAP affiliate company. All rights reserved.

    No part of this publication may be reproduced or transmitted in any form or for any purpose without the express

    permission of SAP AG. The information contained herein may be changed without prior notice.

    Some software products marketed by SAP AG and its distributors contain proprietary software components of other

    software vendors.

    Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems

    Incorporated in the United States and other countries.

    Apple, App Store, FaceTime, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri,

    and Xcode are trademarks or registered trademarks of Apple Inc.

    Bluetooth is a registered trademark of Bluetooth SIG Inc.

    Citrix, ICA, Program Neighborhood, MetaFrame now XenApp, WinFrame, VideoFrame, and MultiWin are trademarks or

    registered trademarks of Citrix Systems Inc.

    Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.

    Edgar Online is a registered trademark of EDGAR Online Inc., an R.R. Donnelley & Sons Company.

    Facebook, the Facebook and F logo, FB, Face, Poke, Wall, and 32665 are trademarks of Facebook.

    Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile

    Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube,

    Dalvik, and Android are trademarks or registered trademarks of Google Inc.

    HP is a registered trademark of the Hewlett-Packard Development Company L.P.

    HTML, XML, XHTML, and W3C are trademarks, registered trademarks, or claimed as generic terms by the

    Massachusetts Institute of Technology (MIT), European Research Consortium for Informatics and Mathematics

    (ERCIM), or Keio University.

    IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10,

    z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6,

    POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2

    Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are

    trademarks or registered trademarks of IBM Corporation.

    Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft

    Corporation.

    INTERMEC is a registered trademark of Intermec Technologies Corporation.

    IOS is a registered trademark of Cisco Systems Inc.

    The Klout name and logos are trademarks of Klout Inc.

    Linux is the registered trademark of Linus Torvalds in the United States and other countries.

    Motorola is a registered trademark of Motorola Trademark Holdings LLC.

  • Mozilla and Firefox and their logos are registered trademarks of the Mozilla Foundation.

    Novell and SUSE Linux Enterprise Server are registered trademarks of Novell Inc.

    OpenText is a registered trademark of OpenText Corporation.

    Oracle and Java are registered trademarks of Oracle and its affiliates.

    QR Code is a registered trademark of Denso Wave Incorporated.

    RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm,

    BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry AppWorld are trademarks or registered trademarks of

    Research in Motion Limited.

    SAVO is a registered trademark of The Savo Group Ltd.

    The Skype name is a trademark of Skype or related entities.

    Twitter and Tweet are trademarks or registered trademarks of Twitter.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

    Wi-Fi is a registered trademark of Wi-Fi Alliance.

    SAP, R/3, ABAP, BAPI, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork,

    SAP HANA, the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence,

    Xcelsius, Sybase, Adaptive Server, Adaptive Server Enterprise, iAnywhere, Sybase 365, SQL Anywhere, Crossgate,

    B2B 360 and B2B 360 Services, m@gic EDDY, Ariba, the Ariba logo, Quadrem, b-process, Ariba Discovery,

    SuccessFactors, Execution is the Difference, BizX Mobile Touchbase, It's time to love work again, SuccessFactors Jam

    and BadAss SaaS, and other SAP products and services mentioned herein as well as their respective logos are

    trademarks or registered trademarks of SAP AG in Germany or an SAP affiliate company.

    All other product and service names mentioned are the trademarks of their respective companies. Data contained in

    this document serves informational purposes only. National product specifications may vary.

    These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated

    companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP

    Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group

    products and services are those that are set forth in the express warranty statements accompanying such products

    and services, if any. Nothing herein should be construed as constituting an additional warranty.

  • Icons in Body Text

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

    Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help General Information Classes and Information Classes for Business Information Warehouse on the first page of the any version of SAP Library.

    Typographic Conventions

    Type Style Description

    Example text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

    Cross-references to other documentation.

    Example text Emphasized words or phrases in body text, graphic titles, and table titles.

    EXAMPLE TEXT Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.

    Example text Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

    Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

    Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

    EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

  • Table of Contents 1.0 Extensibility Overview ....................................................................................................................................................................... 5

    2.0 Types of Extensibility ........................................................................................................................................................................ 6

    2.1 Extending screens via SPRO configurations ............................................................................................................................ 6

    2.1.1 Extending screens that support Metadata framework ................................................................................................... 6

    2.1.2 Extending screens that does not support Metadata ..................................................................................................... 10

    2.1.3 Extending entities in Default Settings .............................................................................................................................. 12

    2.1.4 Enable Search Helps for Custom Fields (Available for SP03 onwards) .................................................................... 15

    2.2 Extending screens using Pre Exit and Post Exit approach .................................................................................................. 16

    2.2.1 General information ............................................................................................................................................................. 16

    2.2.2 Preparation ............................................................................................................................................................................ 16

    2.2.3 Examples ............................................................................................................................................................................... 18

    2.3 Extending Screens using SPRO and Custom JS Pre Exit and Post Exit apporach ........................................................ 25

    2.4 Generic BADI ................................................................................................................................................................................ 25

    2.4.1 /SRMNXP/BD_ENHANCE_MODEL ............................................................................................................................................. 25

    2.4.2 /SRMNXP/BD_CHANGE_DATA .................................................................................................................................................. 25

    2.5 Extending other screens on the UI ........................................................................................................................................... 26

    2.5.1 Extending Filter Categories ....................................................................................................................................................... 26

    3.0 Theming ............................................................................................................................................................................................. 26

    3.1 General Information ..................................................................................................................................................................... 26

    Steps to load custom CSS/JS file .................................................................................................................................................. 26

    3.3 Approaches ................................................................................................................................................................................... 26

    Create a new style class in custom CSS file and add style to element via custom javascript ....................................... 26

    Example 1 ......................................................................................................................................................................................... 26

    Override existing style class in custom CSS ............................................................................................................................ 27

    Example 1 ......................................................................................................................................................................................... 27

    Example 2 ........................................................................................................................................................................................ 28

    4.0 Additional Utilities and Transactions........................................................................................................................................... 28

    5.0 Appendix ............................................................................................................................................................................................ 29

  • 1.0 Extensibility Overview

    The SAP SRM User Interface Add-on 1.0 is one of the first few transactional applications by SAP, which is built over HTML5 and ODATA technology. The application is built to cater to the needs of casual and semi-professional users while creating shopping carts in SRM.

    The application contains many HTML5 views and it is built in a way that user can easily search for items and add to cart and order. With this application, it is also possible to go to details, if the user needs detailed information. As application contains many views so there was a need of strong extensibility framework, which could be used by customers to address their specific business needs.

    Extensibility in SAP SRM User Interface Add-on 1.0 is offered in four ways.

    This document contains systematic procedures for system administrators and consultants to extend the existing screens on the User Interface (UI) provided by the SAP SRM User Interface Add-On 1.0 SP01. Using the Extensibility feature provided by the SAP SRM User Interface Add-On 1.0 SP01, you can extend the existing screens by

    Adding new fields

    Assigning validations for the new fields

    Adding new field controls

    This document divides the screens on the UI provided by SAP SRM User Interface Add-On 1.0 SP01 into the following:

    Screens that support metadata framework like Item, Header, and Item details

    Screens that do not support metadata framework like Cant find and Free text item

    Screens like Users default data where additional BADI is used to set user context

  • 2.0 Types of Extensibility

    2.1 Extending screens via SPRO configurations

    2.1.1 Extending screens that support Metadata framework This chapter guides describes the steps to add new fields to the screens on the UI, for which the entities do not

    have metadata associated with them.

    The entities, which support the metadata framework, are associated with the following screens provided by the

    SAP SRM User Interface Add-On SP01:

    Shopping Cart Item

    Shopping Cart Item Basic Data

    Shopping Cart Item Service & Delivery

    Shopping Cart Item details

    Note: Entities, in the namespace SRMNXP/SRMSHOPPING_CART have metadata associated with them.

    Adding new fields and Metadata fields to structures

    Adding new field to the CLL structure [optional step]

    You can add the newly created fields to the include structure or skip this step if customer fields are already present. 1. Log on to your SAP system.

    2. Enter the transaction SPRO.

    3. Go to SAP Supplier Relationship Management Cross-Application Basic Settings Extensions and Field

    Control (Personalization) Configure Customer Fields Define Customer fields on Item Level Append

    for Customer Fields on Shopping Cart Item.

    4. Enter the customizing, select Item Basic Data and add the new field.

    5. Click Create Append.

    6. Enter the Append Name in the customer namespace.

    7. Enter a short description for the append structure.

    8. Add a new component with the respective component type for...

Recommended

View more >