Skip to Content

hostspot in alv module pool how catch cell value

Hello guys, I have an ALV in a module pool program, I have activated the hostspots in fieldcad and now I see my cell in underlined. I want to know for catch the value of this cell, because I want to use this value for a submit program to VF01 etc...

Could Anyone can help me?

alv.png (53.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 13 at 08:30 PM

    Hi Luis,

    To get the particular line, use GET CURSOR LINE statement in USER_COMMAND(PAI) subroutine

    GET CURSOR LINE lv_line.

    Use READ statement and get the cell value from the internal table.

    READ TABLE IT_TABLE INTO WA_TABLE INDEX LV_LINE. 

    Regards

    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14 at 04:26 AM

    hi

    if your oops alv , there is HOTSPOT_CLICK event is there.

    use that handler method for that event. your issue is solved.

    i

    Add comment
    10|10000 characters needed characters exceeded

    • hi

      if your alv is functional please see below code.

      REPORT ZDEMO2.


      TYPE-POOLS:SLIS.


      TYPES:BEGIN OF TY_VBAK,
      VBELN TYPE VBAK-VBELN,
      ERDAT TYPE VBAK-ERDAT,
      ERZET TYPE VBAK-ERZET,
      ERNAM TYPE VBAK-ERNAM,
      END OF TY_VBAK,
      TT_VBAK TYPE STANDARD TABLE OF TY_VBAK.


      DATA:GT_VBAK TYPE TT_VBAK.

      DATA:GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
      GS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.




      START-OF-SELECTION.

      SELECT VBELN ERDAT ERZET ERNAM FROM VBAK INTO TABLE GT_VBAK UP TO 10 ROWS.




      END-OF-SELECTION.


      REFRESH:GT_FIELDCAT[].

      CLEAR GS_FIELDCAT.
      GS_FIELDCAT-FIELDNAME = 'VBELN'.
      GS_FIELDCAT-SELTEXT_L = 'Sales Document'.
      GS_FIELDCAT-HOTSPOT = 'X'.
      APPEND GS_FIELDCAT TO GT_FIELDCAT.

      CLEAR GS_FIELDCAT.
      GS_FIELDCAT-FIELDNAME = 'ERDAT'.
      GS_FIELDCAT-SELTEXT_L = 'Date Created'.
      APPEND GS_FIELDCAT TO GT_FIELDCAT.

      CLEAR GS_FIELDCAT.
      GS_FIELDCAT-FIELDNAME = 'ERZET'.
      GS_FIELDCAT-SELTEXT_L = 'Entry time'.
      APPEND GS_FIELDCAT TO GT_FIELDCAT.

      CLEAR GS_FIELDCAT.
      GS_FIELDCAT-FIELDNAME = 'ERNAM'.
      GS_FIELDCAT-SELTEXT_L = 'Name of Person'.
      APPEND GS_FIELDCAT TO GT_FIELDCAT.



      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      I_CALLBACK_PROGRAM = SY-CPROG
      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
      IT_FIELDCAT = GT_FIELDCAT
      TABLES
      T_OUTTAB = GT_VBAK
      EXCEPTIONS
      PROGRAM_ERROR = 1
      OTHERS = 2.




      IF 1 = 4.

      ENDIF.








      FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
      RS_SELFIELD TYPE SLIS_SELFIELD.

      IF 1 = 4.

      ENDIF.


      ENDFORM.