Populate a field on TAB press in ALV Grid (OOPs)

Hi Experts,
I have an ALV(oops) with cl_gui_alv_grid. I have a field MATNR as empty and when i input a value and i press TAB key d anit should go to next field (next coulmn) to fill the  old material# which can be got from MARA.
I am not able to get the sy-ucomm or e_ucomm for TAB press.
Q) WHERE should i write my query logic to fill the OLD MAtnr field.
code sample : I have data change event as below.
class lcl_event_handler definition
PUBLIC SECTION .
    METHODS:
  changed_data for event data_changed of cl_gui_alv_grid importing er_data_changed
                                                                           e_ucomm sender,
ENDCLASS.
in Implemntation class...
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
METHOD changed_data.
    clear:      ls_stable-row, ls_stable-col.
   loop at er_data_changed->mt_mod_cells into ls_modified.
    clear wa_outdisp.
    READ TABLE gt_outdisp INTO wa_outdisp INDEX ls_modified-row_id.
    CHECK sy-subrc EQ 0.
    lv_field =  ls_modified-fieldname.
    if lv_field = 'MATNR'.
      wa_outdisp-MATNR = ls_modified-value.
      wa_outdisp-bismt = '123'.
    endif.
    MODIFY gt_outdisp FROM wa_outdisp INDEX ls_modified-row_id.
    ls_stable-row = 'X'.
    ls_stable-col = 'X'.
    grid->refresh_table_display( exporting is_stable = ls_stable  ).
    endloop.
  ENDMETHOD.                    "changed_data
ENDCLASS.
How can i do this?
Thanks
Dan

Max,
Yes i am using that event. I am using it before grid -> set_first_display method.
The debugger is not stopping inside the data change method when i placed a break point.
I am using refresh method also.
My code for  sy-ucomm is as below.
when'NEWROW '
    when others.
      CALL METHOD cl_gui_cfw=>dispatch
        IMPORTING
          return_code = w_return_code.
      CALL METHOD grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_modified.

