SAP CRM Mobile Sales Document

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Sybase Mobile Sales for SAP CRM

Enhancement Guide Gateway 1.1


to SAP NetWeaver Mobile 7.10

Applies to:
Gateway 1.1 to SAP NetWeaver Mobile 7.10. For more information, visit the Mobile homepage.

Summary
Cutting edge mobile solutions like Sybase Mobile Sales for SAP CRM and Sybase Mobile Inbox for SAP
ERP are built on top of the SAP-Sybase Co-Innovation Platform for enterprise mobility. Solutions built on top
of this platform are easily customizable to suit different customer scenarios / business processes. This article
is an extensive guide to do such enhancements on Sybase Mobile Sales for SAP CRM using Gateway 1.1 to
SAP NetWeaver Mobile 7.10.
Author:

Siva Satya Prasad Yerra

Company: SAP Labs India


Created on: 15 December 2010

Author Bio
Siva Satya Prasad Yerra is an Associate Architect with the NetWeaver Mobile team.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


1

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Table of Contents
Business Scenario .............................................................................................................................................. 3
Approaches to Enhancements............................................................................................................................ 3
Extension using CE Structures: ...................................................................................................................... 4
CE Structure ................................................................................................................................................................ 4
BADI Implementation ................................................................................................................................................... 4

Extending Distribution Logic: .......................................................................................................................... 5


Modifying Distribution Logic: ........................................................................................................................................ 6
Copy of Distribution logic: ............................................................................................................................................ 6

Related Content ................................................................................................................................................ 10


Copyright........................................................................................................................................................... 11

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


2

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Business Scenario
A customer using Gateway to SAP NetWeaver Mobile 7.10 has productive devices running a mobile
application and productive data in the Data Orchestration engine for these devices. The application can be
one that is delivered by SAP or one that is developed by a customer / partner. Now, the customer wants to
enhance the application and upgrade some or all devices to the newer application version. Enhancing the
application could be done by modifying the data object definitions, adding new data objects or by changing
only the distribution logic. This should be achieved without any downtime / data loss or corruption of the
devices that are not upgraded, since they are already productive. These devices should continue to run the
older version of the application with no data loss.

Approaches to Enhancements
Currently customer can enhance the model with following options:
1.

Extension using CE structures.

2.

Extending Distribution logic (Non-Disruptive Change)

3.

Data Model Change (Disruptive Change) (Data model change is a candidate by itself for
another long article. So, this article will not cover data model changes.)

Non-Disruptive Changes: Any change which does not impact the structural information of the
application or data models is termed as non-disruptive.

Disruptive Changes: Any change that impact the structural integrity of the data models are termed
as disruptive.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


3

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Extension using CE Structures:


CE Structure
PARTNER/OBJECT_GUID Key field of the root/header node
OBJECT_ID Can be used to fill any key useful for unique identification
KEY_LENGTH In case of composite keys can be used for identification
FIELD_NAME Actual field name to be enhanced
FIELD_TEXT Field text useful for screen labels
DATA_TYPE Data type of the enhanced field
DATA_LENGTH Length of the enhanced field
DECIMALS For decimal fields
GENERAL_FLAG Single character field and can be used to indicate some special behaviors
FIELD_VALUE Actual field value to be displayed
Currently for the Business Partners downloaded from CRM to DOE, we do not download the time zone or
the language of the Business partner.
So we will enhance our GETDETAIL bapi wrapper to get these two new fields downloaded to the device and
display them on the device UI.
BADI Implementation
1. Execute transaction SE19
2. In the second section Create Implementation, give the enhancement
CRM_MOBILE_SMARTPHONE and click on Create Implementation.

spot

name

as

3. Give enhancement implementation name as Z_SMARTPHONE_IMPL_XXX where is the client


number and give any description and click OK.
4. In Create BADI Implementation screens, give BADI Implementation name as
Z_SMARTPHONE_IMPL_XXX and Implementation class as Z_BUPA_IMPL_XXX and for the BADI
Definition select CRM_BUPA_MOB_SMARTPHONE from the dropdown list.
5. Once created, double click on the Implementing class Z_BUPA_IMPL_XXX and open the method
IF_EX_CRM_BUPA_MOB_SMARTPHONE~CRM_BADI_BUPA_MOBILE_GETDETAIL and copy
paste the following code.

