cancel
Showing results for 
Search instead for 
Did you mean: 

Genrate URL in view

Former Member
0 Kudos

Hi,

I want to open a URL on click of submit button in my view.How would i do it?

Rgds

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi ,

procced like this:

1 create a ACTION for ur button UI

2 In the OnAction of ur Button UI wrte this piece of code .

it will call display your desired URL link either in the current web page or call a new page / popup and display it in that.



data:  lo_window_manager type ref to if_wd_window_manager.
data:  lo_api_component  type ref to if_wd_component.
data:  lo_window         type ref to if_wd_window.
data:  ld_url type string.

lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url = ' ' . // ur URL here

CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
  EXPORTING
    URL            = ld_url   // ur URL here
  RECEIVING
    WINDOW         = lo_window.

lo_window->open( ).

for creating POPUPs refer

regards,

amit

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Refer this link if you want to Open a new window on the click of button :

If you want to open a new URL with closing the previous one :

Try this appraoch :

Do the following steps :

-> Make an Outbound Plug to the Window.

->Make the type of Outbound plug to Exit Type.

->Add URL of type String as a parameter to the outbound plug of Window.

->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).

To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).

DATA lo_zexit TYPE REF TO ig_zexit . <zexit is name of my Window>

lo_zexit = wd_this->get_zexit_ctr( ).

lo_zexit->fire_out_window_plg(

url = 'http://www.google.com' " string

).

SAP Online help :

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm