on 09-29-2015 3:41 PM
Dear Experts,
We have 2 tabs on portal screen and these tabs are created by EP consultant (by creating iView and assigning ROLES). Now We are displaying BSP application in first tab and Webdynpro(WD) Application in second tab. These 2 applications are linked to respective iviews.
Now my requirement is:
I have tried following options.
I tried navigation->next_page. When I use this method, it is displaying WD application in first tab but I need to display WD application in second tab.
I have updated second tab URL (iview folder URL) in parent location href by writing following code in JavaScript.
parent.location.href = "https:<HOST>/irj/portal?NavigationTarget=ROLES://portal_content/iv_ZQ_INVOICE_STAT";
After writing this code it is switching to next tab and displaying WD application in second tab as expected. But now I am not able to pass parameters from BSP to WD.
I tried following options to pass parameters from BSP to WD:
When user click on link, executing OnInputProcessing event and updating parameters in shared memory.
And in JavaScript updating parent.location.href to switch to next tab. But it is not working. ABAP code in OnInputProcessing is triggering but tab not switching to second tab.
I tried to pass parameters as application parameter by concatenating parameter names and values to URL. But URL is not opening any application as I am not calling WD application URL directly here.
So please let me know the solution for this issue. Is there any easy way to switch EP tabs by writing code in BSP?
Or is there any easy way to pass parameters from BSP to WD application.
FYI, BSP screen was designed by writing HTML and JavaScript code.
Thanks & Regards,
Sasidhar V.
Hi Sasidhar,
There are many ways you can use to send data from BSP application to WD application:
But this depends on the amount of data that you want to send over to WD application.
- pass data as URL parameters (url?param1=value1¶m2=value2) and handle these parameters in the default inbound plug of your WD application
- store the data in server side cookies
- store the data in the database
- use shared objects
The simplest way could be to send data using Querystring the first option suggested above.
If want to pass any other parameter using Query String you can define receiver parameter in window's handeldefault method.
This is how you can get values from those Query String parameters.
Thanks-
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
Thanks a lot for your help.
I am aware about those methods to pass data from one application to another.
Actually the issue was
1. I can't pass application parameters through URL because i am not calling application (BSP page or WD application) directly.
2. I need to call URL from Javascript only because I must change parent URL to switch to next tab on protal. But before calling URL, ABAP code in OnInputProcessing should execute to pass parameters to shared memory. So process should happen something as below.
When user click on link in first tab then following function will trigger
function Redirect(Stat)
{ if (Stat == "1") {
document.getElementById("status").value = 1;
}
else if (Stat == "2") {
document.getElementById("status").value = 2;
}
<%
*" Here I am trying to pass parameters to shared memory
DATA: lv_inv_stat TYPE string.
status = request->get_form_field( 'status' ).
gs_app_params-inv_stat = status.
EXPORT gs_app_params = gs_app_params
TO DATABASE INDX(ZT)
CLIENT sy-mandt
ID sy-uname.
%>
// Here I am changing parent URL to switch to next tab
parent.location.href = URLLink;
So here issue is ABAP code is executing at server side and Javascript code is executing at client side, so we can't update parameters in between Javascript code.
I have fixed this issue by creating new BSP page and changing parent.location.href in new BSP page layout.
Now issue resolved. thanks for your time on this issue.
Hi Sasidhar,
For your requirement 1:
I would recommend using EPCM object for navigation like:
window.parent.EPCM.doNavigate(ROLES://portal_content/iv_ZQ_INVOICE_STAT');
Now in your case EPCM object may be at window.parent.parent.EPCM, so you will have check that out.
For Requirement 2:
Let me give you an example: say your requirement is you have to pass A=66 and B=77, you encode this params first:
A=66&B=77 (Encoded: A%3D66%26B%3D77)
Now pass this as:
?DynamicParameter=A%3D66%26B%3D77
so your link becomes:
window.parent.EPCM.doNavigate(ROLES://portal_content/iv_ZQ_INVOICE_STAT?DynamicParameter=A%3D66%26B%3D77');
Then you will get these params A and B in WD application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.