cancel
Showing results for 
Search instead for 
Did you mean: 

mobile application do not get data from backend

Former Member
0 Kudos

Dear all,

i have created a simple mobile application to list the sales orders from the back-end

i have created new SWCV in DOE ... and imported the BAPI-Wrapper as data objct

the BAPI-Wrapper to get the list from VBAK table in Back-end

and the distribution model is BULK and i have activated it.

in the service component in NWDS .. a query has been created to display the order header from Data object as query output

when deploying the application and run the simulator .. and make the synchronization and lunch the application ...

The table appear to be empty ... no data come from the back-end

could any one help me ??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

check the following things:

1.Getlist and getdetails are returning the data .

2.SDOE_LOAD is done for the SWCV.

3.Bulk rule is activated form the admin portal

4.there is no queue blocked in smq2 related to load or rule activation

5.device is enabled.

6.verify that corrosponding DMSWCV is assigned to the device and is operational

7. check the pending extract if there is some data in pending state to be extracted

Former Member
0 Kudos

i have made the initial download in SDOE_Load and deactivated and activated the distribution rule but

the CDS has no entry in view metadata of the SWCV

and View outbound queue details also has no data

i have checked the table in back-end and it contains data

Former Member
0 Kudos

Hi Ahmed,

It seems that there is some problem either in the RFC you have used or in the BAPI Wrappers written for the backend adapter.

It would be easy to solve the problem , if you could please go to transactiion se37 and type in the bapi wrapper name that you have used for getList and getDetail.

I mean , please go to each Bapiwrapper and execute it from there and check:

=> whether getlist is returning the keys that are there in your backend table?

=> Whether getDetail is returning the records that are there in backend for the given keys?

Also check please for the RFC Connection.

Go to SM59, and type in your RFC name in the search box and press enter.

After you get the your RFC opened, Click on the button "Remote logon".

Please update us whether the above two things are fine or not??

Thanks & Regards

Shweta Soni

Former Member
0 Kudos

in SE37 .. my Bapi_Wrapper (getlist and getdetail) returns zero entries

Tables Value

ORDER_HEADER 0 Entries

RETURN 0 Entries

note : I have created my Bapi_Wrapper using wizard

Former Member
0 Kudos

Hi,

Bapi Wrapper wizard will only create the BAPI's with proper signature. You have to write logic to get the data in the generated Bapi wrapper function module.

Look into the sample bapi wrapper's in SDOE_SAMPLE_BAPIWRAPPERS function group for more help.

Regards,

Dhana

Edited by: Dhanasekhar Karuppanan on Dec 22, 2009 1:52 PM

Former Member
0 Kudos

my back-end is the IDES server

is there any BAPI that already made in IDES that i can use to get the list of sales orders ??

Former Member
0 Kudos

Or .. How to create a BAPI for the sales orders

is there any guides for BAPI creation ??

Former Member
0 Kudos

Hi,

For the guidelines in writing the BAPI Wrapper you can refer the following link.

