cancel
Showing results for 
Search instead for 
Did you mean: 

Create Custom Service

Former Member
0 Kudos

Hi,

I am migrating an application from Mobile 2.5 to Mobile 7.1.

In the old application code was implemented in the user exit for dynamic filters.

I have been reading the documentation of migration which says we must do a custom service.

Does anyone know what are the steps to do this?

Best regards.

Maria Elena

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

OK

Former Member
0 Kudos

Hi,

Custom services in DOE can influence the current message flow(using read and write services) , but does not exactly help in making this data to flow down to a certain device (make this data subscribe to a device).

In DOE, data flows down to a device based on distribution rules only.

There are ways to design a distribution rule , it could be criteria field based rule(the value of a specific dataobject field(s) are evaluated against static values or dynamic values)

it could be a bulk rule , where data flows down irrrespective of the content of the dataobject.

If I understand right, you need to send data based on a user name only to device having the same user?

This data table is present in backend ?

is this user that you mentioned in the query ((Select * from table where user = user device), present as part of dataobject that is modeled in DOE?

As you explained initial load will bring all the data from BE to DOE and using rules , this data is filtered and send to devices that are eligible to receive this data

Regards,

Liji

Former Member
0 Kudos

Hi,

Thanks.

¿You know what the first flow that runs when you sync?

5 classes are created for each data object:

ZDOECL_005_003_0_BW

ZDOECL_005_003_MWFL

ZDOECL_005_003_MWSR

ZDOECL_005_003_OUT_VERSIO

ZDOECL_005_003_UTIL

Thanks

Maria Elena

Former Member
0 Kudos

Hi,

MMW_FLOW_INBOUND_CLIENT_BV is the first flow called when client sync.

Those generared objects are internal. You can go to flow definition of data object,select above mentioned flow and keep adding your custom service.

Regards,

Dhana

Former Member
0 Kudos

Hi,

¿You know what is the first method that is run to put a breakpoint in debugger?

Best regards.

Maria Elena

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Select the data object from SDOE_WB transaction. Double click on the data object. So, that information will be displayed in the right side of the screen.

Now click on the Flow Class Name link. Which opens the class. Now put the breakpoint in PROCESS_INBOUND_CLIENT_BV_MSG method.

Regards,

Siva.

Former Member
0 Kudos

Hi,

In old MI with each sync, I always ran the getlist and getdetail each syncbo now in the Mobile 7.1 ¿is this too?

What methods are executed when sync now?

If I put a breakpoint in each Data Object getlist should stop the breakpoint?

Best regards.

Maria Elena

Former Member
0 Kudos

Hi Maria Elena,

In NW mobile 7.1 , data to be downloaded to device is already calculated and its kind of pushed till the device outbound queue(via extract).

During sync, only pull that happens is from the device outbound queue for all standard data objects unlike in MI where it is even pulled from backend.

Call to getDetail during sync depends on the task of message that is send to DOE from client inturn to backend during that sync cycle.

Depending on the message task 'I','D' or 'U' (insert,delete,update) ,corresponding Create,Delete,Modify bapi wrappers are called.

During Modify and Create operation , GetDetail is called to get the latest data from backend.

For delete there is no call to backend for GetDetail.

Create,Modify,Delete bapi wrappers are invoked per header key.

Ideally during sync there is no getList call for standard data objects.

But for Two-way dataobjects,I think this is not the case.

Regards,

Liji

Former Member
0 Kudos

Hi,

My question is for the case of two way dataObject. How do I launch the getList and Getdetail when I synchronize?

Best regards.

Maria Elena

Former Member
0 Kudos

Hi,

What's the difference between a rule and a Bulkrule?

Best regards

Maria Elena

Former Member
0 Kudos

Hi,

Rule means normal rule and normal rules are defined with some criteria fields(rule fields) that are mapped against constant value / device attributes /subgen value etc..

In short , if there is a normal rule defined on a data object , the instances of dataobject flows down to devices only when the dataobject fields participating in that rule matches the distribution pattern defined in the rule.

For eg, depending on the equipment type of a service order , this data needs to be distributed to a device(device user having expertise in servicing that equipment). Here equipment field in service order DO becomes the rule field.

Bulk rule doesnt expect any rule fields or criteria fields to be defined.

Only the device mapping / device binding could be defined to decide which devices can subscribe to this rule or get data because of this rule.

Device binding ALL will send all instances of this data object to all devices.

If the distribution pattern does not depend on the data object field values, then bulk rule could be used.

For eg, sending the master data to all devices .

Regards,

Liji

Former Member
0 Kudos

Hi,

Another thing that happens is that I am making a migration of the MI 2.5 application to the DOE a smart sync and there is a query that I failed.

Obteniendo la siguiente exception:

java.lang.IllegalArgumentException: Trying to compare wrong type to attribute com.sap.tc.mobile.cfs.compat.FieldDescriptorImpl@c0682

at com.sap.tc.mobile.cfs.compat.QueryParameterImpl.checkValue()

at com.sap.tc.mobile.cfs.compat.QueryParameterImpl.adviseCondition()

at com.sap.tc.mobile.cfs.compat.QueryParameterConditionImpl.<init>()

at com.sap.tc.mobile.cfs.compat.QueryFactoryImpl.createCondition()

at com.sap.tc.mobile.cfs.compat.SmartSyncJQueryFactoryImpl.createCondition()

at com.iberdrola.generacion.movilidad.rondas.gestores.GestorLectura.obtenerListaLecturas()

at com.iberdrola.generacion.movilidad.rondas.gestores.GestorParte.obtenerListaPartes()

at com.iberdrola.generacion.movilidad.rondas.controladoras.DetalleParte.onLoad()

at com.sap.mbs.core.control.AbstractViewController.process()

at com.sap.mbs.core.control.DefaultStateMachine.process()

at com.sap.mbs.core.control.DefaultStateMachine.process()

at com.sap.mbs.core.web.FrontServlet.doHandleEvent()

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe()

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet()

at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service()

at javax.servlet.http.HttpServlet.service()

at org.apache.tomcat.core.ServletWrapper.doService()

at org.apache.tomcat.core.Handler.service()

at org.apache.tomcat.core.ServletWrapper.service()

at org.apache.tomcat.core.ContextManager.internalService()

at org.apache.tomcat.core.ContextManager.service()

at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection()

at org.apache.tomcat.service.TcpWorkerThread.runIt()

at org.apache.tomcat.util.ThreadPool$ControlRunnable.run()

at java.lang.Thread.run()

The code of the query is:

stringParam = jQueryFactory.createParameter(parte);

try{

condicion = jQueryFactory.createCondition(idParteAttr, RelationalOperatorType.EQUALS, stringParam);}catch(Throwable e)

{

e.printStackTrace();

e.toString();

e.getCause();

};

sortOrder=jQueryFactory.createSortOrder(secuenciaAttr,true);

query = jQueryFactory.createQuery(atributos, condicion,sortOrder);

resultado = dataFacade.executeQuery(query);

Any idea?

Best regards.

Former Member
0 Kudos

Hi,

Go through the following link

http://help.sap.com/saphelp_nwmobile71/helpdata/en/6d/bf104d163849d1af313c492655e0f7/content.htm

You can go to workbench. i.e sdoe_wb. Select your SCV. Expand your data object tree. Expand flow definition tree. Choose the flow in which you want to add you custom service. Press create or add button in right panel. Give FM or class method. Save it and generate your data object.

Look at the sample custom service SDOE_SAMPLE_CUSTOMSERVICE (Class) shipped by SAP .

Regards,

Dhana

Edited by: Dhanasekhar Karuppanan on May 19, 2009 4:58 AM

Edited by: Dhanasekhar Karuppanan on May 19, 2009 7:12 AM

Former Member
0 Kudos

Hi,

What is the service that runs on the data load from the back-end SDOE?

I want is that only the initial download to the mobile device specific data. This selection will depend on the data I have in a table. In the DOE are all records, but at the time of initial load on a device I have to make a selection according to the user device and a data table.

(Select * from table where user = user device).

In this way the DOE all data would be loaded on each device and be charged only the data selected by user.

Best regards.

Maria Elena