cancel
Showing results for 
Search instead for 
Did you mean: 

FM triggered when performing delta sync of visits(To Do's)

former_member200342
Active Contributor
0 Kudos


Hi,

I would like to know the exact FM triggered in the CRM system when I perform a delta sync of visits from the REx application. I am using REx 3.1.16 version. I tried to a put a break point in the FM /MAC/RSFM_GET_USR_ACTIVITIES but it did not get triggered. I know visits is a DCN in REX 3.1 but could not find the correct FM to check how the to do's created in the CRM system are getting downloaded to the device.

Any hint will be very helpful!!

Regards,

Prajit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prajeet,

During Activity sync in DCN versions of REx no backend Function module is called.

Even this is the point why objects were made DCN, so that they don't have to depend on Backend for every sync.

The data is loaded to SMP via initial download, and if any changes occur in that object a DCN (Data Change Notification) is triggered from Backend telling the SMP about the changes.

However we think, by putting breakpoint in backend you basically want to know which activities your user will have on device. In order to check this, you can run the download query of ActivityMBO on your SMP server to get exactly the list of activities that are going to be present in device db for ActivityMBO.

Follow-Up Questions:

Q1. How to execute Queries on SMP server?

A1.  If you have remote desktop Connection to the SMP system, then you can check a tool scjview.exe <SMP_install_directory>\SAP\MobilePlatform\Servers\SQLAnywhere16\BIN32 . Otherwise if you don't have direct access then you can use any database tool that supports Sybase ASE and use that to connect to your SMP cache DB.

Q2. How to find Download Query for an MBO?
A2. First find out your Domain id using following query:

     

1.select * from mms_domain; check the id column corresponding to your domain name.

    

2. Copy below file to some location:

<SMP installation directory>\SAP(or Sybase)\MobilePlatform\Servers\UnwiredServer\deploy\sup\d<domain_id><package_name>\deployment_unit-ds.xml

3. Now open the above copied in editor(Preferrably Notepad++)

4. Search for ActivityMBO you will find a tag like this

    <virtualTable name="<table_name>" MBOName="ActivityMBO"

     Check the sub tag <query name="downloadData">

     The SQL written inside the below tags is the query you need, copy it and pasted it somewhere.

      <local:sql>

          <![CDATA[

              "SQL-Query"

           ]]>
Q3. On Executing the Query Error is coming "Not enough values for host variables", How to resolve that?

A3. The reason this error is coming is because there is a host variable :remoteID in the query, which you need to replace with a remoteID of the synced user(So to check tha data you need Sync a device first).

Q4. How to get the remote id to replace the download query?
A4. There are various methods of getting that, easiest being getting it from device db from any of the pull_pq tables.

if you don't have access to device db you can use the following query to get remote id for your user:

select ac.user_name, du.deviceid, su.remoteid, su.username from dba."mms_rbs_subscription" su,dba."mms_application_connection_info" ac, dba."mms_devices_users_info" du

where

du.deviceid = ac.appConnId

and su.deviceid=ac.appconnid

and su.username= du.user_name

and su.pkg='<Package_Folder_Name>'

and ac.domain_name ='<Domain_Name>'

and su.remoteid is not null order by ac.user_name

Package_Folder_Name will be the one that you found at location

<SMP installation directory>\SAP(or Sybase)\MobilePlatform\Servers\UnwiredServer\deploy\sup\

example: d3_saprex.3_2

Domain_Name will be your domain name example: "REX".

former_member200342
Active Contributor
0 Kudos

Hi Shariq,

Thanks for the reply. However there must be some FM in the backend which mus tbe pushing the new activities created in CRM to SMP during the DCN. Can you let me know that FM.

Regards,

Prajit

Former Member
0 Kudos

HI Prajit,

PFB: The function module use to send changes from CRM to SMP. It will be triggered every time a new activity is created or modified.

/MAC/RSFM_DCN_ACTIVITY_DELTA

Regards,
Shariq

Answers (0)