cancel
Showing results for 
Search instead for 
Did you mean: 

offline mode in widgets

Former Member
0 Kudos

Hi,

Is it possible to run widgets in an offline mode ...?

Thanks in advance,

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

If you are running your Widgets offline, you cannot display the data, unless you provide some caching, I dont think it will work..

Regards,

Shilpa B.V

Former Member
0 Kudos

Hi Shilpa,

Thanks for the quick response.

Could u please tell me how can i use caching in widgets..?

I have got a requirement where i have to fetch data from cache if user is working in offline mode.

Please tell me how can i implement this..?

Thanks in advance,

John

Former Member
0 Kudos

Hi John,

Do you mean to say that:

"You have created a Widget in SAP widget Foundation which displays data from R/3, and when your backend is down, you still want the data to be dispalyed"

If yes,

First thing : I can suggest you that it might not be a very feasible idea, because Widgets are usually used to display dynamic data and if you want to cache the data, it will be static.

Second : But if you have a requirement to do so, one way to do would be...

STEP 1: Create one more view "cache_View" in the same project and insert a table into it, but do not map any data, we will fill it later.

STEP 2 : Switch to Controller tab...

to be contd...

Former Member
0 Kudos

// getting data from the SAP system

Model.call_BAPI_CURRENCY_GETLIST ( importParams,

function(data){

exportParams["BAPI_CURRENCY_GETLIST"] = data;

View.showMain_View({"IMPORT" : importParams, "EXPORT" : exportParams});

// STEP 3 : Now you would have got the data from the backend, //Go to View tab, keep a copy of the data on your desktop.

},

to be contd...

Former Member
0 Kudos

// On failed call_BAPI_CURRENCY_GETLIST

function(errorMessage){

{color:green}

// STEP 4 : (This is in the controller tab) Fill the table in the "cache_View" with the data

//stored on the desktop.

to be contd...

Former Member
0 Kudos

//Step 5 : Call "cache_View" (Now no need to present the alert message)

Former Member
0 Kudos

Seems complex, Just an idea...Hope it helps.

Regards,

Shilpa B.V

PS:Was not able to post a single message, So I had to Split it.. Dont mind.

Former Member
0 Kudos

Hi Shilpa,

Thanks for the helpful replay.

Could you please elaborate Step3.

Do you have any coding on this.. which will be more helpful.

John

Answers (0)