[https://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/bapi_wrapper_types.html]

To check for the existence of the standard BAPIs you should ask it in corresponding backend system forum.

Regards,

Dhana

Former Member
0 Kudos

Hi Ahmed,

i am giving here a sample code for getList and Getdetail.please refer and ask for any clarification:

GetList:

FUNCTION ZORDER_GETLIST.

*"----


""Local Interface:

*" TABLES

*" ORDER_HEADER STRUCTURE Z_ORD_HDR

*" RETURN STRUCTURE BAPIRET2

*"----


DATA: LPAR1 LIKE SY-MSGV1,

LPAR2 LIKE SY-MSGV2,

LPAR3 LIKE SY-MSGV3,

LPAR4 LIKE SY-MSGV4 ,

LCL LIKE SY-MSGID,

LTYPE LIKE BAPIRETURN-TYPE,

LNUMBER LIKE SY-MSGNO,

bapireturn type BAPIRET2.

CALL FUNCTION 'BALW_BAPIRETURN_GET2'

EXPORTING

TYPE = LTYPE

CL = LCL

NUMBER = LNUMBER

PAR1 = LPAR1

PAR2 = LPAR2

PAR3 = LPAR3

PAR4 = LPAR4

" LOG_NO =

" LOG_MSG_NO =

" PARAMETER =

" ROW = 0

" FIELD =

IMPORTING

RETURN = BAPIRETURN.

SELECT * FROM Z_ORD_HDR INto TABLE order_header .

ENDFUNCTION.

GetDetail:

FUNCTION ZORDER_GETDETAILS.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(ORDER_CODE) TYPE Z_ORD_HDR-ORDER_CODE OPTIONAL

*" EXPORTING

*" VALUE(ORDER_HEADER) TYPE Z_ORD_HDR

*" TABLES

*" ORDER_ITEMS STRUCTURE Z_ORD_ITEMS

*" RETURN STRUCTURE BAPIRET2

*"----


DATA: LPAR1 LIKE SY-MSGV1,

LPAR2 LIKE SY-MSGV2,

LPAR3 LIKE SY-MSGV3,

LPAR4 LIKE SY-MSGV4 ,

LCL LIKE SY-MSGID,

LTYPE LIKE BAPIRETURN-TYPE,

LNUMBER LIKE SY-MSGNO,

bapireturn type BAPIRET2.

CALL FUNCTION 'BALW_BAPIRETURN_GET2'

EXPORTING

TYPE = LTYPE

CL = LCL

NUMBER = LNUMBER

PAR1 = LPAR1

PAR2 = LPAR2

PAR3 = LPAR3

PAR4 = LPAR4

" LOG_NO =

" LOG_MSG_NO =

" PARAMETER =

" ROW = 0

" FIELD =

IMPORTING

RETURN = BAPIRETURN.

append bapireturn to return.

SELECT SINGLE * FROM Z_ORD_HDR INTO order_header WHERE order_code = order_code .

SELECT * FROM Z_ORD_ITEMS INTO CORRESPONDING FIELDS OF TABLE order_items WHERE order_code = order_code .

ENDFUNCTION.

Thanks & Regards

Shweta

Former Member
0 Kudos

A little note here: You may not be able to use existing BAPIs directly. Because they may not adhere to the DOE's BAPI Wrapper syntax. (Notice the difference, BAPI is not the same as BAPI Wrapper)

If you are using an existing backend with standard, shipped BAPIs, typically, you should be able to 'wrap' the standard BAPIs in BAPI Wrappers.

What this means?:

Get hold of the standard GETLIST BAPI for your backend, and call it from your GETLIST BAPI Wrapper (which you have created using the Wizard), and transfer the data to the exporting parameters of your BAPI Wrapper. Do the same for all the BAPIs. Otherwise, if you know the tables which contain the backend data, you can simply do SELECTs (just like Shweta has shown).

Former Member
0 Kudos

now i have update the Bapi function module in SE37 and the CDS in DOE has entries (Thanks Shweta Soni)

and the SWCV assigned to the device is operational and the DO_SYNC_EXTRACT' = X in configuration page

and i have do the syncronization but the client did not get the entries

and the Device Outbound Queue is empty

what is wrong ??

sivasatyaprasad_yerra
Active Contributor
0 Kudos

What is the device binding option selected for Bulk rule.

If it is NONE, you will not get the data. If this is the case, deactivate the bulk rule and edit the rule definition...as device binding as ALL. Then activate the DM and activate the rule from portal.

Regards,

Siva.

Former Member
0 Kudos

Check device subscriptions. What does it show? If there are no subscriptions for your device, then no data will be sent to it. You have to subscribe the device to some data (and then make sure that data reaches DOE).

This means you do one of these:

1. If you have a bulk rule, either change device binding to ALL and reactivate the DM (as Siva mentions) or manually assign your bulk rule to the device (right hand side of Device Administration)

2. If you have any other kind of rule, make sure that the device is subscribing to some data (you can find this out from 'View Subscription Details' which is linked on the same page from which you have been opening the device outbound queue). Then make sure that data of this kind is available in the CDS.

Former Member
0 Kudos

i have done what you have said .... now when doing synchronization the client take some time to download the data ... the message processing is 6691 ... this is already the No. of entries in CDS

but no data appears on the application !!!!

sivasatyaprasad_yerra
Active Contributor
0 Kudos

I think this application was created for old version of the object. I think you have modified the data object after developing the application. If this is the case, you have to build the application agian.

Former Member
0 Kudos

Also: Cut down the number of instances being sent to the device. (By using an intelligent rule instead of a bulk rule). 6000 inserts in one sync does not sound like a good way to start off your first application

Former Member
0 Kudos

i have rebuild the project and limit the no. of entries to 1 .... CDS entries now = 1

but no data appears on the application !!

Former Member
0 Kudos

what is the ContainerSyncEventListener ???

i have these lines in console

update in ContainerSyncEventListener. Type: 3 Error: false

update in ContainerSyncEventListener. Type: 1 Error: false

messageReceived in ContainerSyncEventListener: Waiting for response from server Level: 1

type: 1 s: Sync. Finished

type: 1 s: Sync. Finished

messageReceived in ContainerSyncEventListener: Receiving data from server Level: 1

messageReceived in ContainerSyncEventListener: Disconnected from the server Level: 1

update in ContainerSyncEventListener. Type: 2 Error: false

Former Member
0 Kudos

Did you re-build the application against the newest version of the DO?

What Siva meant is that you need to perform model import again. And then re-build the application. Unless you reimport the model from DOE into your IDE, the latest version of each Data Object will not be used in the client.

Former Member
0 Kudos

i have create a new project from scratch and no data apears

but i have notice that when doing synchronization i got this status :

Synch Successful

Synch Status : Synch.finished

Error : Error occurred during deployment. contact your administrator

Message: post-synchronization processing is complete

Former Member
0 Kudos

Hi Ahmed ,

just to know, which perspective are you using for building the application?? and which client are you using:Laptop client or PDA client etc?

Also to ensure have you checked again the outbound queue and the operational DMSWCV??

Thanks and Regards

Shweta Soni

Edited by: Shweta Soni on Dec 24, 2009 5:29 AM

Former Member
0 Kudos

i am using PDA ... now the deployment problem is solved and the outbound queue has a lot of data ... but no data appears on the client after synch.

Former Member
0 Kudos

Hi Ahmed,

Can you please clarify whether the application link is appearing on your client or not??

If yes and everything is fine in DOE and you see data in outbound queue and then sync is now not showing data ,please check if its present in the local DB (application tables)

If no , then please go and check for any exceptions in the log files present in the folder 'log' in the sap client installation folder.

Thanks & Regards

Shweta Soni

Former Member
0 Kudos

the application is appearing and the data in queue

how can i check if its present in the local DB (application tables) ??

Former Member
0 Kudos

Hi,

If you are using MaxDB as your local database, you must be having SQL Studio installed. Open that and on the toolbalr there should be a button with an image of a key, click it, and then enter the DBA password that you entered while installing the client.

There you can see a list 0f tables under the node "DBA" in which there would also be tables for your data objects.

see the contents of that table, whether there is any entry or not.

Thanks & Regards

Shweta Soni

Former Member
0 Kudos

i have create a new project from scratch .... and new SWCV

now CDS entries is 158

there are a data in queue

the application is lunched ... and the synchronization is done

but i have this error when synchronizing again to get the data from queue

An error has occurred. See error log for more details.

Could not get ModelType com.sap.ide.webdynpro.modeltypes.OCA for model demo_appcompmodelpackage.Demo_appCompModel(hint: check whether content archive is in classpath)

could u help me ?

Former Member
0 Kudos

i have restart the NWDS and this error has been solved

but now no errors occurs and no data appears on client

when deactivate and activate again the distribution rule in in portal .... the outbound queue contains a lot of messages

and when doing the synchronizing i got that .. synch status faild " processing of some messages unsuccessful"

and the MMW_Q_000000000000000046 queue be empty of messages again

what can i do ??

Former Member
0 Kudos

sorry ... after synchronization and the previous error ,,, the MMW_Q_000000000000000046 queue doesn't be empty ...

it contains 3 messages from Data Object : CLIENT_FEEDBACK

these messages content is :

<?xml version="1.0" encoding="utf-8" ?>

- <Msg type="C" id="2749">

<FEEDBACK_NODE C0="9884FCD9A1174BD600000125C0ADBB69" ty="I" />

</Msg>

what does it mean ???

Former Member
0 Kudos

and this is the device status

Device has no conflicting DM SWCVs

No Data Object instances are available to be extracted to the device

Last sync for the device was done on 24.12.2009 at 13:34:23

Answers (3)

Answers (3)

Former Member
0 Kudos

it is solved now

thank you all ... i have learned a lot from you

refer to the thread

Former Member
0 Kudos

Hi

We would be able to understand your exact proble , if you could please tell us the status of you device outbound queue which you can find as belo:

=>Go to Administration tab of the NWMA.

=>Type in you device name in the corresponding box appearing on the screen .

=> press enter

=> Select your device and click on the tab "Device Status" .

=> There click on the link "View outbound queue details"

Please update us whether you can see any of you data objects there??

Thanks & Regards

Shweta

Former Member
0 Kudos

Have you done an initial load of data?

The thing is: Data does not automatically flow to devices. It must first be persisted in the DOE.

1. Typically if you already have data in the Backend, you should do an initial load of this data (Transaction SDOE_LOAD).

2. Once you have done this, you must check if the data has actually been persisted in the CDS (Transaction SDOE_WB, right click on the SWCV in the left hand tree and select 'View Metadata'. See if the CDS tables have entries for the DOs you are interested in).

3. Go the NetWeaver Mobile Administrator and deactivate and reactivate the rules.

4. NOW you can sync to get data.

Another thing: Your device should be 'Enabled' and the correct DMSWCV should be assigned to it, and be in operational state. Only when the DMSWCV is operational, will the data be sent to device outbound queue. Also, you might want to enable 'DO_SYNC_EXTRACT' for the Data Object in NWMA under the 'Configurations' page. This will make sure that changes are automatically extracted to device outbound queue instead of remaining in pending extracts.

Edited by: Arjun Shankar on Dec 22, 2009 10:52 AM