cancel
Showing results for 
Search instead for 
Did you mean: 

Bookmark issue in SAP Design Studio 1.6

former_member334960
Participant
0 Kudos

Hi All,

I have a requirement to create bookmarks in my application. The user can change the filters, drag and drop objects , change the view to table/graph etc. they would like to save this as a bookmark for future access.

I have used the below to achieve this:

Save:

var name1=INPUTFIELD_1.getValue();
Bookmark.saveBookmark(name1);
var bookmarks=Bookmark.getAllBookmarks();
bookmarks.forEach(function(element, index) 
{LISTBOX_1_BOOKMARK.addItem(element.name, element.text);
});
INPUTFIELD_1.setValue("");

Load:

Bookmark.loadBookmark(LISTBOX_1_BOOKMARK.getSelectedValue());
var array = Bookmark.getAllBookmarks();
array.forEach(function(element,index)
{LISTBOX_1_BOOKMARK.addItem(element.name, element.text);
});
DIALOG_2_BOOKMARK.close();

Share:

Bookmark.shareBookmark(Bookmark.getBookmarkUrl(LISTBOX_1_BOOKMARK.getSelectedValue()));
DIALOG_2_BOOKMARK.close();

On Start-Up:

var bookmarks=Bookmark.getAllBookmarks();
bookmarks.forEach(function(element, index) 
{
LISTBOX_1_BOOKMARK.addItem(element.name, element.text);
});
INPUTFIELD_1.setValue("");

Issue :

I am able to successfully save the bookmarks but after I close and reopen the report, all the saved bookmarks are gone. I know this is the expected behaviour of Standard bookmarks.

I came across blogs to use fragment bookmarks, but I am unable to achieve this.I have been getting syntax errors when I replaced the standard with Fragment.

I am new to this concept, can someone please help me with the code to save the application and to retain the bookmarks when ever the user opens the report.

Thanks

Poojitha

former_member334960
Participant
0 Kudos

Note : The bookmarks should be user-specific and not accessible by any other users.

former_member334960
Participant
0 Kudos

Following is the code I used and everything seems to work fine except SHARE:

Issue: When I click on SHARE, report title is not shown and navigation window which is supposed on be shown on button click is shown by default.

This is my report : capture1.png

This is the preview of the report when clicked on SHARE: capture1.png

Can someone please help resolve this.

Save:

if(INPUTFIELD_1.getValue()==""||INPUTFIELD_1.getValue()==" "){
	DIALOG_1_ALERT.open();}else{
Bookmark.FragmentBookmark.saveBookmark(PANEL_4_BODY,INPUTFIELD_1.getValue());
var bookmarks=Bookmark.FragmentBookmark.getAllBookmarkInfos();
bookmarks.forEach(function(element,index){LISTBOX_1_BOOKMARK.addItem(element.id, element.title);});
INPUTFIELD_1.setValue("");}

Load:

Bookmark.FragmentBookmark.loadBookmark(LISTBOX_1_BOOKMARK.getSelectedValue());
var array = Bookmark.getAllBookmarks();
array.forEach(function(element,index){LISTBOX_1_BOOKMARK.addItem(element.name, element.text);});
DIALOG_2_BOOKMARK.close();

Share:

var sel_bookmark = LISTBOX_1_BOOKMARK.getSelectedValue();
var url = Bookmark.FragmentBookmark.getBookmarkUrl(sel_bookmark);
Bookmark.FragmentBookmark.shareBookmark(url);
DIALOG_2_BOOKMARK.close();

On Start up:

var bookmarks=Bookmark.FragmentBookmark.getAllBookmarkInfos();
bookmarks.forEach(function(element,index){
LISTBOX_1_BOOKMARK.addItem(element.id, element.title);});
INPUTFIELD_1.setValue("");

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member334960
Participant
0 Kudos

Following is the code I used and everything seems to work fine except SHARE:

Issue: When I click on SHARE, report title is not shown and navigation window which is supposed on be shown on button click is shown by default.

This is my report : capture1.png

This is the preview of the report when clicked on SHARE: capture1.png

Can someone please help resolve this.

Save:

if(INPUTFIELD_1.getValue()==""||INPUTFIELD_1.getValue()==" ")
{
	DIALOG_1_ALERT.open();
}
else
{
Bookmark.FragmentBookmark.saveBookmark(PANEL_4_BODY,INPUTFIELD_1.getValue());
var bookmarks=Bookmark.FragmentBookmark.getAllBookmarkInfos();
bookmarks.forEach(function(element, index) 
{LISTBOX_1_BOOKMARK.addItem(element.id, element.title);
});
INPUTFIELD_1.setValue("");
}

Load:

Bookmark.FragmentBookmark.loadBookmark(LISTBOX_1_BOOKMARK.getSelectedValue());
var array = Bookmark.getAllBookmarks();
array.forEach(function(element,index)
{LISTBOX_1_BOOKMARK.addItem(element.name, element.text);
});
DIALOG_2_BOOKMARK.close();

Share:

var sel_bookmark = LISTBOX_1_BOOKMARK.getSelectedValue();
var url = Bookmark.FragmentBookmark.getBookmarkUrl(sel_bookmark);
Bookmark.FragmentBookmark.shareBookmark(url);
DIALOG_2_BOOKMARK.close();

On Start up:

var bookmarks=Bookmark.FragmentBookmark.getAllBookmarkInfos();
bookmarks.forEach(function(element, index) 
{
LISTBOX_1_BOOKMARK.addItem(element.id, element.title);
});
INPUTFIELD_1.setValue("");
former_member334960
Participant
0 Kudos

I was able to fix the code with fragment bookmark.

Now I am having issues only with Share bookmark. When I share the bookmark, title is not being loaded and also,few components which needs to be hidden are shown in the report i.e, it is not in hidden mode.

Can someone help on this.

Note: Sharing bookmarks with standard bookmarks works fine

TammyPowlas
Active Contributor
0 Kudos

Hi Poojitha - SAP Note https://launchpad.support.sap.com/#/notes/2622437 says "The support of SBOP Design Studio 1.6 is planned to end in December 2018." This month support ends.

The solution is "Please upgrade your SBOP Design Studio 1.x to SAP Lumira 2.x"

Is there any chance of your upgrading, and then taking the free SAP Course on Lumira at https://open.sap.com/courses/lum1 where it goes into the new concept of bookmarks?

former_member334960
Participant
0 Kudos

Hi Tammy,

Thanks for this, but we would still be using Design Studio 1.6 for a while and would like to fix this issue with the fragment/portable fragment bookmark.