Skip to Content
Introduction:

I have seen many posts in EP forum regarding the communication of data between different pages. Main problem we face would have been with JavaScript (where “object is undefined” occurs more often) and refreshing the other window from one window. So I have decided to write a blog on how to do this. Here it is. The purpose of this blog is to explain the use of client data bag for passing data from popup/child window to main/parent window. I hope this blog will solve some of the basic doubts which are quite frequent in SDN forums and will be very useful for beginners.

Where to start?

To do this, knowledge on client data bag and JavaScript is required. To learn about these, check
[JavaScript API | http://help.sap.com/saphelp_nw2004s/helpdata/en/43/067941a51a1a09e10000000a155106/content.htm]

Client Data Bag API

Implementation:

Create two JSPDynPage components in same project or different project(One for main window and other for popup window).

Check this out!!

Parent window has an input field for name and a button called ‘Fetch’.

image

When ‘Fetch’ button is clicked, a popup window opens.

image

Enter some data in the inputfield of the popup window and click ‘Confirm’ button.

image

U get an alert showing the data stored in the client data bag.

image

Now when alert is closed, u can see the data in the parent window from the client data bag.

image

That is it.. We got the data from the client bag in the parent window and also refreshed it automatically!!

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply