Set Cursor on ALV Grid

i am trying to set the cursor on an ALV Grid display so that the field can be editted....
LOOP AT lt_fieldnames INTO ls_fieldnames.
    IF NOT ls_fieldnames-colortab IS INITIAL.
      ls_row_no-row_id       = sy-tabix.
      ls_column_id-fieldname = 'VALUE'.
      EXIT.
    ENDIF.
  ENDLOOP.
*--- Set focus to cell that contains error
CALL METHOD grid_editmsg->set_current_cell_via_id
  EXPORTING
       is_column_id = ls_column_id
       is_row_no    = ls_row_no 
the field is highlighted but i still have to click in the field to edit the contents....
is there a method/fm i can use that makes the field directly editable????

I also searched for this and i find a solution.
CALL METHOD cl_gui_control=>set_focus
     EXPORTING
       control = gref_grid_menge.
So even if this post is very old, probably it can help other devs to go further!

Similar Messages

  • Set cursor in ALV grid output

    Hi guys,
    I generated a report which gives out put in ALV grid.
    In the ALV grid output, I have some editable fields.
    Lets suppose, there are some editable fields with no data in it.
    I have userdefined pushbutton in Application toolbar, when I press the pushbutton the cursor should go to the empty field in the ALV grid output.
    Can this be possible through SET CURSOR statement?
    Thanks,
    Shivaa......

    Hi,
        You can set the cursor field on the output list that too for the output fields which are vissible on the screen only.
    syntax
    SET CURSOR 11 3.   ---> 11Coloumn and 3 line
    for dynamically setting cursor, first you have to search for the empty fields then set the cursor dynamically.
    look at this help document it might be helpful
    http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htm
    Regards
    Bala KRishna

  • Set cusor in alv grid

    Hello friends,
              How to set cusor in a particular cell of an alv grid.
    Thanks
    Suga prasad.N

    try this method of the grid SET_CURRENT_CELL_ID ,
    by passing ROW_ID and COL_ID in it .
    Or   SET_FOCUS methode to set cursor on a particular cell

  • How to set variant for ALV grid from ABAP

    Hello,
    I have a program which displays some data with ALV grid. Then after some operation I would like to set different layout for the grid, but not by choosing it manually but by the program. I thought that it would be enough to use the method SET_VARIANT, so I'm setting DISVARIANT structure properly, using SET_VARIANT method and after that I'm calling REFRESH_TABLE_DISPLAY but layout is not changed. What else should I do? Is that possible?
    Best regards,
    Marcin

    Hi,
    Check this
    * While declaring select-options
    parameters: p_vari        like ltdx-variant.  " Layout
    * then add the following code in
    at selection-screen on value-request for p_vari.
      perform f_variant_f4 using p_vari.
    * Code for f_variant_f4
    form f_variant_f4 using  p_vari.
    * private variables
      data : v_exit    type c.
      clear gs_variantt.
      v_variant_save = 'U'.
      call function 'LVC_VARIANT_F4'
        exporting
          is_variant    = gs_variant
          i_save        = v_variant_save
        importing
          e_exit        = v_exit
          es_variant    = gs_variantt
        exceptions
          not_found     = 1
          program_error = 2
          others        = 3.
      if sy-subrc ne c_0.
        message i999(yscc) with text-064.    " No Layout Available for F4
      endif.
      if v_exit is initial.
        gs_variant-variant = gs_variantt-variant.
        p_vari             = gs_variantt-variant.
      endif.
    endform.                                 " F_variant_f4
    * In PBO
        call method grid1->set_table_for_first_display
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant
            i_save                        = 'A'
            it_toolbar_excluding          = i_exclude[]
          changing
            it_outtab                     = i_output[]
            it_fieldcatalog               = i_fieldcat[]
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4.

  • SET parameter on ALV grid with container

    Hi,
    I need to SET PARAMETER ID to acess the transaction CJ40, in an ALV grid program with screen container for the ALV.
    I'm using a method handle_double_click to select a line and pass the value to the parameter ID like this:
      METHOD handle_double_click.
        DATA: l_project TYPE prps-pspnr.
        READ TABLE it_out INDEX e_row-index INTO wa_out.
        CHECK sy-subrc = 0.
        WRITE wa_out-pspnr TO l_project.
        SET PARAMETER ID 'PRD' FIELD l_project.
        CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.
        CLEAR wa_out-pspnr.
      ENDMETHOD.                           "handle_double_click
    But this doesn't work. No value at all is passed to the transaction.
    What is missing?
    Thanks in advance,
    Rui

    Parameter ID PSP is attached to the Project Definition field.
    SET PARAMETER ID 'PSP' FIELD l_project.
    CALL TRANSACTION 'CJ40' AND SKIP FIRST SCREEN.
    Regards,
    Naimesh Patel

  • How to Set Checkbox of ALV Grid Dark on Display Mode

        ABAP experts, I want to switch between display mode and edit mode for some columns of ALV Grid. So I set "LVC_S_FCAT-EDIT" "X" for the columns which need to switch mode, and use method "SET_READY_FOR_INPUT" to switch.
        Currently, the function of switch mode has been achieved. But icons of checkbox columns are light but not dark when display mode, although the columns can't be edited. (Please refer to the image below.) I want to make checkbox columns dark as other columns on display mode.
        I tried to use "CL_GUI_ALV_GRID=>MC_STYLE_ENABLED" and "CL_GUI_ALV_GRID=>MC_STYLE_DISABLED", but failed. I also studied sample program "BCALV_EDIT_05" which is related to checkbox in ALV Grid, and compared my program with this program. But I still have not found problems.
        Help me solve this problem, please.
        Part of my codes are as follows.
        Part 1:
    IF iv_is_create_group = abap_true OR iv_is_edit_group = abap_true.
           set_enable( iv_flag = 1 ).
           LOOP AT gt_acct_group_item ASSIGNING <lfs_acct_group_item>.
             CLEAR ls_celltab.
             IF <lfs_acct_group_item>-celltab IS INITIAL.
               CLEAR ls_celltab.
               ls_celltab-fieldname = 'CHECK_BOX'.
               ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
               APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
               CLEAR ls_celltab.
               ls_celltab-fieldname = 'XPORE'.
               ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
               APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
             ELSE.
               LOOP AT <lfs_acct_group_item>-celltab ASSIGNING <lfs_celltab>.
                 <lfs_celltab>-style = cl_gui_alv_grid=>mc_style_enabled.
               ENDLOOP.
             ENDIF.
           ENDLOOP.
         ELSE.
           set_enable( iv_flag = 0 ).
           LOOP AT gt_acct_group_item ASSIGNING <lfs_acct_group_item>.
             IF <lfs_acct_group_item>-celltab IS INITIAL.
               CLEAR ls_celltab.
               ls_celltab-fieldname = 'CHECK_BOX'.
               ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
               APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
               CLEAR ls_celltab.
               ls_celltab-fieldname = 'XPORE'.
               ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
               APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
             ELSE.
               LOOP AT <lfs_acct_group_item>-celltab ASSIGNING <lfs_celltab>.
                 <lfs_celltab>-style = cl_gui_alv_grid=>mc_style_disabled.
               ENDLOOP.
             ENDIF.
           ENDLOOP.
         ENDIF.
         CALL METHOD gr_grid->refresh_table_display
    *      EXPORTING
    *        is_stable      =
    *        i_soft_refresh =
           EXCEPTIONS
             finished       = 1
             OTHERS         = 2
         IF sy-subrc <> 0.
    *     Implement suitable error handling here
         ENDIF.
        Part 2:
    METHOD set_enable.
         gr_grid->set_ready_for_input(
             i_ready_for_input = iv_flag
    ENDMETHOD.

    Hi Liu,
        Please go through the below code.
    *& Report  YEDIT_DISPLAY
    REPORT  YEDIT_DISPLAY.
    TABLES : VBAK.
    TYPE-POOLS SLIS.
    TYPES : BEGIN OF TY_VBAK,
              VBELN TYPE VBAK-VBELN,
             END OF TY_VBAK,
             BEGIN OF TY_FINAL,
               BOX TYPE C,
               VBELN TYPE VBAK-VBELN,
             END OF TY_FINAL.
    DATA : IT_VBAK TYPE TABLE OF TY_VBAK,
            WA_VBAK TYPE TY_VBAK,
            IT_FINAL TYPE TABLE OF TY_FINAL,
            WA_FINAL TYPE TY_FINAL,
            IT_FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV,
            WA_FCAT TYPE SLIS_FIELDCAT_ALV.
    START-OF-SELECTION.
       PERFORM FETCH_DATA.
       PERFORM FCAT_DATA.
       PERFORM DISPLAY.
    *&      Form  FETCH_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FETCH_DATA .
       SELECT VBELN INTO TABLE IT_VBAK FROM VBAK UP TO 10 ROWS.
       LOOP AT IT_VBAK INTO WA_VBAK.
         WA_FINAL-VBELN = WA_VBAK-VBELN.
         APPEND WA_FINAL TO IT_FINAL.
         CLEAR : WA_FINAL , WA_VBAK.
       ENDLOOP.
    ENDFORM.                    " FETCH_DATA
    *&      Form  FCAT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FCAT_DATA .
       WA_FCAT-COL_POS = 1.
       WA_FCAT-FIELDNAME = 'BOX'.
       WA_FCAT-TABNAME = 'IT_FINAL'.
       WA_FCAT-OUTPUTLEN = '3'.
       WA_FCAT-SELTEXT_M = 'BOX'.
       wa_fcat-checkbox = 'X'.
       WA_FCAT-EDIT = 'X'.
       APPEND WA_FCAT TO IT_FCAT.
       CLEAR WA_FCAT.
       WA_FCAT-COL_POS = 2.
       WA_FCAT-FIELDNAME = 'VBELN'.
       WA_FCAT-TABNAME = 'IT_FINAL'.
       WA_FCAT-OUTPUTLEN = '3'.
       WA_FCAT-SELTEXT_M = 'Sales Document'.
       APPEND WA_FCAT TO IT_FCAT.
       CLEAR WA_FCAT.
    ENDFORM.                    " FCAT_DATA
    *&      Form  DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY .
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
          IT_FIELDCAT                       = IT_FCAT
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
         TABLES
           T_OUTTAB                          = IT_FINAL
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
       IF SY-SUBRC <> 0.
    * Implement suitable error handling here
       ENDIF.
    ENDFORM.                    " DISPLAY
    FORM USER_COMMAND USING UCOMM TYPE SY-UCOMM
                             RTAB TYPE slis_selfield.
       CASE UCOMM.
         WHEN '&IC1'.
           MESSAGE 'SUCESSFUL' TYPE 'S'.
         WHEN '&DATA_SAVE'.
           PERFORM FIL_FCAT.
           PERFORM DISPLAY1.
         WHEN 'BACK'.
           LEAVE TO SCREEN 0.
         WHEN OTHERS.
           LEAVE TO SCREEN 0.
       ENDCASE.
    ENDFORM.
    *&      Form  FIL_FCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIL_FCAT .
    CLEAR IT_FCAT.
       WA_FCAT-COL_POS = 1.
       WA_FCAT-FIELDNAME = 'BOX'.
       WA_FCAT-TABNAME = 'IT_FINAL'.
       WA_FCAT-OUTPUTLEN = '3'.
       WA_FCAT-SELTEXT_M = 'BOX'.
       wa_fcat-checkbox = 'X'.
    **  WA_FCAT-EDIT = 'X'.
       APPEND WA_FCAT TO IT_FCAT.
       CLEAR WA_FCAT.
       WA_FCAT-COL_POS = 2.
       WA_FCAT-FIELDNAME = 'VBELN'.
       WA_FCAT-TABNAME = 'IT_FINAL'.
       WA_FCAT-OUTPUTLEN = '3'.
       WA_FCAT-SELTEXT_M = 'Sales Document'.
       APPEND WA_FCAT TO IT_FCAT.
       CLEAR WA_FCAT.
    ENDFORM.                    " FIL_FCAT
    *&      Form  DISPLAY1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY1 .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = SY-REPID
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
          IT_FIELDCAT                       = IT_FCAT
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
         TABLES
           T_OUTTAB                          = IT_FINAL
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
       IF SY-SUBRC <> 0.
    * Implement suitable error handling here
       ENDIF.
    ENDFORM.                    " DISPLAY1
    Here i written code under the SAVE button , if requires you create your own status and apply.
    Regards,
    Krishna

  • Hi, how to set printer to alv grid, please check my code

    Hi,
    Iam giving my code, please observe...
    DEFAULT PRINTER NAME "A909".
    NOW IAM SETTING OT "LP01".
    GS_PRINT-PRINT = 'X'.
    P_PRINTR = 'LP01'.
    CALL FUNCTION 'UPDATE_DEFAULT_PRINTPARAMS'
    EXPORTING
    USER = SY-UNAME
    DESTINATION = P_PRINTR
    IMMEDIATELY = ' '
    RELEASE = 'X'
    NEW_LIST_ID = 'X'.
    SY-BATCH = 'X'
    CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK = G_CONSISTENCY_CHECK
    I_STRUCTURE_NAME = 'KNA1'
    IS_VARIANT = GS_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT = GS_LAYOUT
    IS_PRINT = GS_PRINT
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING = GT_EXCLUDE
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = ITAB2[]
    IT_FIELDCATALOG = GT_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    others = 4
    After running this program iam getting the default printer spool request number 'A909', Iam not getting printing form 'LP01'.
    Need is to send the print to given printer (LP01), here printer may varry accoring to the selection. So nee is to set the printer that which has choosen.
    Please give me the valuble solution as early as possible.
    Please solve this as early as possible.

    Hi Ravi,
    You can choose for the print version to be created as a PostScript file instead of a PDF document. The PostScript file is then sent directly to a printer of your choice
    If you do not specify an output device here, a PDF file is generated and displayed on the screen.
    You use the methods of the interface class IF_SALV_WD_PDF_SETTINGS for this (implementing class CL_SALV_WD_CONFIG_TABLE).
    <b>Function</b>                      <b>Method</b>
    Set ALV output to be printed immediately -->  SET_PRINT_IMMEDIATE
    Check whether the ALV output is to be printed immediately --> GET_PRINT_IMMEDIATE
    Set printer -->  SET_PRINTER
    Get printer --> GET_PRINTER
    See the below for SAP link
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/27472def40601ee10000000a422035/content.htm
    see the thread also
    Re: How to set the printer in set_table_for_first_display
    mark all the helpful answers
    Regards
    Sudheer

  • Problem while setting PF_status in ALV Grid Display

    Hi,
    i have a final internal table with first field as a check box. I have delete button on application tool-bar, with usercommand and pf status defined for it.
    Once the output is displayed  i should have the option of checking the line (check box) and delete then records from the list.
    problem here is once i check the box and click on delete button is not getting deleted. but instead if i check the box and double click on the line(ie f2 fuctionality) and then click on refresh, then the records are getting deleted.
    i have not provided and pf status for f2 functionality, by default its getting activated before the delete fuctionality is called. 
    i have attached my code below.
    DATA : fk_events   TYPE slis_t_event,
           f_user_command TYPE slis_formname VALUE 'USER_COMMAND',
           f_status TYPE slis_formname VALUE 'STANDARD_SP01',
           fieldnam(10) TYPE c.
    DATA:  gs_layout TYPE slis_layout_alv.
    DATA: ls_event TYPE slis_alv_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        i_list_type = 0
      IMPORTING
        et_events   = fk_events.
    READ TABLE fk_events INTO ls_event WITH KEY name = slis_ev_user_command
    IF sy-subrc = 0.
      MOVE f_user_command TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    READ TABLE fk_events INTO ls_event WITH KEY name =
                              slis_ev_pf_status_set
    IF sy-subrc = 0.
      MOVE f_status TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                 = 'ZWR_SECOND_TO_CREATION1'
    i_callback_pf_status_set          =  f_status
       i_callback_user_command           =  f_user_command
       it_fieldcat                        = gt_fieldcat[]
       it_events                         = fk_events[]
      TABLES
        t_outtab                          = gt_final[]
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
    FORM user_command USING r_comm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      fieldnam = rs_selfield-fieldname.
      CASE r_comm.
        WHEN  'DELETE''.
          LOOP AT gt_final INTO gk_final.
    IF gk_final-del_sat = 'X'.
              DELETE gt_final WHERE vbeln = gk_final-vbeln.
            ENDIF.
            rs_selfield-refresh = 'X'.
    ENDLOOP.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    FORM standard_sp01 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'RAM' EXCLUDING extab.  " For PF-Status
    ENDFORM.                    "STANDARD_SP01
    i wud be very thankful if someone cud help me
    thanx
    ram

    Hi,
    i have a final internal table with first field as a check box. I have delete button on application tool-bar, with usercommand and pf status defined for it.
    Once the output is displayed  i should have the option of checking the line (check box) and delete then records from the list.
    problem here is once i check the box and click on delete button is not getting deleted. but instead if i check the box and double click on the line(ie f2 fuctionality) and then click on refresh, then the records are getting deleted.
    i have not provided and pf status for f2 functionality, by default its getting activated before the delete fuctionality is called. 
    i have attached my code below.
    DATA : fk_events   TYPE slis_t_event,
           f_user_command TYPE slis_formname VALUE 'USER_COMMAND',
           f_status TYPE slis_formname VALUE 'STANDARD_SP01',
           fieldnam(10) TYPE c.
    DATA:  gs_layout TYPE slis_layout_alv.
    DATA: ls_event TYPE slis_alv_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        i_list_type = 0
      IMPORTING
        et_events   = fk_events.
    READ TABLE fk_events INTO ls_event WITH KEY name = slis_ev_user_command
    IF sy-subrc = 0.
      MOVE f_user_command TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    READ TABLE fk_events INTO ls_event WITH KEY name =
                              slis_ev_pf_status_set
    IF sy-subrc = 0.
      MOVE f_status TO ls_event-form.
      MODIFY fk_events FROM ls_event TRANSPORTING form WHERE name =
    ls_event-name.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                 = 'ZWR_SECOND_TO_CREATION1'
    i_callback_pf_status_set          =  f_status
       i_callback_user_command           =  f_user_command
       it_fieldcat                        = gt_fieldcat[]
       it_events                         = fk_events[]
      TABLES
        t_outtab                          = gt_final[]
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
    FORM user_command USING r_comm TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      fieldnam = rs_selfield-fieldname.
      CASE r_comm.
        WHEN  'DELETE''.
          LOOP AT gt_final INTO gk_final.
    IF gk_final-del_sat = 'X'.
              DELETE gt_final WHERE vbeln = gk_final-vbeln.
            ENDIF.
            rs_selfield-refresh = 'X'.
    ENDLOOP.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    FORM standard_sp01 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'RAM' EXCLUDING extab.  " For PF-Status
    ENDFORM.                    "STANDARD_SP01
    i wud be very thankful if someone cud help me
    thanx
    ram

  • Set cursor to ALV objects from portal

    Hi,
    I am trying to pull a report from SEM cockpit by integrating it with portal.
    For retrieving that report i need to select and click on a particular ALV OBJECT in that frame.I tried passing sy-ucomm as okcode from portal but it didnot workout as it is not selecting the report.
    Any suggestions on how to do it?
    Thanks in advance
    Madhuri

    Hi,
    Thanks for the reply,
    I am trying to run the job from "build registry search index" but it remains in "queue" state and its status is not changing.
    I have confirmed process scheduler status by running another job from there and that job was executed/posted successfully but this job is still in queue state.
    Can any one help me in this regard?

  • How to set Cursor position in ALV

    Hi,
    i have an issue that how can i set cursor in alv grid.
    i am using alv function modules.
    if user enters wrong info (i have one input enabled filed) then i must show this row as first row and place the cursor in that wrong entry column.
    does anybody worked on this kind of issue..?if so,plz send me the example code
    Thanks

    I think that you have to use OO ALV and use
    CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
       EXPORTING
          IS_ROW_ID    =   <structure of type LVC_S_ROW > ( obsolete )
          IS_COLUMN_ID =   <structure of type LVC_S_COL >
          IS_ROW_NO    =   <structure of type LVC_S_ROID >.
    Hopefully, you can find the object reference of you REUSE ALV by using FM 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    (But i never try it)
    Regards.

  • How to control edit checks on alv grid fields

    I have set up an alv grid that allows for user input. 
    The fields are defined from the data dictionary. 
    Edit checks are happening on all fields, but I would like to turn that off for some fields. 
    How is that controlled?
    Regards!

    u need to define ur own field catalog for this purpose, for the fields for which u want to set check box, add property like this
      X_FIELDCAT-FIELDNAME = 'LIFNR'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-SELTEXT_L  = 'VENDOR'.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN  = 10.
      X_FIELDCAT-COL_POS    = 1.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'BUKRS'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-CHECKBOX = 'X'.
      X_FIELDCAT-SELTEXT_L  = 'COMPANY'.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN  = 4.
      X_FIELDCAT-COL_POS    = 2.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            I_PROGRAM_NAME         = SY-REPID
            I_INTERNAL_TABNAME     = 'IT_FINAL'
            I_INCLNAME             = SY-REPID
          CHANGING
            CT_FIELDCAT            = IT_FIELDCAT
          EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR          = 2
            OTHERS                 = 3.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM = SY-REPID
            IS_LAYOUT          = L_LAYOUT
            IT_FIELDCAT        = IT_FIELDCAT
          TABLES
            T_OUTTAB           = IT_FINAL
          EXCEPTIONS
            PROGRAM_ERROR      = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    u can even check program BCALV_EDIT_05, award points if found helpful

  • Selecting both - Column and Rows in ALV Grid

    Hi All,
    I am developing a module pool in which in a ALV Grid Display the user wants to select multiple rows and multiple columns.
    How to set this in ALV grid? Right now I can set selection of multiple rows but once user clicks on column the rows are deselected and the column gets selected.
    Similarly when user selects on one column and clicks on another column the previous selected column gets deselected.
    Is there any way to do this in ALV Grid?
    Thanks,
    Rashmi.
    PS: I am using OO ALV for this development.

    Hi Andrey,
    I know this. I was just trying to find out if there is some other alternative to this.
    Anyways, this seems to be the only choice.
    Thanks,
    Rashmi.

  • Set cursor alv grid (not using objects)

    I got a question on ALV GRID (not using objects), please let me know if you have pointers. Thanks.
    Output has 2 screens both has different contents. The output is generated using internal table1 and 2 and using FM  'REUSE_ALV_GRID_DISPLAY_LVC'  (both screen use same FM).
    First screen has multiple pages of output (say 10 pages). User scrolled page 5 and line 10 of first screen and then double clicked it takes to screen #2. After completion of screen #2, the back arrow should get back to page 5 and line 10 of screen #1. Currently the back arrow gets to screen#1 page 1 and line 1. How to remember the cursor position in alv grid and instruct the cursor to go there?
    Appreciate the input.
    Note: I tried "set cursor line n" with "Scroll" command but no luck. http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htm

    Thanks for the inputs.
    FYI, I got it implemented using method  CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
    The method is called by 'REUSE_ALV_GRID_DISPLAY_LVC' form 'PF_STATUS_SET' when the ALV grid output is presented each time.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_bypassing_buffer       = 'X'
          i_callback_program       = gc_repid
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout_lvc            = lwa_layout
          it_fieldcat_lvc          = git_fc_lvc
          i_default                = ' '
        TABLES
          t_outtab                 = git_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      FORM alv_event_pf_status_set USING rt_extab                
                                 TYPE slis_t_extab.
      DATA lo_ref1 TYPE REF TO cl_gui_alv_grid.
    *Get the reference to class "lo_ref1" for the ALV report
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = lo_ref1.
    *set the focus of cursor in ALV
      CALL METHOD lo_ref1->set_current_cell_via_id
        EXPORTING
          is_row_no = gv_row. "row number where you want to focus the cursor
      ENDFORM.

  • Alv grid: how to set cursor to the next field

    Hi Abapers,
    When I input the data in first cell and do a tab for coming to next cell to give the input it is coming back to my first cell in the ALV grid.
    Any idea's on how do I deal with this.
    Many Thanks,
    Jagan.

    Hi Group,
    Finally I got the solution for this, here is the stuff we need to do:
    ***********04/03/2010
    *----Get the current cell
                CALL METHOD wa_grid->get_current_cell
                  IMPORTING
                    es_col_id = li_col
                    es_row_no = li_rows.
    **--Get Scroll Position
                CALL METHOD wa_grid->get_scroll_info_via_id
                  IMPORTING
                    es_col_info = ls_col
                    es_row_no   = ls_num.
    ***********04/03/2010
                CALL METHOD wa_grid->refresh_table_display.
               CLEAR: wa_profile1.     ", wa_pro_new.
    ********04/03/2010
    *--Set Scroll Position
                CALL METHOD wa_grid->set_scroll_info_via_id
                  EXPORTING
                    is_col_info = ls_col
                    is_row_no   = ls_num.
    *----Set the cell information
                ls_row-index = li_rows-row_id.
                CALL METHOD wa_grid->set_current_cell_via_id
                  EXPORTING
                    is_row_id    = ls_row
                    is_column_id = li_col
                    is_row_no    = li_rows.
    ********04/03/2010
    Hope this info might be useful to anyone facing the similar issue.
    Cheers,
    Jagan.

  • Cursor position in alv grid

    Hi,
    How can control cursor posiotion in alv grid,
    plz help me.
    Regards,
    venkat.

    hiiii
    you can use SET or GET cursor statement of ABAP.that will help you to get cursor position & to set cursor position also
    regards
    twinkal

Maybe you are looking for

  • How can I get the love back?

    Remember the anthem in 1984? The call for independence? The hammer that shattered the drone which kept us all in line - servants to the man? I do. I begged the hammer to be thrown and cheered when the glass shattered. I evangelized for the awakening

  • Keyword searches

    I have some photos with keywords that when searched for shows up with other photos that doesn't have the keyword assigned to them, and a couple of photos tag along that does not have any keywords assigned to them. What's wrong with iPhoto and keyword

  • Error:l_time_building_block_id : -2

    Hi All, When iam creating the time card from the api When iam runnig these Wrapper iam getting the Value id in Negative , Can  you pls help me, declare l_tc_bb_id   HXC_TIME_BUILDING_BLOCKS.TIME_BUILDING_BLOCK_ID%TYPE; l_tbl_timecard_info hxc_self_se

  • Layout problem in browser

    Hi guys how r u i am having problem with report layout in browser i created this report and it works fine in reports builder and i call it from form works fine but with no lines nothing i dont know where is the problem is it from browser or report kn

  • LiveType will not work

    Hey Everyone, We have a G5 Dual2 w/OSX 10.3.9 running FCP4.5 and LiveType 1.2 I know we have not upgraded yet but we are an affiliate and not an O&O. Here's the problem: We create a cg text in LT and save the .ipr file to one of the hard drives. We t