Skip to Content

ALV F4 help

Hi All,

I have and editable field in the ALV Grid output... and i have f4 option for that..

when i do f4 and select a value and refresh the alvoutput with '&REFRESH' i am getting an error saying the value is not found in check table eventhough it is present in check table....i have given the refrence field and refrence table also in the fieldcatalog for this field..

helpful answers will be rewarded.\

Thans ,

Bharathi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 24, 2008 at 02:30 PM

    show your code, if it is not lenghty one and not involved Custom tables.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 02:44 PM

    i coded and checked, It is working for me , here is the working example.

    REPORT  ztest_alv.
    TYPE-POOLS: slis.
    
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          wa_fcat LIKE LINE OF it_fcat.
    
    DATA: it_data TYPE vbap_t.
    
    
    SELECT *
      FROM VBAP
      INTO TABLE it_data
      UP TO 20 ROWS.
    
    wa_fcat-fieldname = 'VBELN'.
    wa_fcat-tabname  = 'IT_DATA'.
    wa_fcat-outputlen = 5.
    wa_fcat-edit = 'X'.
    wa_fcat-input = 'X'.
    wa_fcat-ref_fieldname = 'VBELN'.
    wa_fcat-ref_tabname = 'VBAK'.
    wa_fcat-seltext_l = 'Sales Order'.
    APPEND wa_fcat TO it_fcat.
    clear wa_fcat .
    
    wa_fcat-fieldname = 'POSNR'.
    wa_fcat-tabname  = 'IT_DATA'.
    wa_fcat-outputlen = 5.
    wa_fcat-seltext_l = 'Item'.
    APPEND wa_fcat TO it_fcat.
    
    PERFORM display_data.
    
    *&---------------------------------------------------------------------*
    *&      Form  user_command
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    FORM user_command USING ucomm TYPE sy-ucomm
                selfield TYPE slis_selfield.
    
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data .
      ENDIF.
    
      CASE ucomm.
        WHEN '&DATA_SAVE'.
    "  you capture the data and do some thing.
        
      ENDCASE.
    
    ENDFORM.                    "user_command
    
    *&---------------------------------------------------------------------*
    *&      Form  display_data
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    FORM display_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_interface_check       = sy-repid
          it_fieldcat             = it_fcat
          i_callback_user_command = 'USER_COMMAND'
        TABLES
          t_outtab                = it_data
        EXCEPTIONS
          program_error           = 1.
    ENDFORM.                    "display_data

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.