01-14-2015 9:15 AM
Hi ,
I have tried few methods to remove default cursor position in oo alv grid: set_current_cell_via_id , set_focus , set_enable and in layout I have passed no_rowmark = 'X' but still I didn't find any solution to remove the default cursor position in oo alv grid.
Thanks and regards.
01-14-2015 10:02 AM
Hi,
if you are using class CL_GUI_ALV_GRID or similar and call your ALV screen with CALL SCREEN nnnn, then you can try the following:
Give a field name to the OK_CODE field on that screen, for example OKCOD.
Use SET CURSOR FIELD 'OKCOD'. in last PBO module.
Please check if this works.
Also you can try to use SET CURSOR col lin for a direct cursor position.
Regards,
Klaus
01-14-2015 11:38 AM
Hi Klaus,
Thanks for your response, I am having only one screen in my program and I am displaying an Alv. I need to disable the default cursor position in that screen instead of setting to a field .
I didn't get your solution. can you explain it clearly.
Thanks and regards ,
vijay
01-14-2015 12:28 PM
Hi Vijay,
this is no solution but an idea. If you have an own ALV screen defined in SE51, then you can assign a field name to the OK code field in the element list in SE51 (the field is of type OK.
If it has a name assigned, you can use the ABAP command
SET CURSOR FIELD xxxx.
This command must be processed at the end of the PBO flow logic in your ALV screen.
Regards,
Klaus
01-16-2015 9:01 AM
Hi Klaus,
Thanks for your response, i have tried it but it doesn't seems to work .
Thanks and Regards,
Vijay
01-16-2015 11:56 AM
Hi,
u can try : set_current_cell_via_id to set cursor where u want.
01-16-2015 12:22 PM
Hi snehal ,
I know set_current_cell_via_id will set cursor where ever I want, if I pass 0. Then also it will show cursor on 1st cell of alv. I need is disable the cursor .
Thanks,
Vijay
01-16-2015 12:08 PM
Use of set_current_cell_via_id and set_focus should have allowed you to move the cursor where you want, so could you post relevant code or explain when and how you called those, did you forget to also call CL_GUI_CFW=>FLUSH?
Regards,
Raymond
01-16-2015 12:28 PM
Hi Raymond ,
I need to remove the default cursor in first cell.
Thanks ,
Vijay.
01-16-2015 1:40 PM
That is not a requirement, shouldn't requirement be I want to put the cursor there?
(e.g the SET CURSOR FIELD 'OK_CODE' already suggested by Klaus.)
Regards,
Raymond