on 01-02-2013 7:15 PM
Hello everyone, hope everything's all right.
I'm developing an offline app and I'm having troubles. Can someone help please?
I'd like to know how to storage the return of my RFC. I called it and now I have to storage it to manipulate.
My app is using SUP 2.1.3 and it's all HWC.
Thanks in advance!
Regards,
Luis
Hi,
If you want to store the data for further usage you can think of creating an sqlite table and then load the data returned from the RFC into the table and then try to show the data/modify it querying the sqlite table.
Refer to the following link to get idea of sqlite using javascript
http://cookbooks.adobe.com/post_Store_data_in_the_HTML5_SQLite_database-19115.html
Hope this helps,
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
So what i understand is that you pass some table or parameter to the RFC and it takes that thing and processes and returns some list.
For this you can create a personalization key on the attribute which is to be passed as an input and then programmatically set the value of personalization key and then synchronize.
It will hit the BAPI and then bapi will process it to the logic which is written and send an output.
You can read the output in the same from as suggested earlier.
For eg.
There is a function module which takes username as input and gives details as list or more probably as a table as output.
Your MBO will have username as input and output as a table.
Say the attribute is username. Create a personalization key for the attribute clicking on the MBO and then from Attributes--> Load parameters and assign the personalization key to the attribute.
then in the code you can have something like
PersonalizationParameters pp=....................DB.getPersonalizationParameters(),
pp.setUsername(your parameter to be passed)
pp.save()
..........DB.synchronize(),
Hope this helps,
Thanks,
Hi,
I followed this doc to create my Personalization Keys:
But he just create the pp and then set in > MBO > Synchronization > Add and select the combo box titled 'Personalization Key'. Should I do anything more?
And about this code:
PersonalizationParameters pp=....................DB.getPersonalizationParameters(),
pp.setUsername(your parameter to be passed)
pp.save()
..........DB.synchronize(),
I am developing only HWC, I believe it's only for specific platforms, isn't it?
Thanks!
Hi Luis,
When you make an online request in your app it will surely return a list.
Now what you have to do is :
1. In your custom.js, You have to write a JS code to get the MBO output list.
if(destScreenKey === 'ScreenName')//Custom Appl MBO key name
{
var message = getCurrentMessageValueCollection();
var itemList = message.getData("MBO Name");
var items = itemList.getValue();
//alert("Working");
var numOfItems = items.length;
var i = 0;
while ( i < numOfItems )
{
var currItem= items[i];
var var1 = currItem.getData("MBOName_ATTRIBUTNAME_attribKey").getValue();
}
}
If you see the while loop,It reads one record at a time from your MBO List.
2. Now you can follow the link given by Rakshit and store this values in sqlite table.
Regards,
Abhishek Wajge
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.