on 09-02-2015 12:15 PM
Hello,
I've seen some discussion about how to open SAP GUI from Webdynpro application but none of them did not work as I intend in NWBC 5. There is no problem when using HTML GUI.
Ok, so maybe what I have done so far:
1) cl_lsapi_manager=>navigate_to_transaction with parameter force_sapgui on, result is that when I navigate to received url I receive sap shortcut to open/save . I can then open this shortcut and new window (not tab) of NWBC is open with SAP GUI an transaction called. Additionally once buton with action to open was used, it's not working for the next click
Code:
data(lo_lsapi) = cl_lsapi_manager=>get_instance( ).
cl_lsapi_manager=>navigate_to_transaction(
exporting
* sm59_alias = sm59_alias " SM59 Alias of remote system
transaction = 'MM03' " Transaction Name
navigation_mode = 0 " 0 - inplace / 1 - new window
* parameters = parameters " Parameter List, e.g. customerID=4711 for Target Application
* dynp_okcode = dynp_okcode " DYNP OK Code
force_sapgui = abap_true " Force using of SAPGUI native, even in HTML client
importing
url = data(url)
exceptions
error = 1
not_supported = 2
others = 3
).
if sy-subrc <> 0.
* message id sy-msgid type sy-msgty number sy-msgno
* with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
lo_lsapi->navigate(
location = url
mode = '0'
).
2) when I use cl_nwbc=>url_construct with paramater html_client off and cl_nwbc=>url_launch then transaction is opened in new tab but with HTML GUI instead of SAP GUI
Code :
cl_nwbc=>url_construct(
exporting
canvas_wda__client_type = 'nwbc'
canvas_transaction = 'MM03'
html_client = abap_false
canvas__window = cl_nwbc=>canvas__window__app
receiving
url = data(lv_url) ).
call method cl_nwbc=>url_launch
exporting
url = lv_url.
3) cl_nwbc_sapgui_shortcut=>url and call method cl_nwbc=>url_launch then it does what it expect to do means creates sap shortcut and then acts like point 1)
Code:
cl_nwbc_sapgui_shortcut=>url(
exporting
iv_transaction_code = 'MM03'
iv_gui_size = cl_nwbc_sapgui_shortcut=>sc_gui_size_maximized
iv_reuse_existing_connection = abap_true
iv_server_relative_url = abap_false
receiving
rv_url = data(rv_url)
).
call method cl_nwbc=>url_launch
exporting
url = rv_url.
Now the question if it works the same at your installation or this is something wrong with mine? Maybe other version of NWBC are working differently here?
EDIT: I've also read about this possibility but would like to avoid it as not always we have underlying business object there, and I think that creation of dummy one for navigation purpose isn't the best approach.
Maybe also can take a look at it?
Regards
Łukasz
Hi Lukasz,
I would still argue that you are better of using the OBN method and just creating your business objects. This makes it very flexible as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lukasz,
You can also try this code snippet
data: lo_lsapi TYPE REF TO IF_LSAPI.
data: lv_location type string.
lo_lsapi = cl_lsapi_manager=>get_instance( ).
lv_location = 'ls-tr://QM01?RIWO00-QMART=Q1'.
lo_lsapi->navigate(
location = lv_location
mode = '1'
* history_mode = iv_history_mode
title = 'Create notification'
).
The RIWO00-QMART is the screen parameter for the first screen in QM01.
Hi Łukasz,
I tried to open the Transaction through OBN method its is opening the T.code but the F4 helps were not working as mentioned in the snapshot.
Also tried through the methods 1,2 and 3 you have mentioend above, I am also getting to open the shortcut and new window (not tab) of NWBC is open with SAP GUI an transaction called.
Did you solved this issue. Please give your suggestions.
Thanks,
Nalla B.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.