on 12-22-2009 9:48 AM
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 ??
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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).
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 ??
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.
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
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.
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
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
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
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
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 ?
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 ??
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 ???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.