Hyperlink in ALV
Hi All,
I am using radiobuttons to display to different field catalogs in ALV Report. Instead i want to display an hyperlink in the grid display and when i click on that it should display the other field catalog. Can u help me on this. Thanx in advance.
Regards,
Karthik
Karthik,
The hotspot (hyperlink) will have to be enabled at a specific field level on the grid. So, for whichever field you want to have this feature, set the HOTPSOT attribute for that field to X in the field catalog.
Then you handle the event of hotspot click for the grid and do the same what you are doing for the radio button now. The following examples show you how to use the events.
With ALV Grid Control - BCALV_TEST_GRID_EVENTS
With REUSE function - BCALV_TEST_FULLSCREEN_EVENTS
Regards,
Ravi
Note - Please mark all the helpful answers
Similar Messages
-
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 ?
NiranjanWaiting for any suggestions from users.
Niranjan -
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
AtulCheck this
how to Including Hyperlinks in alv
and just use the code in my post. -
How to handle the hyperlink in alv
Hello friends,
I made one alv report by using function.. now i want that on one coloum, if user click than it can fetch the information regarding it. please tell me how i can do.. i made a hyperlink on that coloum but i dont know how i handle it..
Regards,
Reema Jain.REPORT zdemoab.
TYPE-POOLS: slis.
TABLES: mara.
TYPES: BEGIN OF t_itab,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
END OF t_itab.
DATA: itab TYPE TABLE OF t_itab,
wa_itab like line of itab.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat,
i_layout TYPE slis_layout_alv,
g_repid TYPE sy-repid.
SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 0.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'MARA'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-tabname = 'MARA'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
i_layout-colwidth_optimize = 'X'.
i_layout-hotspot_fieldname = 'MATNR'.
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
is_layout = i_layout
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'MATNR'.
* To pass the material no in ME22 transaction
READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'MM03'.
ENDIF.
ENDFORM. -
Determine column clicked :Multiple Hyperlink in ALV
Hi Experts
I Have ALV in a view i have multiple colums as hyperlink .
on_click event how do i determine which Column value was Clicked and the row ??
Thanks in advance
Badari Patilhi.
in the on_click method you have the import parameter r_param.
column id = <b>r_param->column</b>.
Cheers,
Sascha -
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 -
How to provide hyperlink in alv
Hi,
how to provide hyperlink only for one column in alv in webdynpro abap
Thanks and regards,
Sridevi.DDATA:
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. -
Need help in Hyperlink to ALV report
Hello Experts,
I want to give hyperlink to Sales Order Number.
I have one report. I am supposed to give hyperlink to Salesorder # so that when user clicks on it,
it should display VA03 transaction.
Can you please guide me how to do this?
Best Regards,
HarishHi,
In fieldcatalog make your VBELN column make attribute HOTSPOT = 'X' and then handle this event in USER COMMAND as
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF rs_selfield-fieldname = 'VBELN'.
READ TABLE it_output INTO wa_output INDEX rs_selfield-tabindex.
SET PARAMETER ID ''AUN' FIELD wa_output-vbeln.
CALL TRANSACTION 'VA03' and skip first screen.
ENDIF.
ENDFORM. -
Action (navigation) when click on Hyperlink field in ALV web dynpro
Hi - I had a question about Hyperlink in ALV web dynpro and it was answered in Link: [web dynpro abap ALV link to (hyperlink);
Now I need to click the Hyperlink field and navigate to another screen.
i.e. I have a Object ID (PR Number) when I click the PR number I need to open the PR Document also another case is at the item level if the PR has more than one item I'm showing the word "MULTIPLE" so if the user click on Multiple I need to show all the items (material) in another ALV table that I already create.
Thanks for your help!
Jason P-VHi,
As per my understanding, there are PR number and Material and other columns in the SAME ALV table right.
There is a ONCLICK event for ALV not for the VIEWCONTAINTERELEMENT.
In the View where you have the ALV as component usage under view's properties, you have ALV usage right.
Now, under the METHODS tab of the ALV, implement an event
Onclick EventHandler ONCLICK(press F4) of that ALV.
Now the Click event is implemented for that ALV. When ever you click on any column(Hyperlink) this gets called.
Here there are parameters that you need to use it. R_PARAM has both the index and the element.
Based on the COLUMN you can call the respective event.
The index that you have clicked i shown from r_param->index and you can also know ATTRIBUTE name(column name).
If attribute eq 'PRNUMBER'
*call the Purchase requistion transaction
elseif attribute eq 'MATNR'.
*call the popup for other ALV as component usage to display item details.
endif.
Refer this Article -
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8&overridelayout=true
Hope this is clear.
Regards,
Lekha.
Edited by: Lekha on Sep 26, 2009 12:57 PM -
I need to create a hyperlink option in my ALV tree display output.
As the ALV output appears clicking on PO number --Hyperlink should take me a company's website.Can any just suggest me some info regarding the same???
Regarding making hyperlink in OOPs ALV
hyperlink in an column (ALV REPORT)
how to handle the hyperlink in alv
Please give me reward points
Thanks
Murali Poli -
Dear friends ,
I want to make 'HYPERLINK' action in custom control alv , in my alv one icon is there , when ever I click into that icon ,action will generate in PAI , m nt able to generate this action . please help me out .
Thanks ,
Joy .Hi,
Go trough the [LINK|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=55249] which has sample example for hyperlink in ALV custom contianer.
Regards,
Shanmugavel Chandrasekaran -
Hyperlink in OO-ALV to Sap-Business- Workplace-Dokuments
Hello specialists,
I have implemented hyperlinks to an oo-based ALV-List
( please see sample code later ). Now we have the problem that these hyperlinks only work in a local network-area.
But we have also foreign-departments on our SAP-system, that have no access to our network.
Now the question: is it also possible to create hyperlinks
assigned to SAP-Business-Workplace-documents ?
Do you have a solution for this problem ?
Thank' s in advance !
Best regards !
Oliver Perthen / Germany
*& Modulpool ZBWS_TESTSZENARIEN_LINK *
INCLUDE Z_LINK_TOP . "
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZTEST'.
SET TITLEBAR 'ZX'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL' OR 'ABORT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module create_object OUTPUT
text
MODULE CREATE_OBJECT OUTPUT.
CHECK G_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT G_CUSTOM_CONTAINER EXPORTING
CONTAINER_NAME = 'CONTAINER'.
CHECK ALV_GRID IS INITIAL.
CREATE OBJECT ALV_GRID EXPORTING
I_PARENT = G_CUSTOM_CONTAINER.
ENDMODULE. " create_object OUTPUT
*& Module read_data OUTPUT
text
MODULE READ_DATA OUTPUT.
SELECT * FROM ZBWS_TESTSZENARI INTO TABLE ZTEST WHERE TESTER EQ
'RW#9952'.
ENDMODULE. " read_data OUTPUT
*& Module transfer_to_alv OUTPUT
text
MODULE TRANSFER_TO_ALV OUTPUT.
REPORT = SY-REPID.
CLEAR LAYOUT.
CLEAR FIELDCAT_D.
REFRESH FIELDCAT_D.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'ZBWS_TESTSZENARI'
I_BUFFER_ACTIVE = 'X'
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = FIELDCAT_D[].
FIELDCAT-FIELDNAME = 'HL_FNAME'.
FIELDCAT-NO_OUT = 'X'.
APPEND FIELDCAT TO FIELDCAT_D.
LOOP AT FIELDCAT_D INTO FIELDCAT.
FIELDCAT-SELTEXT = FIELDCAT-FIELDNAME.
FIELDCAT-REPTEXT = FIELDCAT-FIELDNAME.
CASE FIELDCAT-FIELDNAME.
WHEN 'TESTDATEI'.
FIELDCAT-WEB_FIELD = 'HL_FNAME'.
ENDCASE.
MODIFY FIELDCAT_D FROM FIELDCAT.
ENDLOOP.
LOOP AT ZTEST.
ZTEST-HL_FNAME = SY-TABIX.
LS_HYPE-HANDLE = SY-TABIX.
LS_HYPE-HREF = ZTEST-TESTDATEI.
APPEND LS_HYPE TO GT_HYPETAB.
MODIFY ZTEST.
ENDLOOP.
LAYOUT-NO_KEYFIX = 'X'. " Schlüssel nicht Fixieren
LAYOUT-INFO_FNAME = 'COLOR'."Farbstufen
LAYOUT-SEL_MODE = 'D'. "Markierungsspalte
LAYOUT-SGL_CLK_HD = 'X'. "Sortierung per Click
LAYOUT-CWIDTH_OPT = 'X'.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'ZBWS_TESTSZENARI'
IS_LAYOUT = LAYOUT
I_SAVE = 'A'
IT_HYPERLINK = GT_HYPETAB
CHANGING
IT_OUTTAB = ZTEST[]
IT_FIELDCATALOG = FIELDCAT_D.
ENDMODULE. " transfer_to_alv OUTPUTHi.
I'll try it.
Thanks. -
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 -
Hyperlink Field in column of 2D ALV Report
Hi,
I have to display a ALV Report in which one of column reprsent a field which have hyperlink.
How to acheive this?Can anybody tell me approach?
-RickHi Ricky,
Kindly go through the link below:
http://help.sap.com/saphelp_erp2004/helpdata/EN/85/ce25c2d7ae11d3b56d006094192fe3/content.htm
Hope it helps you
Regrds
Mansi -
Hello,
Is there a way to create a hyperlink in the header of the ALV using ALV OO? The hyperlink should call a transaction code. I have done this using the 'REUSE_ALV...' grid function, but I don't know how to do this using ALV OO.
Thanks,
KennethIu2019ve been looking at the class CL_SALV_HYPERLINKS but I am not sure how to do this either.
Hyperlinks could be displayed by using a separate docking container and dynamic documents:
http://wiki.sdn.sap.com/wiki/display/Snippets/TopofPageinALV%28OOPS%29
Maybe you are looking for
-
New Customer with Service Issue
I am very frustrated with Verizon & customer service. Our family is new to Verizon within the last month. We drop calls all the time and get choppy service by our house. I talked to local store and they advised for me to call Customer Service. The re
-
How do I change the color of a circle in a vectorized document?
I am working with a vectorized document that has circles in the logo. Between the circles are lines of text. I am able to change the color of the text but I can not change the color of the lines of the circle without changing the entire area to the
-
I'm unable to connect iPhoto to my Facebook account
...using iPhoto 9.4.3. When I'm trying to set up my Fb account it seems everything's fine with the prompted steps on the way to creating it however when the drop down menu appears prompting me to enter my Fb account data and informing on sending to m
-
Hello iam using Ni9237 card and iam using an 100kg load cell My objective is to measure a weight btw 0 - 50 kg. iexcitation voltage is 5 v. Sensitivity of the load cell is 2mv/v. reading i get for 0 kg is 0.000646431** v/v and for 50 kg
-
ACE SM sending a RST prematurely
I have run into an odd situation where the ACE sends a TCP reset for the public leg of a TCP session prematurely. The setup looks something like this. Internet-->FWSM(context)-->ACE-->rservers client upload NAT exemption routed