Skip to Content
author's profile photo Former Member
Former Member

Create a link in a Button WD

hello all,

i want create a Link in a button, not Link to action, but a button generating a Link,

can you please tell me how can I do this?

thank you all

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 04, 2011 at 07:56 AM

    Hi,

    I didn't get your question correctly. you want to generate a "link to url " element on click on button ? If yes

    Create link to url element and make it invisible initially....... once you click on button, in that button action make it visible.

    create one attribute of type wdui_visibility and bind it to visible property of link to URL element. and

    wd_context->SET_ATTRIBUTE(

    EXPORTING

    NAME = `AMVISIBLE`

    VALUE = '01' ).

    note : 01 for invisible and 02 for visible.

    Or

    you can do this by dynamic programming.

    Regards

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Not clear.

      You want link to url functionality on button click or you wnat to open one url on button click.

      by crating external window you can open url on click on button. write this code on button action.

      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.lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      
      CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
      EXPORTING
      URL = 'http://www.google.com/'
      MODAL = ABAP_FALSE
      HAS_MENUBAR = ABAP_TRUE
      IS_RESIZABLE = ABAP_TRUE
      HAS_SCROLLBARS = ABAP_TRUE
      HAS_STATUSBAR = ABAP_TRUE
      HAS_TOOLBAR = ABAP_TRUE
      HAS_LOCATION = ABAP_TRUE
      RECEIVING
      WINDOW = lo_window.
      
      lo_window->open( ).

      Cheers,

      Kris.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2011 at 08:08 AM

    You will have to code the link to url in the onaction of the button.

    see this post

    [Calling SAP transaction from WebDynpro;

    Edited by: edmorrissey on Jul 4, 2011 10:10 AM

    Edited by: edmorrissey on Jul 4, 2011 10:10 AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.