Similar Messages

  • Set a field to blank in an ALV grid control

    Hi,
    Does anyone know how to set a field to blank using an ALV grid control?
    Currently, my program displays 0.000 in a field patterned after EKPO-MENGE, but i want it to just display a blank field.
    Thanks!

    HI
    GOOD
    HOW CAN YOU KNOW THAT WHICH FILED VALUE IS 0.000 ,IF YOU CAN KNOW THIS THAN STORE THAT VALUE INTO A BLANK STRING AND PASS THROUGH THE FIELD CATALOG.I HOPE IT WILL WORK.
    THANKS
    MRUTYUN

  • Dynamically change in size of the custom container using ALV GRID (OOPS)

    Hi Gurus!!!!
    I have an issue with the output of the report which is developed using ALV GRID (OOPS). I have used the custom container occupying full screen (Screen painter). When I execute the report using my PC the output displays report as expected in full screen. The problem is when we execute this report in 19 INCH monitor then there is always gap below the report.
    As per my understanding we should have a code to change the size of custom container dynamically.
    Please suggest some help on this.
    Thanks,
    Hemal Shah

    Hi,
    If you set the attributes, Resizing - Vertical and Horizontal for the customer container, than system will resize the size of the custome continer as per the resolution.
    Hope it helps,
    Sumana

  • To have a list in a field of a row in ALV Grid

    Dear Colleagues,
    My question is that in an ALV Grid we have a number of rows.
    Now in the row suppose i want one field as a drop down list with definite values is it possible..??
    If so is there a function module to do this..??
    Thanks and Regards
    Varun

    That was very helpful, But unfortunately that only allows only a pre defined list to be displayed....
    I want a new drop down list for each record..??
    Would that be possible..???
    Is there any module for that...????

  • ICON with field contents in case of ALV GRID

    please have a look at the program. the output of the program display ICONS with the field contents.
    I wanted the same functionality in case of GRID layout.
    But in case of GRID layout I am only getting ICON without field contents.
    In this Example
    if I use ALV LIST the ouput will be STACk ICON with X
    IF I use ALV GRID the output will be STACK ICON.
    REPORT ZTEST_SO1 .
    type-pools : slis.
    data : result(25).
    types : BEGIN OF Ty_MARA,
            gv_flag type char25,
            end of ty_mara.
    data : gt_mara type standard table of ty_mara,
           wa_mara type ty_mara.
    DATA : gt_fieldcat type slis_t_fieldcat_alv,
           wa_fieldcat type slis_fieldcat_alv.
    wa_fieldcat-fieldname = 'GV_FLAG'.
    APPEND WA_FIELDCAT TO GT_FIELDCAT.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
       name                        = '@3B@'
       TEXT                        = 'X'
       INFO                        = 'YY'
       ADD_STDINF                  = 'X'
    IMPORTING
       RESULT                      = wa_mara-gv_flag.
    IF sy-subrc EQ 0.
    APPEND WA_MARA TO GT_MARA.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = 'ZTEST_SO1'
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
       IT_FIELDCAT                    = GT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = GT_MARA
    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.

    Read the documentation of FM ICON_CREATE, the purpose of the Function module is entirely different from what you are using it for.
    To print Icons in ALV (Using FMs ) all you need to do is to send the Icon name in the field.
    Also parameters TEXT and INFO of FM ICON_CREATE seem to be flags, that are appended to the icon name so that when you set it on the screen the appropriate info or Text is shown.

  • F4 field is called first in ALV Grid

    Hello All,
    I have a strange issue where in I have 4 fields in alv grid.
    Last field is having the F4 help facility.
    When clicking on creating new row in the grid, automatically the control is going on to the last field (f4 field) and is getting called first and showing an error to fill in the values.
    I want the control to go from first field to the last field.
    Can you please help me out from this situation?
    Thanks and Regards,
    Kumar.

    Hi ,
       Try to pass the column position via Fieldcatalog table.Please find the below code for reference.
    Perform build_fieldcatalog.
    *-ALV Funtion module
       CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = v_repid
          is_layout                = it_layout
          it_fieldcat               =  st_fieldcat2[]
          it_events                = it_events[]
        TABLES
          t_outtab                 = it_disp[].
    Form build_fieldcatalog.
      data: l_fieldcat type slis_fieldcat_alv.
      data: l_numc type i.
      clear l_fieldcat.
      l_fieldcat-fieldname     = 'VBELN'.
      l_fieldcat-ref_fieldname = 'VBELN'.
      l_fieldcat-seltext_m     = text-t01.
      l_numc = l_numc + 1.                       " This will be used for generating Position Number
      l_fieldcat-col_pos       =  l_numc.       "ALV Column Position Number ( i.e Col_pos = '1'.)
      append l_fieldcat to st_fieldcat2.
      clear l_fieldcat.
      l_fieldcat-fieldname     = 'POSNR'.
      l_fieldcat-ref_fieldname = 'POSNR'.
      l_fieldcat-seltext_m     = text-t02.
      l_numc = l_numc + 1.
      l_fieldcat-col_pos       =  l_numc.        "ALV Column Position Number ( i.e Col_pos = '2'.)
      append l_fieldcat to st_fieldcat2.
      clear l_fieldcat.
    endform.                    " BUILD_FIELDCATALOG
    Hope this will be helpful.
    Regards,
      Srinivas

  • RE:ALV grid (oops concept)-to make selected row editable

    Hi,
    I have an object oriented alv which is having 5 rows of data.I have a pushbutton to make any row in editable mode.My requirement is i will select any row in oops alv grid and press
    the button to make the row editable.How can i do this in oops alv.
    thanks,
    Alex

    Hi,
    Use the Link [http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm]
    Check demo pgm BCALV_EDIT_05.
    *& Report ZUS_SDN_ALVGRID_EDITABLE_8
    *& Description: editable ALV -> ENTER jumps to next row
    *& Dynpro flow logic: no screen elements, ok_code = GD_OKCODE
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    REPORT zus_sdn_alvgrid_editable_8.
    DATA:
    gd_repid TYPE syst-repid,
    gd_okcode TYPE ui_func,
    gt_fcat TYPE lvc_t_fcat,
    go_docking TYPE REF TO cl_gui_docking_container,
    go_grid TYPE REF TO cl_gui_alv_grid.
    DATA:
    gt_knb1 TYPE STANDARD TABLE OF knb1.
    CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS:
    handle_data_changed
    FOR EVENT data_changed OF cl_gui_alv_grid
    IMPORTING
    er_data_changed
    e_onf4
    e_onf4_before
    e_onf4_after
    e_ucomm
    sender.
    ENDCLASS. "lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
    METHOD handle_data_changed.
    define local data
    cl_gui_cfw=>set_new_ok_code( 'NEXT_ROW' ). " not possible on 4.6c
    CALL METHOD cl_gui_cfw=>set_new_ok_code
    EXPORTING
    new_code = 'NEXT_ROW'
    IMPORTING
    RC =
    " Triggers PAI of dynpro with ok_code = 'NEXT_ROW'
    ENDMETHOD. "handle_data_changed
    ENDCLASS. "lcl_eventhandler IMPLEMENTATION
    PARAMETERS:
    p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
    START-OF-SELECTION.
    SELECT * FROM knb1 INTO TABLE gt_knb1
    WHERE bukrs = p_bukrs.
    Create docking container
    CREATE OBJECT go_docking
    EXPORTING
    parent = cl_gui_container=>screen0
    ratio = 90
    EXCEPTIONS
    OTHERS = 6.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Create ALV grid
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_docking
    EXCEPTIONS
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    " Triggers event DATA_CHANGED when ENTER is pushed
    CALL METHOD go_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_enter
    EXCEPTIONS
    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.
    SET HANDLER:
    lcl_eventhandler=>handle_data_changed FOR go_grid.
    Build fieldcatalog and set hotspot for field KUNNR
    PERFORM build_fieldcatalog_knb1.
    Display data
    CALL METHOD go_grid->set_table_for_first_display
    CHANGING
    it_outtab = gt_knb1
    it_fieldcatalog = gt_fcat
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Link the docking container to the target dynpro
    gd_repid = syst-repid.
    CALL METHOD go_docking->link
    EXPORTING
    repid = gd_repid
    dynnr = '0100'
    CONTAINER =
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ok-code field = GD_OKCODE
    CALL SCREEN '0100'.
    END-OF-SELECTION.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STATUS_0100'.
    SET TITLEBAR 'xxx'.
    CALL METHOD go_grid1->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    EXCEPTIONS
    FINISHED = 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.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE user_command_0100 INPUT.
    go_grid->check_changed_data( ).
    CASE gd_okcode.
    WHEN 'BACK' OR
    'END' OR
    'CANC'.
    SET SCREEN 0. LEAVE SCREEN.
    " NOTE: ENTER button alone works apparently only if the cursor
    " is placed within the command window (left-upper corner)
    WHEN 'ENTER' OR
    'NEXT_ROW'.
    PERFORM set_cursor_next_row.
    WHEN OTHERS.
    ENDCASE.
    CLEAR: gd_okcode.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form BUILD_FIELDCATALOG_KNB1
    text
    --> p1 text
    <-- p2 text FORM build_fieldcatalog_knb1 .
    define local data
    DATA:
    ls_fcat TYPE lvc_s_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    i_structure_name = 'KNB1'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_BYPASSING_BUFFER =
    I_INTERNAL_TABNAME =
    CHANGING
    ct_fieldcat = gt_fcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT gt_fcat INTO ls_fcat
    WHERE ( fieldname = 'ZUAWA' ).
    ls_fcat-edit = abap_true.
    ls_fcat-col_opt = abap_true.
    MODIFY gt_fcat FROM ls_fcat.
    ENDLOOP.
    ENDFORM. " BUILD_FIELDCATALOG_KNB1
    *& Form SET_CURSOR_NEXT_ROW
    text
    --> p1 text
    <-- p2 text FORM set_cursor_next_row .
    define local data
    DATA:
    ls_row TYPE lvc_s_row,
    ls_col TYPE lvc_s_col.
    CALL METHOD go_grid->get_current_cell
    IMPORTING
    E_ROW =
    E_VALUE =
    E_COL =
    es_row_id = ls_row
    es_col_id = ls_col
    ES_ROW_NO =
    ADD 1 TO ls_row-index. " next row
    CALL METHOD go_grid->set_current_cell_via_id
    EXPORTING
    is_row_id = ls_row
    is_column_id = ls_col
    IS_ROW_NO =
    ENDFORM. " SET_CURSOR_NEXT_ROW
    HTH
    Regards,
    Dhruv Shah

  • How to decrease the row height in ALV Grid (OOPS).

    HI Experts,
    I have displayed ALV Grid using CL_GUI_ALV_GRID=>SET_TABLE_FOR_DISPLAY.
    I want to decrease the row height and width.
    Can any one suggest how to do this?
    Regards,
    Kumar.

    Hi Kumar,
    Row height it predefined and you won't change it, but you can adjust column width.
    For that use field COL_OPT of layout structure ( type LVC_SLAYO ) to optimize all columns width, or set explicit width using field catalog, setting field OUTPUTLEN for certain column.
    Regards
    Marcin

  • ALV Grid OOPS error

    Hi all,
    I am using ALV oops for displaying table.
    CL_GUI_ALV_GRID->set_table_for_first_display.
    I  have cretaed an Custom Container for this.
    Now scenario is like, First i have to display normal classical report when user double click on classical report
    it will show alv grid on other screen depending on the row of report user clicks i am picking data and showing it on other screen as ALV grid.
    First time its showing correct data when i press back on ALV grid screen and came back on report screen and select other row and double click  its not showing anything ..
    Please help.
    Its required very urgently by client.
    Thanks in advance..
    Harsh

    Hi,
    Check whether the internal table in which you are passing data to the grid has the correct data.
    Do not call the method set_table_for_first_display once again.
    Instead call the method REFRESH_TABLE_DISPLAY.
    Call the method SET_TABLE_FOR_FIRST_DISPLAY only once when the ALV grid object is created.
    Call the method  flush of the class cl_gui_cfw in the PBO after the grid is displayed; after the method SET_TABLE_FOR_FIRST_DISPLAY
    Check if this works.
    Regards,
    Ankur Parab

  • RE:ALV grid (oops concept)

    Hi,
    I have an object oriented alv which is having 5 rows of data.I have a pushbutton to make any row in editable mode.My requirement is i will select any row in oops alv grid and press
    the button to make the row editable.How can i do this in oops alv.
    Can anyone send a sample code for this.
    Thanks in advance,
    Alex.

    See I have an internal table I_output.
    and u create a button by name  vald or ente. and then try to implement the below code.
    if u still not cleared just give me your mail id, i will send u a program i which we have the same functionality.
    WHEN 'VALD' OR 'ENTE'.
            CALL METHOD grid1->check_changed_data.
            CALL METHOD grid1->get_selected_rows
              IMPORTING
                et_index_rows = i_index_rows.
            IF i_index_rows IS INITIAL.
              MESSAGE i000 WITH 'Select Rows to be Saved'.
              EXIT.
            ENDIF.
            LOOP AT i_index_rows INTO wa_index_rows.
              CLEAR: wa_output.
              READ TABLE i_output INDEX wa_index_rows-index INTO wa_output.
              MOVE-CORRESPONDING wa_output TO wa_insert.        "#EC ENHOK
              wa_insert-changed_by = sy-uname.
              wa_insert-change_date  = sy-datum.
              wa_insert-change_time = sy-uzeit.
              APPEND wa_insert TO i_insert.
            ENDLOOP.
            CLEAR: flg_upd.”flag
            LOOP AT i_insert INTO wa_insert.
              PERFORM f0005_validate_data.
              CLEAR: wa_insert, flg_err.
            ENDLOOP.
            IF e_ucomm = 'VALD'.
              IF NOT i_insert[] IS INITIAL.
                LOOP AT i_insert INTO wa_insert.
                  UPDATE zfocp_details SET date_ack_rec = wa_insert-date_ack_rec
                                           time_ack_rec = wa_insert-time_ack_rec
                                           changed_by   = wa_insert-changed_by
                                           change_date  = wa_insert-change_date
                                           change_time  = wa_insert-change_time
                                       WHERE text = wa_insert-text
                                       AND   laufd = wa_insert-laufd
                                       AND   laufi = wa_insert-laufi
                                       AND   absbu = wa_insert-absbu
                                       AND   rzawe = wa_insert-rzawe
                                       AND   hbkid = wa_insert-hbkid
                                       AND   hktid = wa_insert-hktid
                                       AND   date_sent = wa_insert-date_sent
                                       AND   time_sent = wa_insert-time_sent.
                  IF sy-subrc = 0.
                    MESSAGE s000(zf_ebb1) WITH 'Records saved successfully'.
    Endif.

  • Reg displaying a Field as Drop Down in ALV Grid Display

    Hi All,
    I have developed an ALV report program with one editable field using FM "REUSE_ALV_GRID_DISPLAY_LVC". My requirement is to make that editable field as dropdown box so that user can choose from the options. If i press SAVE all those will gets saved in a Ztable. Everything is working fine. But no values are getting populated in dropdown box.
    Kindly do the needful.
    Thanks in advance.

    Hi,
    Check out follwing subroutines in below programs.
    perform build_fieldcat changing pt_fieldcat.
    perform set_drdn_table.
    BCALV_EDIT_06
    BCALV_EDIT_07

  • Dump when changing the value for a field (of 13 decimals) in alv grid.

    Hi Group,
    Its giving a dump when user is trying to change the value.
    dump description: Unable to interpret "70,000 " as a number.
    what is happening here is, the original value is 50,000 and he is deleting 5 and replacing it with 7, here its throwing the dump.
    If he removes the complete number 50,000 and then gives 70000 its  taking the value.
    I tried to use, the decimals options in alv field catalog but to no joy.
    Please can you give me an advice on this.
    Many Thanks.

    the problem is the comma in the 70,000....that's an alpha character.... Normally, we expect SAP to display numeric fields in a appropriate format, based upon their numeric type, but trying to forcibly insert '70,000' into a true numeric-type field can generate an 'unable to interpret xxx,xxxx  as number' error.
    You could experiment with changing your ALV column to a char17 (or appropriate width) and putting your numeric value into that to display, then converting back to type P, or other field type in the table, in a column that is not displayed, when the user changes the value....  essentially two columns, one not displayed with a routine to copy/convert the numeric field into the alpha field and the reverse when the field is changed.
    But, the better solution is probably for the user to understand that they're seeing a formatted numeric field, and that they need to replace the entire value with the only possible punctuation being a decimal and (if necessary) a negative sign.

  • New field in ME28 output in ALV grid

    Dear All,
    In ME28 - PO release transection code, when we run in ALV gird, we have a TAX code field but not the tax code description.
    Can we have this, if yes let me know the procedure.
    Thanks,
    SAmir Bhatt

    Hi,
    As per my knowledge, system will not allow to add the " Description of Tax Code". Plz check in customization for Reporting.
    Regards,
    Raghunath

  • How to fill field with test data in alv grid display

    hi all,
    i m adding field TEXT to the structure for displaying grid.
    i m modifying program like this
    DATA: ALV_OUTPUT  LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
    TYPES : BEGIN OF FS_OUTPUT .
          TEXT(20) TYPE C.
            INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
    TYPES       TEXT(20) TYPE C.
    TYPES    END OF FS_OUTPUT.
    DATA: fs_output like table of alv_output.
    CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'TEXT'.
      WA_FIELDCAT-seltext_l = 'Abteilungs Struktur'.
      wa_fieldcat-tabname   = 'ALV_OUTPUT'.
      WA_FIELDCAT-COL_POS  = '13'.
      APPEND WA_FIELDCAT TO P_GT_FIELDCAT.
    this is what i have write for diapalying field. but my question is how to fill test data with field TEXT.I m writing like this but not executed in the aboove grid dispaly statement.
    loop at alv_output.
    *alv_output-text(20)  = 'abcdefgh'.
    *modify alv_output.
    *endloop.
    plz tell me how to fill test data

    hI..,
    Your table declaration has to be like this..
    TYPES : BEGIN OF FS_OUTPUT .
    INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
    TYPES TEXT(20) TYPE C.
    TYPES END OF FS_OUTPUT.
    DATA: ALV_OUTPUT LIKE standard table of fs_output initial size 0.
    loop at alv_output <b>into fs_output</b>.
    <b>fs</b>_output-text(20) = 'abcdefgh'.
    <b>modify alv_output index sy-tabix from fs_output transporting text.</b>
    endloop.
    Now give this table alv_output to the GRID_DISPLAY function module..
    you will get the required output !!
    Plz do remember to close the thread when ur problem is solved !!
    reward all helpful answers !!
    regards,
    sai ramesh

  • ALV GRID OOPS: Output refresh from data base

    Hi All,
    I have below issue.
    I display ALV and select a row and click a button to transfer stock for the selected row.
    I used BAPI_GOODSMOVEMENT_CREATE to update and after material document got posted, the row should update its stock information.
    Is there any solution without reselecting all data?
    Regards,
    Pratyusha

    You will have to select the latest data from the DB, so prepare the 'ITAB' containing your data again (should work if you change only for this row only).
    I believe after the BAPI commit call, refresh your ALV using REFRESH_TABLE_DISPLAY, modify the itab with new data and then call SET_TABLE_FOR_FIRST_DISPLAY.
    Regards,
    Diwakar

Maybe you are looking for

  • Links go to wrong websites

    If I search something on Google or another search portal, my request brings up a bunch of links like normal. Then when I click on the link it brings me to totally different websites than it's supposed to. This only started after downloading the new v

  • Re-installing Photoshop Elements 12 on 8.1 Windows computer

    Have just re-installed Photoshop Elements 12 ok on my Windows 7 home computer following hard drive failure. For various reasons I have now decided I need to use this computer at work. I will buy new computer for home which will be Windows 8.1. I only

  • Cannot download and install printer software through app store for OS 10.8.5?

    Help! I have a MBP 15" Bought in late 2012.  It is running 10.8.5. I am trying to connect to the printer at my office, an HP CM4730 MFP. When I go through the steps to add a new printer, I get to the message: "Software for this printer is available f

  • Add 1 day to the Month of February on leap year

    I know how to calculate leap year. The calculation is working great. However, I need to add a day to the month of February if a leap year is selected. Do you have any pointers on this? Thanks!

  • Computer freezes whenever I turn on screensaver, and . . .

    System Preferences freezes whenever I try to edit/change the screensaver. I have my mac set to "hot corners" so that if I drag my mouse to the lower right corner, my screensaver will turn on. I sent in my macbook a few weeks ago to have the optical d