Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cursor in ALV container

Former Member
0 Likes
1,203

My output screen is controlled in class , so I am not able to use the SET CURSOR FUNCTIONALITY , is there a method hat allows you to set the cursor position inside a ALV container . I want the cursor to remain at the edited field after every enter . Right now it runs to the very first cell after every enter.

1 ACCEPTED SOLUTION
Read only

Laxmana_Appana_
Active Contributor
0 Likes
899

Hi,

If output is too long

then use SET_SCROLL_INFO_VIA_ID method first and use method

SET_CURRENT_CELL_VIA_ID of CL_GUI_ALV_GRID class.

Regards

L Appana

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
899

Use the method SET_CURRENT_CELL_VIA_ID of the class CL_GUI_ALV_GRID to set the current cell.

Regards,

Rich Heilman

Read only

Laxmana_Appana_
Active Contributor
0 Likes
900

Hi,

If output is too long

then use SET_SCROLL_INFO_VIA_ID method first and use method

SET_CURRENT_CELL_VIA_ID of CL_GUI_ALV_GRID class.

Regards

L Appana

Read only

0 Likes
899

oK , what should I pass in their export parameters....

an example will be great. thankyou

Read only

0 Likes
899

Like this -:)


  DATA: E_ROW TYPE I,
        E_VALUE TYPE C,
        E_COL TYPE I,
        ES_ROW_ID TYPE LVC_S_ROW,
        ES_COL_ID TYPE LVC_S_COL,
        ES_ROW_NO TYPE LVC_S_ROID.

  CALL METHOD GRID1->GET_CURRENT_CELL
  IMPORTING
  E_ROW = E_ROW
  E_VALUE = E_VALUE
  E_COL = E_COL
  ES_ROW_ID = ES_ROW_ID
  ES_COL_ID = ES_COL_ID
  ES_ROW_NO = ES_ROW_NO.

  ES_COL_ID = 'MENGE'.

  IF E_VALUE NE SPACE AND W_ERROR EQ SPACE.
    CALL METHOD GRID1->SET_CURRENT_CELL_VIA_ID
    EXPORTING
    IS_ROW_ID = ES_ROW_ID
    IS_COLUMN_ID = ES_COL_ID.
  ENDIF.

Greetings,

Blag.