cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing an SAP T-Code from WDA

Former Member
0 Kudos

Hi all

I need to call an SAP T-Code from my WebDynpro. I tried it on a button click.But while I am trying to do that its giving me an error "Access via 'NULL' object reference not possible". Its because l_sapgui_manager is not getting the value. Why is it so?

This is the code that I have used,

data l_componentcontroller type ref to ig_componentcontroller .

data l_api_componentcontroller type ref to if_wd_component.

data l_sapgui_manager type ref to cl_wdr_sapgui_integration.

l_componentcontroller = wd_this->get_componentcontroller_ctr( ).

l_api_componentcontroller = l_componentcontroller->wd_get_api( ).

l_sapgui_manager = l_api_componentcontroller->get_sapgui_manager( ).

if l_sapgui_manager is not initial.

l_sapgui_manager->fire_start_transaction(

exporting

transaction = item_tcode' ).

endif.

Is there any other option through which I can access T-Code from WDA.

Please help me with solutions.

Thanks In Advance

Athu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Athulya,

You can only use SAPGUI Manager when you are executing your wda application from within SAPGUI:

Hope this helps!

Andre

Answers (0)