cancel
Showing results for 
Search instead for 
Did you mean: 

BSP application navigation to next portal tab

Former Member
0 Kudos

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:

  1. There are so many links on BSP application. So when user click on respective link in BSP application then it should navigate to second tab to display WD application.
  2. Based on link clicked by user, I need to pass parameters from BSP to WD application.

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.

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor
0 Kudos

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&param2=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

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

vaibhav_singh12
Participant
0 Kudos

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.