cancel
Showing results for 
Search instead for 
Did you mean: 

NWBC - New Tab instead of window

Former Member
0 Kudos

Hi Experts,

I am using NWBC4.0 Desktop client and I am facing issues with the code written to launch a new session using RFC Enabled function module (Call Transaction in FM code) with Start New Task. With SAP GUI its fine, but in NWBC Desktop client It opens the new Window instead of a new tab.

Q1.

Is there any ways i can open it in a new tab ?

Q2.

On new window, i cant see any tab or input field to enter the SAP transaction as i get on the standard NWBC first window. Any specif reason and how to resolve this ?

Q3

How do i get to know how many tabs are open and what are the details of all the tabs like tcode etc.

Regards,

Manish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

Issues resolved using interface IF_LSAPI.

CL_NWBC - URL_CONSTRUCT & URL_LAUCNH didn't work in my case as it launches the NWBC version in new tab. If you choose the HTML_CLIENT = ABAP_FALSE, it launches a new window and ask for login, that was the main problem.

Thread Closed.

Former Member
0 Kudos

May be helpful for everyone who is having new Tab issue. Use IF_LSAPI Interface provided by SAP.

Below is the code.


        lo_lsapi = cl_lsapi_manager=>get_instance( ).

          lv_location = 'ls-tr://ZTCODE?p_para=819926,819927'.

         

             lo_lsapi->navigate(

                        location      = lv_location'

                        mode          '1'

*                    history_mode  = iv_history_mode

                        title         = 'Demo'

                         ).


I suggest to prefer this interface instead of using URL_LAUNCH as with that open is a new window instead of a new tab.


You can get more information about this interface in the interface document.



Regards,

Nik ..

Former Member
0 Kudos

thanks a lot.

This helps very much!

Best regards,

Eike

Former Member
0 Kudos

Hi Nik,

Thanks for this, i have already used it numerous times. However i was wondering if it is possible to send an OKcode into the location as well. I am trying to achieve this, but passing the &~okcode=XXX doesn't work.

If i paste my url into the webgui, then it is working fine.

Appreciate any inputs.

Former Member
0 Kudos

Hi Jacob,

Is the button on 1st screen or 2nd?

Can you share which transaction/webgui you are calling using LSAPI?

Regards,

Manish T(Nik)

Former Member
0 Kudos

Hi Nik,

The button is on the first screen. I am using the lean sales order (LO_OIF_MAIN_APP) and have created a custom follow up action

When i press this it goes straight into VF01

What i need it to do is to pass the parameters from the sales order and choose this button

Here is the code i have done, the link works if i use the webgui. However it just starts in SAP Gui for HTML which isn't an option.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Experts,

I am now able to get the new tab in NWBC Desktop client with the transaction i want to open using

CL_NWBC=>URL_CONSTRUCT

  EXPORTING

     CANVAS_WDA__CLIENT_TYPE       = 'nwbc'

     CANVAS_TRANSACTION            = 'IW38'

  RECEIVING

     URL                           = lv_URL.

CALL METHOD CL_NWBC=>URL_LAUNCH

   EXPORTING

     URL    = lv_url

But it gets open in NWBC HTML not in NWBC Desktop client.

Regards,

Nik

Former Member
0 Kudos

Use parameter HTML_CLIENT = ABAP_FALSE with URL_CONSTRUCT. If it still doesn't work, activate the NWBC trace and share it as an attachment (not embedded in the message) for further analysis.

Former Member
0 Kudos

Hi Samuli,

Earlier I tried the HTML_CLIENT = ABAP_FALSE with URL_CONSTRUCT, but it gave me the error " SAP GUI has closed the communication channel. All sessions are lost. Apply SAP Note 520688."

Just to add, I am on NW7.4

Attached is the trace file without this parameter


Regards,

Nik

Former Member
0 Kudos

Send a trace with the parameter HTML_CLIENT set to ABAP_FALSE. Is SAP GUI for Windows installed on the PC? NWBC for Desktop requires SAP GUI for Windows to be installed in order to launch transactions in it.

Former Member
0 Kudos

Hi Samuli,

Attached is the Trace with parameter HTML_CLIENT value ABAP_FALSE.

I have created a Zprogram which launches the IW38 transaction in New tab. I execute that zprogram from SE38.

With parameter HTML_CLIENT value 'True' it launches the new tab as HTML (as earlier screenshot), in case i set the value to 'False', it gives the error "SAP GUI has closed the communication channel. All sessions are lost. Apply SAP Note 520688".

