cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1.3 - IOS Native App - Synchronization Parameters from SAP to MBO

Former Member
0 Kudos

Hi everyone,

I am referring to Sybase 2.1.3 documentation regarding the Synchronization Parameters at http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01217.0213/doc/html/jne1311190715875...

My background:

  1. I am connecting my iOS Simulator using a native app (based on SUP Object API's) to connect to SUP
  2. My SUP connects to SAP backend

The MBO's are built from SAP Function Modules.

The Function Modules expect a number of Importing Parameters to execute and return some values.

I have a SAP Function Module called ZGET_ADDRESS, which will return me an employee address if I pass in the employee name and ID.

I developed the MBO for this ZGET_ADDRESS and deployed to SUP.

The generated IOS code from SUP for this MBO is called Get_Address.h and Get_Address.m

Inside this Get_Address.h / .m files, from what I understand, the findByPrimaryKey, findBy... methods are used to get data from the device local mobile device database, which are data that was downloaded after the SAP Function Modules have been executed.

So by using these methods I do not have the chance to pass in the employee name and ID.

I want to pass in the employee name and ID values for the SAP Function Modules from my IOS app before the values are downloaded to my device database to get correct results in return.

So, is this Synchronization Parameters concept the right way to acheive what I want?

The documentation states that:

  1. Specify sync parameters for each MBO - in the Sybase Unwired Workspace
  2. Generate code - A Sync Parameter IOS class will be generated for each MBO
  3. Use that Sync Parameter class to specify attributes and values in the IOS code in Xcode. So here I will be setting my employee name and ID.
  4. Then ONLY call [SUP101SUP101DB synchronize]; in the Xcode to start sync   // i am using SUP101SUP101DB as my project name
  5. This will result in the backend Funtion Modules to execute with the specified

Is this understanding correct?

Or is there other ways to do this?

Please advise.

Thank you.

Regards,

Haridev

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sync Param is not meant for this purpose.

The right approach is to use Personalization Parameters. You have to do following to get right resultset:

At SUP end:

1. Make two different personalization keys, one for employee ID and other for employee name. Assign each of PP similar datatype to emp ID & name. Select appropriate storage method "client or server"

2. Map these PP to respective inputs. (in attribute mapping)

At iOS end

1. Before calling findAll method with MBO instance, make sure you have assigned both Persoanlization key with some values.

2. Call save method to push PP values to device or sever (work as chosen in SUP)

3. Sync your DB and findAll the particular MBO. You will the right result.

Note*

When you are using a BAPI with dynamic input. You have to have a PP.

When you want to filter your device data according to a user or based on other parameter, use Sync Param.