on 04-17-2014 6:16 AM
Hello Experts,
I am developing a HWC app with Offline capabilities in SUP 2.2 SP04.The app is working with offline but the Create operation is not working.I have given the properties of the Create operation as below:-
Type:-Online Request
Invoke Operation:-createopr
Store data in ondevice Cache:-Timeout: Never Expires,
Cache Lookup Policy:Get Results from on device cache first.
Can anyone help me how tomcustomize the Create operation with Offline?
Thanks
Manoj
1. Create a menuitem with custom as type.
2. Create 2 custom actions submit (for offline) and online request (for online) as type.
When device is online use online request method and when the device is offline use method created for submit type.
Keep an external breakpoint in RFC (with same user as used in mobile) to check when the RFC used for operation is triggered in the case of offline.
Sample code can be taken from this discussion,
Midhun VP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Midhun,
Thanks for reply.
I created the Menu Item with Custom type and Custom Actions submit (for offline) and online request (for online) as type.
I used Online request when the device is Online and it is working fine for the first time when the app is running.When I am running the app for the secondtime the Create RFC is not being called(I am using the option Store data in on-device cache).
Now for the Offline with Type as (Submit Hybrid App) and Invoke Operation as the Create operation The RFC is not being called and it is not working.
I went through the above URI(,Update operation when offline - HWC app, SAP MBO) and I am doing the same with create operation.
Please let me know if you require more information from me.
Thanks
Manoj
Midhun,
I have selected the operation Create in the Submit Hybrid App and I checked with return type as true also but still Create RFC is not calling.
Jitendra,
In the Submit Custom Action I have used Submit Hybrid App as type and the code in Custom.js is as below:-
if (screen === "Object1create" && menuItem === "Create") {
var isDeviceOffline = false;
var connectionType = "";
try {
connectionType = navigator.network.connection.type;//PhoneGap 1.4.1
}
catch (e) {
connectionType = navigator.connection.type;//PhoneGap 2.0
}
if (connectionType === Connection.NONE || (connectionType === Connection.UNKNOWN)) {
isDeviceOffline = true;
}
if (!isDeviceOffline) {
menuItemCallbackObject1createOnline_Submit();
}
else {
doSaveAction(false);
doSaveAction(false);
menuItemCallbackObject1createOffline_Submit();
}
}
};
Thanks
Manoj
I am able to send the the data for Create Operation now for both online and offline but not able to send the Description value from the screen to SAP for Offline mode.Please find the screens below for the Create screen and properties in workflow below:-
The Submit properties as below.
The description box properties.
The offline_Submit properties:-
The parameter mapping for offline submit:-
Thanks
Manoj
"Online Request" type only works when device is online.
Use the Submit operation if you wish for the action to be automatically queued and sent to the server when the device has network connectivity.
Thanks,
Andrew.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would appear your parameter mappings are not done correctly for the Submit operation. You can see what the client sends up to the server by enabling tracing on the WorkflowClient module on the server.
Please see "Server Side Debugging":
Debugging Hybrid Web Container Development
Thanks,
Andrew.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.