SAP GUI 7.3 is installed on the PC.

SAP Installation in 7.4 and NWBC4 PL11.

Regards,

Nik

Former Member
0 Kudos

According to the trace, SAP GUI crashes. Try to patch your SAP GUI to the latest patch level (8) as well as your NWBC (12) and try again.

Former Member
0 Kudos

I tried the same with latest support pack.

With HTML_CLIENT value 'ABAP_FALSE' it tries to open a new NWBC window with logon prompt rather than a new tab. (Basic requirement is new tab not a window as multiple logon not allowed)

With Value ABAP_TRUE, it launches in the new tab but HTML version as earlier.

regards,

Nik

Former Member
0 Kudos

So at least SAP GUI isn't crashing any more. How are you calling URL_LAUNCH? From SE38 that is running in one tab of NWBC Desktop? You could try using parameter

CANVAS__WINDOW = CL_NWBC=>CANVAS__WINDOW__APP

for URL_CONSTRUCT.

Former Member
0 Kudos

Thanks Samuli,

CANVAS_WINDOW parameter was the solution for me.

I have another question on session handling which i will post later after Easter Holiday.

Regards,

Nik.

Former Member
0 Kudos

Hi Samuli,

I am back after my easter holidays and tried the solution in detail.

The CANVAS__WINDOW parameter launched the Transaction in Desktop client as new tab, but it is in the CANVAS with the transaction entry field, menu etc etc same as NWBC HTML version. I tried other parameters as well like

   FOR_USE_IN_EMAIL              = ABAP_FALSE          FOR_SESSION_USE               = ABAP_TRUE

    HTML_CLIENT                   = ABAP_FALSE

   RE_ENTRANCE_TICKET            = ABAP_TRUE


But no Success.

Also the fields in this Canvas is not working, I tried to pass value in the Order field, but no response.

Regards,

Nik

Former Member
0 Kudos

Sorry, I don't understand the question. I read your reply 3 times and I still don't understand. Maybe you could try to rephrase. The default behavior in NWBC for Desktop is to navigate to a new tab. If you need to pass parameters to the transaction use parameter QUERY_PARAMETERS of method URL_CONSTRUCT.

Former Member
0 Kudos

Sorry for an unclear replay.

In Simple terms; I have 2 scenarios;

  1. Launch a new tab (IW38 tcode), on click of a button in SAP screen of custom transaction in NWBC.
  2. Launch a new tab (IW38 tcode), on click of a button in a Non - SAP App opened (using URL) in NWBC.

For 1st case, i have used

CL_NWBC=>URL_CONSTRUCT

  EXPORTING

     CANVAS_WDA__CLIENT_TYPE       = 'nwbc'

     CANVAS_TRANSACTION            = 'IW38'

  RECEIVING

     URL                           = lv_URL.

CALL METHOD CL_NWBC=>URL_LAUNCH

   EXPORTING

     URL    = lv_url

But it gets open in NWBC HTML not in NWBC Desktop client.

I tried all the Parameters you have mentioned in your response to this post earlier, but nothing worked. the last one is CANVAS__WINDOW which actually hides the top area and few buttons but still it is a HTML version.

If i set the HTML_CLIENT = ABAP_FALSE, it launches a new window instead of the tab and asks for Login. If i login in can see the IW38 in NWBC desktop client. But the only problem is we have the restriction of single window/single login for users.

I am on NWBC PL12 and also updated the GUI 7.3 to PL8.

Simply the problem is URL_CONSTRUCT for any transaction is launching it in a new tab but in HTML Version.

For 2nd case,

It asks for the login details on click of a button on the 3rd party URL opened in NWBC. which means i am launching SAP from a 3rd party.

Is there any way to achieve the launch of new tab in this case instead of the new window ?

I hope its more clear now.

Regards,

Nik.

Former Member
0 Kudos

There must be something wrong with your setup and/or the way you have implemented navigation. I and others on SCN have successfully enabled navigation to transactions using SAP GUI for Windows with NWBC for Desktop. Earlier you confirmed that SAP GUI for Windows was correctly invoked by NWBC for Desktop (it previously used to crash) and that navigation worked and now you say it doesn't. SAP GUI for HTML (aka WebGUI) is a fallback option in case SAP GUI for Windows can't be used, for whatever reason. Regarding the 2nd case the short answer is no. The reason being that since the navigation is initiated from the external application you have no control over the running NWBC. As you have discovered you will also have to solve authentication issues assuming you don't enable SSO.