double click a row in table control

Question: i have crated a table control in a screen.
Upon double clicking any row , another SAP standard transaction (fpl9) has to get trigered. the account number for this transaction shold be same as one present on the row on which user double clicked.
the problrem is when the user clicks on a row, i am not able to finf on which row he double-clicked.
i have tried using many system variables and GET CUROSR too. but i amnot able to get it.
please help.

thks
ss gg

Answer:
Set the account number field as a hotspot in the table control via screen painter. Double click the field in your table control, click the display tab, and check on the "Responds to double Click" box.

In your PAI when sy-ucomm(ok_code) = 'PICK'
do something like this. This system will know where the user clicks.

Set the account number field as a hotspot in the table control via screen painter. Double click the field in your table control, click the display tab, and check on the "Responds to double Click" box.

In your PAI when sy-ucomm(ok_code) = 'PICK'
do something like this. This system will know where the user clicks.



data: cursorfield(30) type c,
        cursorline(30) type c,
        cursorvalue(30) type c.

  GET CURSOR FIELD CURSORFIELD LINE CURSORLINE VALUE CURSORVALUE.

  IF NOT CURSORVALUE IS INITIAL.
    CASE CURSORFIELD.
      WHEN ITABCON-ACCTFIELD'.
        SET PARAMETER ID 'WHATEVER' FIELD CURSORVALUE.
        CALL TRANSACTION 'fpl9 AND SKIP FIRST SCREEN.
    ENDCASE.
  ENDIF.



Answer:
You need to get the cursor value.



  GET CURSOR
         FIELD CURSORFIELD
         LINE CURSORLINE
         VALUE CURSORVALUE.


Do this statement in a screen module before the USER_COMMAND MODULE.

Regards,
R Heilman

Answer:
Well I done what you proposed R and it works for me as long as I'm working on the first page of my table control. But when I have used page down I get incorrect results as I read values from index = line in table control and not index = (line in table control + n pages).

How to retreive correct values here?

1) Flow Logic in Dynpro

PROCESS AFTER INPUT.
  LOOP WITH CONTROL tc_snppt.

    MODULE auswerten_snppt.
  ENDLOOP.


2) Module auswerten_snppt.

*&---------------------------------------------------------------------*
*&      Module  auswerten_snppt  INPUT
*&---------------------------------------------------------------------*

MODULE auswerten_snppt INPUT.
  PERFORM get_cursor.
  zeilen_tc = sy-loopc.
  IF sub_mark = 'X'.
    snpptpos = tc_snppt-current_line.
  ENDIF.
ENDMODULE.                 " auswerten_snppt  INPUT


3) Form get_cursor

*&---------------------------------------------------------------------*
*&      Form  get_cursor
*&---------------------------------------------------------------------*

FORM get_cursor.

  CLEAR:  cursorfield,
          cursorline,
          cursorvalue.

  GET CURSOR
      FIELD cursorfield
      LINE  cursorline
      VALUE cursorvalue.

ENDFORM.                    " get_cursor

_________________
Juergen Limbach
Copyright ?2007 - 2008 www.jt77.com