sap retail exec 3.0 mobile apps
DESCRIPTION
SAP Retail Exec 3.0 Mobile AppsTRANSCRIPT
-
SAP How-to Guide SAP Mobility
SAP Retail Execution 2.0 mobile application
Applicable Releases:
SAP Retail Execution 2.0 mobile application
Version 1.0
April 2012
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
-
Copyright 2012 SAP AG. 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.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered
trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p,
System p5, System x, System z, System z10, System z9, z10, z9, iSeries,
pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390,
OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power
Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS,
HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex,
MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and
Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other
countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either
trademarks or registered trademarks of Adobe Systems Incorporated in
the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open
Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame,
and MultiWin are trademarks or registered trademarks of Citrix Systems,
Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks
of W3C, World Wide Web Consortium, Massachusetts Institute of
Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used
under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP
BusinessObjects Explorer, StreamWork, and other SAP products and
services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in Germany and other
countries.
Business Objects and the Business Objects logo, BusinessObjects,
Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other
Business Objects products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Business
Objects Software Ltd. Business Objects is an SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere,
and other Sybase products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Sybase, Inc.
Sybase is an SAP 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.
The information in this document is proprietary to SAP. No part of this
document may be reproduced, copied, or transmitted in any form or for
any purpose without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license
agreement or any other agreement with SAP. This document contains
only intended strategies, developments, and functionalities of the SAP
product and is not intended to be binding upon SAP to any particular
course of business, product strategy, and/or development. Please note
that this document is subject to change and may be changed by SAP at
any time without notice.
SAP assumes no responsibility for errors or omissions in this document.
SAP does not warrant the accuracy or completeness of the information,
text, graphics, links, or other items contained within this material. This
document is provided without a warranty of any kind, either express or
implied, including but not limited to the implied warranties of
merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without
limitation direct, special, indirect, or consequential damages that may
result from the use of these materials. This limitation shall not apply in
cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not
affected. SAP has no control over the information that you may access
through the use of hot links contained in these materials and does not
endorse your use of third-party Web pages nor provide any warranty
whatsoever relating to third-party Web pages.
SAP How-to Guides are intended to simplify the product
implementation. While specific product features and procedures typically
are explained in a practical business context, it is not implied that those
features and procedures are the only approach in solving a specific
business problem using SAP NetWeaver. Should you wish to receive
additional information, clarification or support, please refer to SAP
Consulting.
Any software coding and/or code lines / strings (Code) included in this
documentation are only examples and are not intended to be used in a
productive system environment. The Code is only intended better explain
and visualize the syntax and phrasing rules of certain coding. SAP does
not warrant the correctness and completeness of the Code given herein,
and SAP shall not be liable for errors or damages caused by the usage of
the Code, except if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java. Any code change
in these components may cause unpredictable and severe malfunctions
and is therefore expressively prohibited, as is any decompilation of these
components.
Any Java Source Code delivered with this product is only to be used by
SAPs Support Services and may not be modified or altered in any way.
-
Document History
Document
Version Description
1.00 First official release of this guide. April 2012
-
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
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
User entry texts. 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.
Icons
Ic
on Description
Caution
Note or Important
Example
Recommendation or Tip
-
Table of Contents
1. Overview ........................................................................................................................... 1
1.1 Scenario.............................................................................................................................. 1
1.2 Background Information................................................................................................... 1
2. Custom Enhancement fields ............................................................................................ 2
2.1 Supported Objects ........................................................................................................... 2
2.2 BAdI ................................................................................................................................... 2
3. Technical Details ............................................................................................................. 4
3.1 Overview ............................................................................................................................ 4
3.2 BAdI in CRM/ERP ............................................................................................................. 4
4. CE fields Semantics ......................................................................................................... 6
4.1 Data Type .......................................................................................................................... 6
4.2 TTSX 4 Digit Code ............................................................................................................ 7
4.3 List of Values ..................................................................................................................... 8
5. Step-by-Step Procedure .................................................................................................. 9
5.1 Example: Custom Enhancement Fields in Business Partner ....................................... 9
6. Appendix ........................................................................................................................ 12
6.1 List of Sample BAdI Implementation ............................................................................12
6.2 Sample Code 1 .................................................................................................................12
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 1
1. Overview
1.1 Scenario You have implemented SAP Retail Execution 2.0 mobile application and have business
requirements for adding Custom Enhancement fields in mobile application UI.
Custom Enhancement fields have been implemented in the CRM/ERP backend system
and you need to adapt those fields in mobile application UI.
Some standard fields in CRM/ERP backend system are not available in mobile
application UI and you need to adapt those fields in mobile application.
Example: This is just an example for adding Boolean data type (ACCOUNT field) and Numeric
data type (BP_TYPE field)
Standard: With Custom Enhancement fields:
1.2 Background Information Changing mobile application UI by app. program code will cost for the entire application life
cycle management. You will have to re-merge the program code, build, test and distribute it in
every upcoming future release.
SAP delivers Custom Enhancement fields by BAdI implementation in CRM/ERP without
changing the mobile application program code. SAP Retail Execution mobile application UI has
been implemented to adapt Custom Enhancement fields in standard.
SAP strongly recommends customers to look at this Custom Enhancement fields by BAdI
solution as the first solution option. Changing mobile application program code should be the
last option.
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 2
2. Custom Enhancement fields
2.1 Supported Objects Custom Enhancement structures are pre-delivered in the standard Retail Execution 2.0.
Source: Data Object Display Update Comments
CRM Activity Yes Yes
CRM Business Partner Yes Yes
CRM Contact
(Business Partner)
Yes No Contact is child object of Business
Partner.
Only Display option is supported for
Custom Enhancement fields.
ERP Sales Order
(Sales Document)
Yes Yes Both Header and Items
ERP Return
(Sales Document)
Yes Yes Both Header and Items
Note
Custom Enhancement fields in UI are not available for new objects created during
implementation. A workaround is however possible. To enhance a new object, first create
the new object and then change the object to update the CE fields after the data is
synchronized.
Note
List of Value sub type which shows entries in drop down list is not supported.
2.2 BAdI Following BAdI enhancement spots are available for Custom Enhancement of fields in CRM and
ERP.
CRM Enhancement Spot: /MAC/RS_ES
Data Object BAdI definition
Activity /MAC/RS_BADI_DEF_ACT
Business Partner /MAC/RS_BADI_DEF_BP
Contact (Business Partner) /MAC/RS_BADI_DEF_BP
ERP Enhancement Spot: /MRE/ES_SD
Data Object BAdI definition
Sales Order (Sales Document) /MRE/BADI_DEF_SD
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 3
Data Object BAdI definition
Return (Sales Document) /MRE/BADI_DEF_SD
Note
For Business Partner, four types of methods are available in the standard system
Of these, only the, GET_DETAIL, UPDATE methods are relevant for Custom Enhancement
in current release.
Method Comments
GET_LIST Not available for Custom Enhancement fields.
GET_DETAIL Add BADI logic to insert CE field data as appropriate to ensure CE field
data is downloaded to the device from CRM/ERP.
CREATE Not relevant for Custom Enhancement fields.
Option: When you modify mobile application source code, you can
add BADI logic to push device supplied CE field data into
CRM/ERP.
UPDATE or
MODIFY
Add BADI logic to ensure changed CE field data supplied by the device
is updated in CRM.
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 4
3. Technical Details
3.1 Overview The following diagram gives a high level overview of this data flow from CRM/ERP to Device.
As shown below, you just need to implement the BAdI.
3.2 BAdI in CRM/ERP Transaction: SE18
CRM Enhancement Spot: /MAC/RS_ES
ERP Enhancement Spot: /MRE/ES_SD ...
Enh anc emen t Spo t: / MSA/CRM_M OBILE_SAL ES
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 5
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 6
4. CE fields Semantics For the BAdI implementation in CRM/ERP backend, you need to populate the CE fields before
creating/activating the BAdI implementations.
CE field structure (CRM): /MAC/RST_CUST_ENHANCE_10 and /MAC/RST_CUST_ENHANCE_11
Field Name Comments
OBJECT_GUID BE Key OBJECT_GUID
(OBJECT_GUID2) Only for Contact. Parent Header GUID.
OBJECT_ID BE Key OBJECT_ID from HEADER
KEY_LENGTH Unused
FIELD_NAME Technical field name
FIELD_TEXT Localized (human readable) field name
DATA_TYPE One of standard data types
DATA_LENGTH As appropriate for data type
DECIMALS As appropriate for data type
GENERAL_FLAG Unused
FIELD_VALUE Field content
CE fields structure (ERP): /MRE/CUST_ENHANCE and /MRE/CUST_ENHANCE2
Field Name Comments
OBJECT_NUMBER Object Number.
(OBJECT_NUMBER2) Only for Items. Header number.
KEY_LENGTH Unused
FIELD_NAME Technical field name
FIELD_TEXT Localized (human readable) field name
DATA_TYPE One of standard data types
DATA_LENGTH As appropriate for data type
DECIMALS As appropriate for data type
GENERAL_FLAG Unused
FIELD_VALUE Field content
4.1 Data Type When populating CE fields from the CRM/ERP backend, DATA_TYPE conventions are
important. These conventions determine the allowed values for the columns in the CE fields.
The mobile application supports these values:
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 7
DATA_TYPE TTSX
CODE
DATA_LENGTH DECIMAL NOTES
CHAR 1500 N Unused Character; N indicates
number of characters
INT 1100 Unused Unused Signed integer
(equivalent to long in C#)
BOOL 1600 Unused Unused Boolean; FIELD_VALUE
contains X for true, blank
otherwise
DATS 1800 Unused Unused SAP-style date
representation (14 digit
date format)
DEC 1300 N M Decimal; N indicates
digits before decimal
point; M those after
NUMC 1200 N Unused Number; N indicates
number of digits
4.2 TTSX 4 Digit Code In addition, the mobile application supports values for DATA_TYPE, which consist of four-digit
string values in the form TTSX:
TT represents a base type
S is the subtype
X additional attributes associated with the type
This table lists the types and allowed values for subtype.
For example, 1501 is a Read-only character string
TT: Base Type (First 2
digits)
S: Sub Type (3rd digit) X: Attributes (4th digit)
11
Integer
0: Normal
1: List of Values
2: List of Values + User
Input
0: Updatable
1: Read Only
12
Numeric
0
None
0: Updatable
1: Read Only
13
Decimal
0
None
0: Updatable
1: Read Only
14
Date
0
None
0: Updatable
1: Read Only
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 8
15
Char
0
1: List of Values
0: Updatable
1: Read Only
16
Boole
0: Normal
1: List of Values
0: Updatable
1: Read Only
17
Time
0
None
0: Updatable
1: Read Only
18
DateTime
0
None
0: Updatable
1: Read Only
Note: Only Read Only fields are supported in current release. Even if you specify XXX0, it is
handled as XXX1 in current release.
Time, Date and DateTime are all stored as 14-character numeric strings of the form
YYYYMMDDHHMMSS. For Time, the YYYYMMDD characters are ignored (and ideally should be
0s); for Date, the trailing HHMMSS characters are ignored (and ideally should be 0s).
4.3 List of Values List of Values is not supported in current SAP Retail Execution 2.0.
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 9
5. Step-by-Step Procedure
5.1 Example: Custom Enhancement Fields in Business Partner
This is just an example for adding Boolean data type (ACCOUNT field) and Numeric data type
(BP_TYPE field).
Standard: With Custom Enhancement fields:
High-Level Steps:
1. Implement the BAdI /MAC/RS_BADI_DEF_BP in CRM.
2. Synchronize Customer in device
3. Check UI in device.
Detail Steps:
1. Transaction SE18 in CRM
Enhancement Spot: /MAC/RS_ES
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 10
2. Create /MAC/RS_BADI_BP_GET_DETAIL method of BADI /MAC/RS_BADI_DEF_BP
Implementation
Create BADI Implementation.
Enter Enhancement Implementation name.
Enter BAdI Implementation name and Implementation Class.
Select Implementing Class
Select GETDETAIL method
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 11
3. Copy and paste the sample code 1 in Appendix.
4. Check and Activate the BAdI
5. Synchronize Customer in device
6. Check the UI in device.
-
Extending SAP Retail Execution 2.0 mobile application using Custom Enhancement fields
April 2012 12
6. Appendix
6.1 List of Sample BAdI Implementation You can copy sample BAdI implementation.
Sample BAdI Scenario
1 BADI /MAC/SRVO_BADI
Method /MAC/RS_BADI_BP_GET_DETAIL
Scenario 1 CE field
6.2 Sample Code 1 method /MAC/RS_BADI_IF_BP~/MAC/RS_BADI_BP_GET_DETAIL.
DATA : ls_ce_et_bp_h TYPE /mac/rss_cust_enhance_10,
ls_bp_h TYPE /mac/rss_bp_header.
LOOP AT ct_bupa_header_details INTO ls_bp_h.
ls_ce_et_bp_h-object_guid = ls_bp_h-partner_guid.
ls_ce_et_bp_h-field_name = 'ACCOUNT'.
ls_ce_et_bp_h-data_type = '1601'.
ls_ce_et_bp_h-field_value = ls_bp_h-isaccount.
CASE sy-langu.
WHEN 'D'.
ls_ce_et_bp_h-field_text = 'Kunde'.
WHEN 'J'.
ls_ce_et_bp_h-field_text = ''. WHEN OTHERS.
ls_ce_et_bp_h-field_text = 'ACCOUNT'.
ENDCASE.
INSERT ls_ce_et_bp_h INTO TABLE ce_et_bupa_header_details.
ls_ce_et_bp_h-object_guid = ls_bp_h-partner_guid.
ls_ce_et_bp_h-field_name = 'BP_TYPE'.
ls_ce_et_bp_h-data_type = '1201'.
ls_ce_et_bp_h-field_value = ls_bp_h-type.
CASE sy-langu.
WHEN 'D'.
ls_ce_et_bp_h-field_text = 'BP Art'.
WHEN 'J'.
ls_ce_et_bp_h-field_text = ''. WHEN OTHERS.
ls_ce_et_bp_h-field_text = 'BP TYPE'.
ENDCASE.
INSERT ls_ce_et_bp_h INTO TABLE ce_et_bupa_header_details.
ENDLOOP.
endmethod.
-
www.sap.com/contactsap
www.sdn.sap.com/irj/sdn/howtoguides