Data: ls_bupa_header_details TYPE crms_bupa_mob_bpheader,


ls_address
TYPE bapibus1006_address,
lt_bupa_header_details TYPE STANDARD TABLE OF crms_bupa_mob_bpheader,
ls_ce_bupa_hdr
TYPE CRMS_MOBILE_CUST_ENHANCE,
lt_ce_bupa_hdr
TYPE STANDARD TABLE OF
CRMS_MOBILE_CUST_ENHANCE.
lt_bupa_header_details[] = et_bupa_header_details[].
LOOP AT lt_bupa_header_details INTO ls_bupa_header_details.
CALL FUNCTION 'BUPA_ADDRESS_READ_DETAIL'
EXPORTING
IV_PARTNER
= ls_bupa_header_details-partner
IV_XADDRESS
= 'X'
IMPORTING
ES_ADDRESS
= ls_address
EXCEPTIONS

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


4

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

NO_PARTNER_SPECIFIED
= 1
NO_VALID_RECORD_FOUND
= 2
OTHERS
= 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_ce_bupa_hdr-PARTNER = ls_bupa_header_details-partner.
ls_ce_bupa_hdr-FIELD_NAME = 'ZTIME_ZONE'.
ls_ce_bupa_hdr-FIELD_TEXT = 'Address time zone'.
ls_ce_bupa_hdr-DATA_TYPE = 'CHAR'.
ls_ce_bupa_hdr-DATA_LENGTH = '6'.
ls_ce_bupa_hdr-DECIMALS
= '0'.
ls_ce_bupa_hdr-FIELD_VALUE = ls_address-TIME_ZONE.
APPEND ls_ce_bupa_hdr to lt_ce_bupa_hdr.
clear ls_ce_bupa_hdr.
ls_ce_bupa_hdr-PARTNER = ls_bupa_header_details-partner.
ls_ce_bupa_hdr-FIELD_NAME = 'Z_LANGUAGE'.
ls_ce_bupa_hdr-FIELD_TEXT = 'Language Key'.
ls_ce_bupa_hdr-DATA_TYPE = 'CHAR'.
ls_ce_bupa_hdr-DATA_LENGTH = '2'.
ls_ce_bupa_hdr-DECIMALS
= '0'.
ls_ce_bupa_hdr-FIELD_VALUE = ls_address-LANGUISO.
APPEND ls_ce_bupa_hdr to lt_ce_bupa_hdr.
CLEAR ls_ce_bupa_hdr.
ENDLOOP.
CE_BUPA_HEADER[] = lt_ce_bupa_hdr[].

6. Activate the Code in the system and trigger initial load from CRM system and all set to see new
fields on device
Extending Distribution Logic:
Data distribution decides the distribution of data to the receivers based on the distribution rules or
dependencies. SAP delivers the data distribution model but it may not be the best suited data distribution
model for customers business processes / requirements. In this case, customer has to modify the data
distribution logic to suit their requirement. There are two ways to modify the data distribution.
1.

Add the distribution logic to the SAP delivered model with minimal changes. (Not
recommended)

2.

Create new distribution logic without modifying the SAP delivered model. (Recommended)

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


5

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Modifying Distribution Logic:


Modifying SAP delivered Distribution Model will allow only compatible changes and conflicts will need to be
resolved when upgrades are shipped by SAP. In this case, you can add distribution rules or distribution
dependencies, but existing distribution rules or distribution dependencies cant be deleted since only
compatible enhancements can be made. Whenever SAP modifies the distribution logic, customer has to
resolve conflict at the time of system (DOE) upgrade. So, we recommend not modifying the distribution logic
delivered by SAP.
Copy of Distribution logic:
Other option is to create new distribution logic without modifying the SAP delivered model.
Follow the steps to create new distribution logic
i.

