hyperlinks in reuse_alv_list_dispaly

hai
   i am useing alvgrid useing reuse_alv_list_display,

   i need to place an hyperlink for each row(i.e cell),
   if i press the cell it has to go to xk03.
 
thanks in advance
cyrilvictorAsked:
Who is Participating?
 
iam_tejaskCommented:
You use the field HREF_HNDL of the field catalog to assign a handle for a hyperlink address to all cells of a column.
Process:  

1. Define an internal table for the field catalog with reference to type
      LVC_T_FCAT and a hyperlink table with reference to type LVC_T_HYPE :

      data: gt_fieldcat type lvc_t_fcat,
            gt_hypetab type lvc_t_hype.
   2. If you want to display a hyperlink in only one cell of a column, you need an additional field in your output table. Add a field of type
      INT4 to your output table, as shown in the following example:

      DATA: BEGIN OF GT_OUTTAB OCCURS 0.
              INCLUDE STRUCTURE <DDIC structure> .

      DATA:   HL_FNAME TYPE INT4. "hyperlink handle for field FNAME

      DATA: END OF GT_OUTTAB.

      Note

      For each column of the output table that should have hyperlinks at cell level, you need to define an additional field for the handle. In this example, hyperlinks should appear in one column only.
   3. Generate the field catalog for your output table either
   4. manually or semi-automatically. In the field catalog, assign the name of the field for the hyperlink handle to the field WEB_FIELD (in our example: HL_FNAME , see above). The ALV Grid Control is then able to correctly interpret the additional field. Create your hyperlink table with all desired navigation targets, as shown below:

      data: ls_hype type lvc_s_hype.

      ls_hype-handle = '1'.
      ls_hype-href = 'http://www.sap.com'.
      append ls_hype to gt_hypetab.

      ls_hype-handle = '2'.
      ls_hype-href = 'http://www.mysap.com'.
      append ls_hype to gt_hypetab.
   5. Select your data and copy it into the output table.
   6. Read one output table row at a time in a loop. Assign the desired handle to the field for the hyperlink handle (in our example:
      HL_FNAME ). If the handle remains initial for a row, no hyperlink is displayed.
   7. Pass the field catalog, the hyperlink table, and the output table using method
     Reuse_ALV_Grid_Display.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.