How to provide hyperlink in alv

Hi,
how to provide hyperlink only for one column in alv in webdynpro abap
Thanks and regards,
Sridevi.D

DATA:
    lr_column_settings TYPE REF TO if_salv_wd_column_settings,
    lr_link_to_action TYPE REF TO cl_salv_wd_uie_link_to_action,
    lr_col type ref to cl_salv_wd_column.
  lr_column_settings ?= wd_this->alv_config_table.
  lr_col = lr_column_settings->get_column( 'MATNR' ).
  CREATE OBJECT lr_link_to_action.
  lr_link_to_action1->SET_TEXT_FIELDNAME('MATNR').
  lr_col->set_cell_editor( lr_link_to_action ).
The variable alv_config_table is defined in the attribute tab of the view which is reference to the class CL_SALV_WD_CONFIG_TABLE
Use this code in the init method of the View.
Reward points if helpful.
Thanks in advance.

Similar Messages

  • How to provide hyperlink for a particular field in ALV

    Hi,
      How to provide hyperlink for a particular field in alv report.
    Regards,
    Ramu.

    Yes you can do that. using the fieldcatalog there is an option for that. give HOT_SPOT = 'X'. for the column you want.
    wa_field-hotspot = 'X'.
    REPORT  ztest_alv.
    TYPE-POOLS:slis.
    DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
         wa_field LIKE LINE OF it_fieldcat.
    DATA: BEGIN OF it_likp OCCURS 0,
           vbeln TYPE likp-vbeln,
          END OF it_likp.
    DATA: layout TYPE slis_layout_alv.
    wa_field-fieldname = 'VBELN'.
    wa_field-tabname = 'IT_LIKP'.
    wa_field-hotspot = 'X'.
    wa_field-outputlen = 10.
    wa_field-no_zero = 'X'.
    wa_field-seltext_l = 'Sales'.
    APPEND wa_field TO it_fieldcat.
    SELECT vbeln FROM likp
    UP TO 10 ROWS
    INTO TABLE it_likp.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = layout
        i_callback_user_command = 'USER_COMMAND'
        it_fieldcat             = it_fieldcat
      TABLES
        t_outtab                = it_likp
      EXCEPTIONS
        program_error           = 1.
    *&      Form  user_Command
    *       text
    *      -->UCOMM      text
    *      -->SELFIELD   text
    FORM user_command USING ucomm TYPE sy-ucomm
                        selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          SET PARAMETER ID 'VL'  FIELD selfield-value.
          CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_Command

  • How to provide hyperlink for CSN message in email notification

    Hi,
    I have the following requirement, could anyone provide some ideas/solution on this.
    We integrated Change Notification Service to portal as transaction iView. once the CSN is raised and assigned to resopnsible person, the message will be notified through email. The requirement is in the email notification a hyperlink should be provided so that on clicking on the link it should open the page with respective CSN message.
    Could any one provide solution how to achieve this?
    Thanks in advance.
    Regards,
    Ravi.

    Yes you can do that. using the fieldcatalog there is an option for that. give HOT_SPOT = 'X'. for the column you want.
    wa_field-hotspot = 'X'.
    REPORT  ztest_alv.
    TYPE-POOLS:slis.
    DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
         wa_field LIKE LINE OF it_fieldcat.
    DATA: BEGIN OF it_likp OCCURS 0,
           vbeln TYPE likp-vbeln,
          END OF it_likp.
    DATA: layout TYPE slis_layout_alv.
    wa_field-fieldname = 'VBELN'.
    wa_field-tabname = 'IT_LIKP'.
    wa_field-hotspot = 'X'.
    wa_field-outputlen = 10.
    wa_field-no_zero = 'X'.
    wa_field-seltext_l = 'Sales'.
    APPEND wa_field TO it_fieldcat.
    SELECT vbeln FROM likp
    UP TO 10 ROWS
    INTO TABLE it_likp.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = layout
        i_callback_user_command = 'USER_COMMAND'
        it_fieldcat             = it_fieldcat
      TABLES
        t_outtab                = it_likp
      EXCEPTIONS
        program_error           = 1.
    *&      Form  user_Command
    *       text
    *      -->UCOMM      text
    *      -->SELFIELD   text
    FORM user_command USING ucomm TYPE sy-ucomm
                        selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          SET PARAMETER ID 'VL'  FIELD selfield-value.
          CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_Command

  • How to provide Hotspot in ALV tree????

    Hi experts,
    I have provided a double click event in ALV tree display. As of now I am able to open the transactions when I click on some the fields in output. But now I want to have a hotspot on those fields. See plz help me with this.
    This is my catalog:
    ** get fieldcatalog
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name = 'ZPP_STR_BAR'
           CHANGING
                ct_fieldcat      = t_fieldcat.
    LOOP AT t_fieldcat INTO ls_fieldcat.
        CASE ls_fieldcat-fieldname.
          WHEN 'AUFNR'.
            ls_fieldcat-no_out = 'X'.
            ls_fieldcat-key    = 'X'.
            ls_fieldcat-scrtext_s = text-t21.
            ls_fieldcat-tooltip   = text-t01.
          WHEN 'TXT'.
            ls_fieldcat-outputlen = 40.
    **      ls_fieldcat-do_sum = 'X'.
            ls_fieldcat-scrtext_s = text-t22.
            ls_fieldcat-tooltip   = text-t02.
          WHEN 'CHARG'.
            ls_fieldcat-outputlen = 16.
        ENDCASE.
        MODIFY t_fieldcat FROM ls_fieldcat.
    ENDLOOP.
    Is there any field in field catalog which i need to set?
    or is there any event to provide hotspot?
    <REMOVED BY MODERATOR>
    Thanks in advance,
    Sachin
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 2:31 PM

    hi,
      You Can give hotspot using the Fieldcatalog.
    hotspot_fieldname type slis_fieldname, " fieldname flag hotspot
    key_hotspot(1) type c,        " keys as hotspot " K_KEYHOT
    Hope this helps u,
    Reagrds,
    Arunsri.

  • How to Including Hyperlinks in alv

    Anone has a simple demo report for alv Including Hyperlinks.?

    Hyper link can be in the form hotspot here. so check this sample code.
    REPORT ztest_hyper_link MESSAGE-ID zz .
    TYPE-POOLS: slis.
    DATA: x_fieldcat TYPE slis_fieldcat_alv,
    it_fieldcat TYPE slis_t_fieldcat_alv,
    l_layout TYPE slis_layout_alv,
    x_events TYPE slis_alv_event,
    it_events TYPE slis_t_event.
    DATA: BEGIN OF itab OCCURS 0,
    vbeln LIKE vbak-vbeln,
    posnr LIKE vbap-posnr,
    link(40),
    END OF itab.
    SELECT vbeln
    posnr
    FROM vbap
    UP TO 20 ROWS
    INTO TABLE itab.
    LOOP AT itab.
      itab-link = 'http://www.sdn.sap.com'.
      MODIFY itab.
    ENDLOOP.
    x_fieldcat-fieldname = 'LINK'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-seltext_l = 'Website'.
    x_fieldcat-col_pos = 1.
    x_fieldcat-hotspot = 'X'.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-seltext_l = 'VBELN'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 2.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-seltext_l = 'POSNR'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = l_layout
        i_callback_user_command = 'USER_COMMAND'
        it_fieldcat             = it_fieldcat
      TABLES
        t_outtab                = itab
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      DATA: document TYPE string.
      CASE '&IC1'.
          CASE rs_selfield-fieldname.
            WHEN  'LINK'.
              document = rs_selfield-value.
              CALL METHOD cl_gui_frontend_services=>execute(
                EXPORTING
                  document               = document
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
          ENDCASE.
      ENDCASE.
      rs_selfield-refresh = 'X'.
      BREAK-POINT.
    ENDFORM. "USER_COMMAND

  • Use HYPERLINK In ALV

    Hi
    i have requirement to add a hyperLink in ALV Report Output.
    i have added the following code in my code but hyperlink('www.google.com' ) is not showing in the report output and when i execute the report then 'www.google.com' opens in the web browser.
      write : 'www.google.com' hotspot on.
      CALL FUNCTION 'CALL_BROWSER'
       EXPORTING
         url                          = 'www.google.com'
      WINDOW_NAME                  = ' '
      NEW_WINDOW                   = ' '
      BROWSER_TYPE                 =
      CONTEXTSTRING                =
       EXCEPTIONS
         frontend_not_supported       = 1
         frontend_error               = 2
         prog_not_found               = 3
         no_batch                     = 4
         unspecified_error            = 5
         OTHERS                       = 6
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Atul

    Check this
    how to Including Hyperlinks in alv
    and just use the code in my post.

  • How to provide Menu Options like BACK in ALV Grid display?

    Hi Guys,
              My problem is after displaying Multiple ALV grids using OO .I was not able to provide Back option and all those are Deactivated onj the Menu bar.So,How to provide those options.?We have a GreenButton with Symbol Correct on that Menu Bar.I was not able to see Back button and it is Deactivated.How to activate that Button.so that after displaying i can click on Back button and go to selection options.
    Thanks,
    Gopi.

    Hi Rich,
             I changed likie what u told.But still not working.I was not able to go to the Selection screen even after clicking F3 or F5 or back button.
    Standard Toolbar
    Icon Function Key                   Function Code        Function Text
         F3                             F3                   Back
         Alt-Arrow <                    F3                   Back
    Function Key Setting
    Function Key                   Icon Function Code        Function Text
    F5                                  F3                   Back
    Ctrl-N                              F3                   Back
               These are all the things which i kept in se41 tr code.
    Thanks,
    gopi.

  • Hyperlink in ALV output and when downloaded to Excel, maintain that hyperli

    Hi SAP Friends,
    I want to know if this is possible. My requirement is, display a column with Invoice # and hyperlink (or you can call it as Hotspot in SAP language). When clicked on the hyperlink, it should open a webpage, giving details of Invoice. I tried testing BCALV_GRID_VERIFY program. I can see hyperlink in ALV output and when I click, it opens a webpage. However, when I down load data to Excel using Excel inplace, hyperlink is gone. Only data is down loaded. How can we make it happen that hyperlink is maintained even after downloading data from ALV ?
    Any ideas ?
    Niranjan

    Waiting for any suggestions from users.
    Niranjan

  • How to implement 'hypelink' in ALV GRID

    Hi,everybody,please tell me how to implement 'hypelink' in ALV GRID?
    I just try to design a ALV GRID report but I do not kown the way of using 'hypelink'.  I refer to some documents but failsed.     somebody can help me and give a example including entire code.

    1. Create a table where hyperlinks & corresponding handles are stored (TYpe LVC_T_HYPE)
    DATA ls_hype TYPE lvc_s_hype .
    data lt_hype type lvc_t_hype.
    ls_hype-handle = '1' .
    ls_hype-href = 'http://www.company.com/carrids/car1' .
    APPEND ls_hype TO lt_hype .
    2. In your list data table create additional field of type INT4 which will contain the handle of the hyper link (ex. '1' for above hyperlink)
    DATA carrid_handle TYPE int4 .
    3. For the field which shall contain the hyperlink, make an entry in the field catalog indicating the field name which contains handle for the hyperlink. This is done by setting the handle field name in WEB_FIELD.
    ls_fieldcat-fieldname = 'CARRID'
    ls_fieldcat-web_field = 'CARRID_HANDLE'.
    4. While calling set_table_for_first_display, pass the hyperlink table created in step 1 to parameter 'it_hyperlink'
    ~Piyush Patil

  • How to handling ecxeptions on alv and how to write subrotiens on scripts

    Hi abapers..
    tell me how to handle ecxeptions on ALV, and how many exceptions are there ,which exception i have to use.
    AND is it possible to write subrotiens on script, if it is possible tell to me how to write

    There are already enough Exceptions provided for ALV .
    yes you can write sub-routines in scripts , search SDN and you will get answer for the same

  • How to Use Hyperlink in XI R2 need Screen Shots

    Hi All,
    Please  sent Screen Shots how to create Hyperlink in XI R2 step by step process i am new to this.
    Please help me on this.
    Thanks in advance

    Aravind,
    OpenDocument URL command syntax
    An example of the syntax to use when you want to create a hyperlink on a state object to open a document with sales details for the state appears below:
    ="<a href=""http://<server_name>:8080/OpenDocument/opendoc/openDocument.jsp?""&sType=wid""&sDocName=DetailedSalesReport""&lsSEnterState:="Replace(State;"";"%20") + "> "State""
    The below divides the example of syntax into understandable arguments, and provides an explanation for each argument.
    Note: Each of the syntax arguments are joined with a plus sign in the formula bar.
    Syntax argument ========================== Explanation
    "<a href=" ============= The opening HTML syntax for a hyperlink.
    http://<server_name>:8080/OpenDocument/opendoc/openDocument.jsp? =========== <server_name>:8080, used in this example, is
    specific to the BusinessObjects Enterprise server.You can find this name displayed in the address bar of your browser's address toolbar.
    Note: The port is 8080 for Tomcat web servers.
    "&sType=wid" ================ The type of document to be opened, in your case, a Web Intelligence document.
    "&sDocName=DetailedSales Report" =========== Your Document name(Report) Note that spaces in the name of the document are replaced with a + sign. %20 can be used in place of the +. %20 is the HTML encoding symbol for a space. This parameter can be substituted with the sDocID.
    "&lsSEnter_State:="+Replace( State;"";"%20") ==============
    The prompt parameter which will be passed to the document being opened.
    Notice that this argument has to match exactly with the prompt created in the first document. In this case, a single parameter is being passed (lsS).
    Additional parameters are available:
    u2022 lsM for multiple values
    u2022 lsR for a range of values
    The object name in brackets, State indicates the data from the main report to be passed to the linked report.
    The Replace command is used with the value to replace spaces in the value with the HTML symbol for a space.
    Multiple prompts can be listed in the code. You just continue to string them together with the + character to concatenate the pieces.
    t">"+ State ============= Required HTML encoding and the object name that indicates to the document which data to show in the table. Once you have formatted the column in the Web Intelligence table, the State values in this case appear as hyperlinks.
    "" ============= The closing HTML code for a hyperlink.
    Summerized :
    ="<a href =" + "http://webwasqwn1.ecorp.cat.com:8322/OpenDocument/opendoc/openDocument.jsp?sType=wid&sDocName=fsitem&lsSEnterItem Node Name:="Query 2.Item Node Name(If IsPromptAnswered("Enter FS Items") Then "&lsSEnterFS Items:="+URLEncode(UserResponse("Enter FS Items:"))) + Object + ""
    Hope it helps you!!
    Thank You!!
    Sent from iPhone

  • How to provide text formatting options to user from a text field

    Hi,
    My requirement is - in the interactive form, a comments field needs to be provided where user should be able to enter text with formatting options like
    Headers
    indentations
    bold/italic
    bullet points and numbers
    Once user enters the formatted texts in a text field, data needs to be displayed/printed in the same format. Could you help me on how to provide these formatting options to the user for a particular text field?
    I understand that once I define the text field with format XHTML (with RTF), user formatting can be captured and displayed in the same way. But I am not sure on how to provide the formatting options for the text field.
    Thank you,
    Madhu

    Hi,
    if you select a text field for Rich Text and the press Ctrl + E you'll get a bar for all available text formatting options in Acrobat/Reader.

  • How do you HYPERLINK a web page address to an EXCEL document in Firefox like is possible in Explorer

    How do you HYPERLINK a web page address to an EXCEL document in Firefox like is possible in Explorer?

    When you follow a hyperlink in Excel, usually it should open in your default browser. You shouldn't have to do anything special in Excel to create the link when Firefox is your default browser compared with IE. However, the Insert Hyperlink dialog might work differently. I think it might be able to automatically pre-populate a URL from IE, while in Firefox, you need to copy the URL from Firefox's address bar and paste it into the Insert Link dialog.

  • How to provide text editor in dialog program

    i have a requirement to enter upto 300 words in a dialog box how to provide text editor in dialog program

    you can use the custom controls for the same
    check this below link may be useful for you.........
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm

  • How to display total in ALV Header

    How to display total in ALV Header?

    Hi Venkey,
    As far as your issue is concerned I would like to quote my perception.
    Create a header internal table with title and number of records.
    At the later part of your program you should have found the total number of records ,now assign it to the header internal table and print it.
    For further clarification you can go check this link:
    http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport
    Thanks
    P.Srikanth

Maybe you are looking for