I have created 3 containers. when I made a field of 1st container editable. When the data is entered into a cell and when comming out of the cell it is going to dump. the code is as follows.
IF billet_grid IS INITIAL.
IF it_billet IS INITIAL.
DO 20 TIMES.
it_billet-prod_order = sy-index.
it_billet-actual_qty = sy-index + 1.
APPEND it_billet.
ENDDO.
ENDIF.
*data o_docking TYPE REF TO cl_gui_docking_container."Docking Container
*Create Custom Container Instance
CREATE OBJECT o_docking
EXPORTING ratio = '15'.
*
data w_variant type disvariant.
CREATE OBJECT billet_ccontainer
EXPORTING
container_name = custom_control_billet.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*ALV Grid Instance
CREATE OBJECT billet_grid
EXPORTING
i_parent = billet_ccontainer.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*Fieldcatalog
fieldcat 'PROD_ORDER' 'C' '12' 'Prod Order' 'Prod Order' 'X' 'X'.
fieldcat 'PLANNED_QTY' 'Q' '13' 'Planned Qty' 'Planned Qty' ' ' 'X'.
fieldcat 'ACTUAL_QTY' 'C' '13' 'Actual Qty' 'Actual Qty' 'X' 'X'.
fieldcat 'SALES_ORDER_CIR' 'C' '15' 'Sales Order/CIR' 'Sales Order/CIR' ' ' ' '.
fieldcat 'SALES_ORDER_ITEM' 'C' '16' 'Sales Order/CIR Item' 'Sales Order/CIR Item' ' ' ' '.
fieldcat 'MATERIAL_CODE' 'C' '18' 'Material Code' 'Material Code' ' ' ' '.
PERFORM it_toolbar_exclude CHANGING pt_exclude.
layout 'X' 'X' 'BILLER ORDERS' 'A' ' '.
*Register Edit Event
CALL METHOD billet_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
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.
w_variant-report = sy-repid.
CALL METHOD billet_grid->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = 'A'
is_layout = layout
it_toolbar_excluding = pt_exclude
CHANGING
it_outtab = it_billet[]
it_fieldcatalog = fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
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.
ELSE.
SORT it_billets BY billets.
CALL METHOD billet_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
ENDIF.
Can any body please solve my probelm.
Thanks in advance