Create SWCV in transaction SDOE_WB transaction.

ii.

Extend the SWCV in Uses tab.

iii.

Save the SWCV.

iv.

Execute (F8) the report ZCOPY_DM.

Note: This is not a standard functionality. So, in case of any errors when executing this report, please raise an OSS
message in the component BC-MOB-MGW.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


6

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

a. Select the source SWCV (MAS_SMARTPHONE_DMSCV , 1.4 of SAP) from the input help
provided for SRCSWCV parameter.
b. Provide the source DM Name in SRCDMNAM parameter. This should be exact name
displayed
in
SDOE_WB
transaction.
For
example,
DM_FOR_PARTNER,
DM_FOR_EMPLOYEE, DM_FOR_CUSTOMIZATION etc.
c.

Select the target SWCV (For Example ZMAS_SMARTPHONE_DMSWCV , 1.0 of SAP)


from the input help provided for TARSWCV parameter.

d. Provide the target DM Name in TARDMNAM parameter. This name can be anything.
v.

Execute the report. (This step will copy the Distribution model mentioned in SRCDMNAM
parameter to TARSWCV parameter with the name mentioned in TARDMNAM parameter.)

vi.

Repeat steps (v) to (vi) for all the distribution models delivered in
MAS_SMARTPHONE_DMSCV , 1.4 of SAP.

Now, distribution logic can be changed based on the requirement. Please check the following links for more
information.
Distribution Modeling Concepts - http://weblogs.sdn.sap.com/pub/wlg/15697
Bulk Rules

- http://weblogs.sdn.sap.com/pub/wlg/15886

Device Attribute Mapping Rules - http://weblogs.sdn.sap.com/pub/wlg/16900


Distribution Rule types

- http://weblogs.sdn.sap.com/pub/wlg/16925

Initial Value Rules

- http://weblogs.sdn.sap.com/pub/wlg/17132

Date Pattern Rules


2d10-7886-d001a320497c

- http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d090377a-27e8-

Extract Rules
fbbb-dc66833e7ca0

- http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00cbb9d-9fcf-2c10-

Node Level Filter Rules

- http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22264

Distribution Rules: Steps for Creation/Types of Rules - http://weblogs.sdn.sap.com/pub/wlg/17024


Node Associations - In Data Objects and Dependency - http://weblogs.sdn.sap.com/pub/wlg/17163
Distribution Dependency

- http://weblogs.sdn.sap.com/pub/wlg/17337

Dependency Static Filters

- http://weblogs.sdn.sap.com/pub/wlg/22154

Dependency Rule

- http://weblogs.sdn.sap.com/pub/wlg/17338

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


7

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Conditional Dependency
vii.

- http://weblogs.sdn.sap.com/pub/wlg/22157

After modification of distribution logic activate the distribution model using Activate button as
displayed in the below image.

To use new distribution logic, we need to modify the active DM SWCV assigned to the model in
SDOE_ESDMA_DESIGN transaction.
i.
ii.

Go to transaction SDOE_ESDMA_DESIGN.
Select the MAS_SMARTPHONE_SALES_V00 - V9G001 version from the input help provided
for ESDMA name and click on Display button.

iii.

Click on Runtime Projections & Headers button.

iv.

Select Assign DMSWCVs tab.

v.

Select the DM SWCV (ZMAS_SMARTPHONE_DMSWCV , 1.0 of SAP) which is created in


earlier steps and click on Save button.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


8

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Now the subscribing of new device uses the newly created distribution logic to distribute the data to the
devices.
Note: Devices which were subscribed earlier will still use the distribution logic which is delivered by SAP. One should
unsubscribe and subscribe to the ESDMA to use newly created distribution logic.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


9

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Related Content
For more information, visit the Mobile homepage.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


10

Enhancement Guide Gateway 1.1 to SAP NetWeaver Mobile 7.10

Copyright
Copyright 2009 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 Business ByDesign, 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 S.A. in the United States and in other countries. Business Objects 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.
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.

SAP COMMUNITY NETWORK


2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com


11

You might also like