ALV- Changing the output data and saving in database

hi friends,
I have to change the material description in the output and have to save the changes in database..
For changing the description I have to raise a pop-up, then I have to give the required change and then save..
How to do it?
My code is as follows:
TABLES : vbrk,vbrp,vbpa,adrc.
TYPE-POOLS : slis.
DATA: w_report_id  LIKE sy-repid.
DATA: w_title    TYPE lvc_title VALUE      'DIPLAY CUSTOMER BILLING DOCUMENT'.
DATA: w_layout   TYPE slis_layout_alv.
DATA: w_fieldcat TYPE slis_t_fieldcat_alv.
DATA: w_events   TYPE slis_t_event.
DATA: w_header   TYPE slis_t_listheader.
DATA: sum LIKE vbrk-netwr.
SELECT-OPTIONS:
     erdat FOR vbrk-erdat,
     vkorg FOR vbrp-vkorg_auft,
     kunag FOR vbrk-kunag.
DATA : BEGIN OF itab OCCURS 0,
       fkdat TYPE vbrk-fkdat,
       kunrg TYPE vbrk-kunrg,
       name1 TYPE adrc-name1,
       vbeln TYPE vbrk-vbeln,
       augru_auft TYPE vbrp-augru_auft,
       netwr TYPE vbrk-netwr,
       waerk TYPE vbrk-waerk,
       vbtyp TYPE vbrk-vbtyp,
       fkart TYPE vbrk-fkart,
       END OF itab.
DATA itab1 LIKE STANDARD TABLE OF itab.
SELECT vbrkfkdat vbrkkunrg adrcname1 vbrkvbeln vbrp~augru_auft
       vbrknetwr vbrkwaerk
       INTO TABLE itab1
       FROM ( ( ( vbrk INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln )
       INNER JOIN vbpa ON vbpavbeln = vbrkvbeln )
       INNER JOIN adrc ON adrcaddrnumber = vbpaadrnr )
       WHERE vbtyp = 'O'
       AND vbrk~erdat IN erdat
       AND vbrp~vkorg_auft IN vkorg
       AND vbrk~kunag IN kunag.
w_report_id = sy-repid.
PERFORM i_layout CHANGING w_layout.
PERFORM i_fieldcat CHANGING w_fieldcat.
SORT itab1 BY waerk fkart .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = 'ZTRAINING2'
    i_grid_title       = w_title
    is_layout          = w_layout
    it_fieldcat        = w_fieldcat
    i_save             = 'A'
  TABLES
    t_outtab           = itab1
  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.
*&      Form  i_fieldcat
      text
     -->P_W_FEILDCAT  text
FORM i_fieldcat  CHANGING p_w_feildcat.
  DATA: l_line_fieldcat TYPE slis_fieldcat_alv.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'FKDAT'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-edit_mask  = '__-__-____'.
  l_line_fieldcat-seltext_m = 'Billing Document date '.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'KUNRG'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Cust no'.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'NAME1'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Name of the reseller'.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'VBELN'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Billing document number'.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'AUGRU_AUFT'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Order reason'.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'NETWR'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Amount'.
  APPEND l_line_fieldcat TO w_fieldcat.
  CLEAR l_line_fieldcat.
  l_line_fieldcat-fieldname = 'WAERK'.
  l_line_fieldcat-ref_tabname = 'ITAB1'.
  l_line_fieldcat-seltext_m = 'Currency'.
  APPEND l_line_fieldcat TO w_fieldcat.
ENDFORM.                    "i_fieldcat
*&      Form  i_layout
      text
     -->P_W_LAYOUT text
FORM i_layout  CHANGING p_w_layout.
  CLEAR w_layout.
  w_layout-colwidth_optimize = 'X'.
  w_layout-edit = 'X'.
ENDFORM.                    " i_layout
Thanks,
Revathi Raju.

Check out the following link for top_of_page event in OOPs ALV.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
You can also check out the following program.
DATA: save_ok LIKE sy-ucomm,
g_container TYPE scrfname VALUE 'CC1',
g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
g_max TYPE i VALUE 100.
* declarations for top of page event
Data: gv_c_split type ref to cl_gui_splitter_container,
gv_c_ptv type ref to cl_gui_container,
gv_alv_ptv type ref to cl_gui_alv_grid,
o_dd_doc TYPE REF TO cl_dd_document,
text TYPE sdydo_text_element,
o_split type ref to cl_gui_easy_splitter_container,
o_top type ref to cl_gui_container,
o_bot type ref to cl_gui_container,
gv_c_vp type ref to cl_gui_container.
* end of declaration for top of page.
CLASS lcl_event_receiver DEFINITION DEFERRED.
*class lcl_application_dc definition deferred.
DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
* g_dc type ref to lcl_application_dc.
DATA: gt_outtab TYPE TABLE OF sbook.
* CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
IMPORTING e_fieldname
es_row_no
er_event_data
et_bad_cells
e_display,
handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
IMPORTING e_dyndoc_id.
METHODS: reset.
METHODS: show_f4.
PRIVATE SECTION.
* attributes for creating an own F4-Help
* (using a second ALV Grid Control
DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
f4_custom_container TYPE REF TO cl_gui_custom_container.
TYPES: BEGIN OF ty_f4.
TYPES: value TYPE s_class.
TYPES: descr(20) TYPE c.
TYPES: END OF ty_f4.
DATA: f4_itab TYPE TABLE OF ty_f4.
DATA: f4_fieldcatalog TYPE lvc_t_fcat.
* attributes to store event parameters
* (after the CALL SCREEN command, the event parameters
* are not accessible)
TYPES: BEGIN OF onf4_event_parameters_type.
TYPES: c_fieldname TYPE lvc_fname.
TYPES: cs_row_no TYPE lvc_s_roid.
TYPES: cr_event_data TYPE REF TO cl_alv_event_data.
TYPES: ct_bad_cells TYPE lvc_t_modi.
TYPES: c_display TYPE char01.
TYPES: END OF onf4_event_parameters_type.
DATA: f4_params TYPE onf4_event_parameters_type.
* Methods to create own F4-Help
* (This is done using a second ALV Grid Control)
METHODS: init_f4.
METHODS: build_fieldcatalog.
METHODS: fill_f4_itab .
METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING es_row_no.
ENDCLASS. "lcl_application_f4 DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
*§2. Implement an event handler method for event ONF4.
METHOD handle_f4.
* Save event parameter as global attributes of this class
* (maybe solved differently if you use a function module!)
f4_params-c_fieldname = e_fieldname.
f4_params-cs_row_no = es_row_no.
f4_params-cr_event_data = er_event_data.
f4_params-ct_bad_cells = et_bad_cells.
f4_params-c_display = e_display.
*§3. Call your own f4 help. To customize your popup check
* first if the cell is ready for input (event parameter E_DISPLAY).
* (parameter E_DISPLAY is checked later in method on_double_click)
* (Probably, you would call a function module at this point,
* pass the needed event parameter and call the popup screen
* within that function module. This is not done in this example
* to avoid scattering its code).
CALL SCREEN 101 STARTING AT 10 10.
*§7. Inform the ALV Grid Control that an own f4 help has been processed
* to suppress the standard f4 help.
er_event_data->m_event_handled = 'X'.
ENDMETHOD. "on_f4
METHOD show_f4.
* DATA: ls_outtab TYPE sbook.
* initialize own f4 help if needed
IF f4_custom_container IS INITIAL.
CALL METHOD init_f4.
ENDIF.
CALL METHOD fill_f4_itab.
* refresh list of values in f4 help and show it
CALL METHOD f4_grid->refresh_table_display.
* CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
* your editable ALV Grid instances while handling events
* DATA_CHANGED or ONf4. You would overwrite intermediate
* values of your output table on frontend.
* 'f4_grid' is a non-editable ALV Grid Control for the
* application specific F4-Help. Therefore, calling
* REFRESH_TABLE_DISPLAY for this instance has no
* negative effect.
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "show_f4
METHOD init_f4.
DATA: ls_f4_layout TYPE lvc_s_layo.
* build fieldcatalog entries for f4
CALL METHOD build_fieldcatalog.
* create controls
CREATE OBJECT f4_custom_container
EXPORTING container_name = 'CC_ONF4'.
CREATE OBJECT f4_grid
EXPORTING i_parent = f4_custom_container.
* hide toolbar
ls_f4_layout-no_toolbar = 'X'.
CALL METHOD f4_grid->set_table_for_first_display
EXPORTING
is_layout = ls_f4_layout
CHANGING
it_fieldcatalog = f4_fieldcatalog
it_outtab = f4_itab.
* register event double click on backend
SET HANDLER me->on_double_click FOR f4_grid.
* flush since 'ls_layout' is local!
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "init_f4
METHOD fill_f4_itab.
DATA ls_f4_itab TYPE ty_f4.
* Delete all entries in f4_itab to determine
* offered values dynamically
CLEAR f4_itab[].
ls_f4_itab-value = 'C'.
ls_f4_itab-descr = text-t03. "Business Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'Y'.
ls_f4_itab-descr = text-t04. "Economie Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'F'.
ls_f4_itab-descr = text-t05. "First Class
APPEND ls_f4_itab TO f4_itab.
ENDMETHOD. "fill_f4_itab
METHOD build_fieldcatalog.
DATA: ls_fcat TYPE lvc_s_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'VALUE'.
ls_fcat-coltext = text-t02.
* ls_fcat-inttype = 'S_CLASS'.
ls_fcat-outputlen = 5.
APPEND ls_fcat TO f4_fieldcatalog.
CLEAR ls_fcat.
ls_fcat-fieldname = 'DESCR'.
ls_fcat-coltext = text-t01.
ls_fcat-inttype = 'C'.
ls_fcat-outputlen = 20.
APPEND ls_fcat TO f4_fieldcatalog.
ENDMETHOD. "build_fieldcatalog
METHOD on_double_click.
*§5. If not already caught by your own f4 help, check whether
* the triggered cell was ready for input by using E_DISPLAY
* and if not, exit.
IF f4_params-c_display EQ 'X'.
LEAVE SCREEN.
ENDIF.
*§6. After the user selected a value, pass it to the ALV Grid Control:
*§ 6a. Define a field symbol of type: LVC_T_MODI and a structure of
* type LVC_S_MODI to pass the value later on.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
DATA: ls_modi TYPE lvc_s_modi,
ls_f4_itab TYPE ty_f4.
*§ 6b. Dereference attribute M_DATA into your field symbol and add
* the selected value to the table to which this symbol points to.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
ls_modi-row_id = f4_params-cs_row_no-row_id.
ls_modi-fieldname = f4_params-c_fieldname.
READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
ls_modi-value = ls_f4_itab-value.
APPEND ls_modi TO <itab>.
LEAVE TO SCREEN 0.
ENDMETHOD. "on_double_click
METHOD reset.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
CLEAR <itab>[].
ENDMETHOD. "reset
METHOD handle_top_of_page.
text = 'Top of page for program ZAMIT_SPLIT_CONTAINER'.
CALL METHOD e_dyndoc_id->add_text
EXPORTING text = text
sap_fontsize = 'LARGE'
sap_style = 'HEADING'.
CALL METHOD e_dyndoc_id->display_document
EXPORTING parent = o_top.
ENDMETHOD. "handle_top_of_page
ENDCLASS. "lcl_application_f4 IMPLEMENTATION
END-OF-SELECTION.
CALL SCREEN 100.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF g_custom_container IS INITIAL.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDIF.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
PERFORM exit_program.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN OTHERS.
* do nothing
ENDCASE.
ENDMODULE. "pai INPUT
* FORM EXIT_PROGRAM *
FORM exit_program.
LEAVE PROGRAM.
ENDFORM. "exit_program
*& Form build_fieldcat
* text
* -->PT_FIELDCAT text
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SBOOK'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
* Exchange smoker field with invoice field - just to
* make the dependance between SMOKER and CLASS more transparent
* (Smoking is only allowed in the first class).
IF ls_fcat-fieldname EQ 'SMOKER'.
ls_fcat-col_pos = 11.
ls_fcat-outputlen = 10.
ls_fcat-edit = 'X'.
* Field 'checktable' is set to avoid shortdumps that are caused
* by inconsistend data in check tables. You may comment this out
* when the test data of the flight model is consistent in your system.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
ls_fcat-col_pos = 7.
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'CLASS'.
ls_fcat-edit = 'X'.
ls_fcat-outputlen = 5.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form create_and_init_alv
* text
* -->PT_OUTTAB text
* -->PT_FIELDCAT text
FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
pt_fieldcat TYPE lvc_t_fcat.
DATA: lt_exclude TYPE ui_functions,
ls_layout TYPE lvc_s_layo.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
* CREATE OBJECT g_grid
* EXPORTING i_parent = g_custom_container.
CREATE OBJECT gv_c_split
EXPORTING
* link_dynnr = lv_dynnr
* link_repid = lv_repid
parent = g_custom_container
rows = 2
columns = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3 .
CALL METHOD gv_c_split->set_border
EXPORTING
border = space.
CALL METHOD gv_c_split->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = gv_c_ptv.
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 1
height = 20
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 6 .
CALL METHOD gv_c_split->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = gv_c_vp .
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 2
height = 10
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 .
CREATE OBJECT o_split
EXPORTING
parent = gv_c_ptv
with_border = 1
EXCEPTIONS
cntl_error = 1
cntl_system_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.
o_top = o_split->top_left_container.
o_bot = o_split->bottom_right_container.
CREATE OBJECT gv_alv_ptv
EXPORTING
i_parent = o_bot
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
CREATE OBJECT g_grid
EXPORTING
i_parent = gv_c_vp
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
PERFORM build_fieldcat CHANGING pt_fieldcat.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM exclude_tb_functions CHANGING lt_exclude.
PERFORM build_data CHANGING pt_outtab.
ls_layout-grid_title = 'F4 help implemented for field CLASS'.
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
no_margins = 'X'.
CALL METHOD gv_alv_ptv->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_outtab = pt_outtab[]
it_fieldcatalog = pt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = lt_exclude
is_layout = ls_layout
CHANGING
it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab[].
CALL METHOD gv_alv_ptv->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_dd_doc.
* register f4 for field CLASS
PERFORM register_events.
* Set editable cells to ready for input initially
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form exclude_tb_functions
* text
* -->PT_EXCLUDE text
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
APPEND ls_exclude TO pt_exclude.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
* text
* --> p1 text
* <-- p2 text
FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_index TYPE i.
SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
IF sy-subrc NE 0.
PERFORM generate_entries CHANGING pt_outtab.
ENDIF.
LOOP AT pt_outtab INTO ls_sbook.
l_index = sy-tabix.
CLEAR ls_sbook-class.
* Alternate between smoker and non smoker to make
* it more obvious what this example is about
l_index = l_index MOD 2.
IF l_index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = ' '.
ENDIF.
MODIFY pt_outtab FROM ls_sbook.
ENDLOOP.
ENDFORM. " build_data
*& Form generate_entries
* text
* -->PT_SBOOK text
FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_month(2) TYPE c,
l_day(2) TYPE c,
l_date(8) TYPE c,
l_prebookid TYPE i.
ls_sbook-carrid = 'LH'.
ls_sbook-connid = '0400'.
ls_sbook-forcurkey = 'DEM'.
ls_sbook-loccurkey = 'USD'.
ls_sbook-custtype = 'B'.
DO 110 TIMES.
l_prebookid = sy-index.
ls_sbook-forcuram = sy-index * 10.
ls_sbook-loccuram = ls_sbook-loccuram * 2.
ls_sbook-customid = sy-index.
ls_sbook-counter = 18.
ls_sbook-agencynum = 11.
l_month = sy-index / 10 + 1.
DO 2 TIMES.
l_day = 3 + l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date+4(2) = l_month.
l_date+6(2) = l_day.
ls_sbook-fldate = l_date.
SUBTRACT 3 FROM l_day.
ls_sbook-order_date+0(6) = l_date+0(6).
ls_sbook-order_date+6(2) = l_day.
ls_sbook-bookid = l_prebookid * 2 + sy-index.
IF sy-index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = space.
ENDIF.
ls_sbook-luggweight = l_prebookid * 10.
IF ls_sbook-luggweight GE 1000.
ls_sbook-wunit = 'G'.
ls_sbook-class = 'C'.
ELSE.
ls_sbook-wunit = 'KG'.
ls_sbook-class = 'Y'.
ENDIF.
IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
ls_sbook-invoice = 'X'.
ENDIF.
IF ls_sbook-bookid EQ 2.
ls_sbook-cancelled = 'X'.
ls_sbook-class = 'F'.
ENDIF.
APPEND ls_sbook TO pt_sbook.
ENDDO.
ENDDO.
ENDFORM. " generate_entries
*& Form register_events
* text
FORM register_events.
*§1. Register event ONF4 at frontend using method
* register_f4_for_fields. For this purpose, you pass a table
* with all fields, for which you want to implement your own
* f4 help.
* remark: If you want to use an own f4 help for fields where
* no standard f4 help exists set field F4AVAILABL for
* this field in the fieldcatalog.
DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
CLEAR lt_f4.
lt_f4-fieldname = 'CLASS'.
* If you would like to deregister the field again,
* pass value SPACE with field 'register'.
lt_f4-register = 'X'.
*§ 1b. If the value range in your f4 help depends on other
* values of cells that are input enabled, set the
* GETBEFORE parameter.
* The consequence is that the ALV Grid Control raises
* event DATA_CHANGED before the f4 help is called to
* check values that the f4 help depends on.
lt_f4-getbefore = 'X'.
* The next parameter is used to change values after onf4 has
* been processed. The ALV Grid Control will raise
* event DATA_CHANGED afterwards, if you set it.
lt_f4-chngeafter = space.
INSERT TABLE lt_f4.
CALL METHOD g_grid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[].
* register events for abap objects (backend)
SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
ENDFORM. " register_events
* MODULE status_0101 OUTPUT
MODULE status_0101 OUTPUT.
SET PF-STATUS 'POPUP'.
SET TITLEBAR 'POPUP'.
CALL METHOD o_event_receiver->show_f4.
ENDMODULE. " STATUS_0101 OUTPUT
*& Module USER_COMMAND_0101 INPUT
* text
MODULE user_command_0101 INPUT.
PERFORM user_command.
ENDMODULE. " USER_COMMAND_0101 INPUT
*& Form user_command
* text
FORM user_command.
DATA: save_ok TYPE sy-ucomm.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'CANCEL'.
CALL METHOD o_event_receiver->reset.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM. "user_command
*& Form switch_edit_mode
* text
FORM switch_edit_mode.
IF g_grid->is_ready_for_input( ) EQ 0.
* set edit enabled cells ready for input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
* lock edit enabled cells against input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
ENDFORM. "switch_edit_mode
For popup try this
reward if helpfull
Regards
Pavan

Similar Messages

  • How i can change the arabic date and time mode to english date and time mode

    how i can change the arabic date and time mode to english number mode

    Settings app > General > International > Region format.

  • CRM-ISU: Need to change the END date and Start Date for contract items

    Hi,
    There is an old contract item for which  I need to change the end date
    and there is a new contract item for which I need to change the start date.
    I need to change the contract item end date and start date using some function module in IS-U system (may be as RFC to CRM).Pleaselet me know if any body is ware of this functionality?
    I am aware of a FM EECRM_CONTRACT_DATE_CHANGE which may be used for changing End Date
    but how to change the start date of a new contract item?
    Please let me know if any body is aware of this?
    Thanks

    Hi,
    Hope you can solve it by this [Link1|Re: Function modules; [link2|CRM material;.
    Regards,
    Surjith

  • Alv -change the output without modify the code

    hi...............
    how can we  change the alv output without modifying the code .
    plz help me.

    hi satya vani ,
    use this code..after execution choose the button(ctrl+f8) then you can give the position and length of the output field..
    then it will automatically changed...
    report .
    TABLES:LFA1.
    SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    REGIO LIKE LFA1-REGIO,
    SORTL LIKE LFA1-SORTL,
    CFIELD(4) TYPE C,
    END OF ITAB.
    DATA:LINE TYPE I.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
    IN LIFNR.
    DESCRIBE TABLE ITAB LINES LINE.
    LOOP AT ITAB.
    IF SY-TABIX = LINE.
    ITAB-CFIELD = 'C410'.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
    LAYOUT-EDIT = 'X'.
    LAYOUT-info_fieldname = 'CFIELD'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    regards,
    venkat.

  • How do I change the "Set Date and Time Automatically" server

    Is there a way to change System Preferences/Date & Time/Date & Time/Set date and time automatically from "Apple Americas/U.S. (time.apple.com)" to another time server instead?

    sig wrote:
    The menu has a drop down. But if you know the address of another time server I would think you can type it in.
    Yeah, that's not really a menu, but a "combo box", which is a combination of an edit field and pop-up menu. So you can choose from existing items or just type in whatever time server you want.
    charlie

  • How to change the OS name and pass of database server.

    Hi,
    I have a problem with OEM of oracle10g is not running after changing the OS's (windowsXP and Linux 4.5 ) Name and IP-Address, What should I do? OR
    Can anyone give me the metalink document ID to resolve my problem?
    My Database Version is below:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Thanks,
    Faziarain

    [email protected] wrote:
    But, How to re-create it?Use the following commands. 1st would drop the repository, 2nd would create it.
    emca -deconfig dbcontrol db -repos drop
    emca -config dbcontrol db -repos createPlease note that these commands must run from the terminal/command prompt and not from the sql prompt.
    HTH
    Aman....

  • HT1918 my credit card expired, so it tells me i have to update my payment method, in which i do since all i have to do is change the exp date and the 3 digit security number. upon doing this i just get a link to this page "contact apple support"

    I am currently deployed near russia, we have internet and everything else works, but when i loaded my redeem card to my acct (which took just fine) it tells me to update my information. upon trying to do this it tells me to go to support page......that does not help, i just want to use the money that i loaded on my acct.

    If you are getting a message to contact iTunes Support then you can do so via this link and ask them for help (we are fellow users here on these forums) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • We have an Apple id that has a bunch of purchased music on it, but our children have changed the account details and the password, and the secret questions and now we can't remember any of that information, even our birthdays are not correct. HELP???

    we have an apple ID that was set up in my wife's name. The kids have changed the account details and no-one can remember the password. They have also changed the account data and none of our birthdays are recognised by apple. We have no way of re-setting the account. The secondary email address we used when setting up the account is no longer accessible so even this option doesnt work..
    What can we do as we have a large amount of purchased music on this account???

    1. Don't confuse "Apple ID" with iTunes Account ID.  You can have many Apple IDs but only one iTunes account active at a time.
    2. If you "changed" your iTunes account ID, you actually have 2 accounts - one under the old name plus the new name.
    3. You can't merge the accounts - they remain separate.  Apps purcahsed under the old account name will update ONLY WHEN THE PHONE IS SIGNED IN TO THE OLD ACCOUNT NAME  and visa versa.
    4. Likewise, you can sync only the apps, music, media purchased under the account the phone AND iTunes are signed in to.

  • How do you change the max data when creating a DVD?

    I recently filmed a show and am making DVD copies. The show runs 1hour 45mins and is about 79gb in HD. I'm using compressor 4.1 to create the DVDs so it fits on one disc. I've made a few test copies but so far every DVD freezes at around 43 mins when I play it in another computer or dvd player. I heard in a blog that reducing the max data should solve the problem. This is my first time using compressor and I wanted to know where do you go to change the max data and how will that affect the video quality? Also, what is the suggested range of data limits for a project of this size?
    Thanks

    Duplicate the Create DVD preset from the Settings pane and name it.
    Select the MPEG setting in the batch window.
    Open the Inspector and click the Video tab.
    Choose your "Encoding Mode" (CBR, etc.).
    Uncheck Automatically Select Bit Rate.
    You can then move the slider: somewhere around 4 Mb per second should be about right.
    Just to add that you might also have a problem with the physical media. Try another brand to see whether that makes a difference.
    Russ

  • Change the Validity Date.

    Dear Supports,
    We have tickets more then 1000 in solution manager.  The status is over due ie.  the current date = 3 days validity is passed.  the status is marked as Proposed Solution. and the monitor status is in RED.
    Please confirm how can i changed it to green else increasing the date form 3 days to 365 days for temporary.
    Current Setting under the ticket is as follows.
    Start customer requirement     TU 27.01.2009 00:00 INDIA     Current Date
    End customer requirement     FR 30.01.2009 00:00 INDIA     Start + 3 Days
    Ramesh Jaiswal
    9867936636.

    Ramesh
    You can change the default date and time via configuraiton from spro
    Goto spro->scenario specific>service desk>
    The create a customized date profile and then assign this to transaction type...if u r usin std then it wil be SLFN.
    For more....Goto the Service desk config guide....available on Service.sap
    Regards
    Prakahr

  • CHANGE THE OUTPUT MEDIUM FOR SRM PURCHASE ORDERS

    We are using SRM 5.0
    I tried to change the SRM purchase order's output
    medium from 'XML' to 'Print' using a function module
    'BBP_OUTPUT_PO_PARAMS_SET' within the BADI 'BBP_ECS_PO_OUT_BADI'. Though it changes the
    output medium and chooses the right radio button
    at the UI interface level (i.e)
    Purchase order Header->output->
                        radio buttons(print,email,fax,xml)
    It still holds the output medium as 'XML' at the
    Document output log and process the document as 'XML'.
    Is there a way to update the output log to hold the changed medium i.e (print)
    Thanks and Regards,
    Gia

    Hi,
    Have a look at the foll thread for more pointers;
    Re: Change medium of output for Changed PO in SRM
    BR,
    Disha.
    Do reward points for useful answers.

  • I am trying to organize thousands of images in aperture.  The dates on the old scanned images is all 2008, when I started importing them.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

    I am trying to organize thousands of old images in aperture.  Aperture dates them all in 2008, when I started this project.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

      I just tried a test library, re-imported fresh images from a hard drive, and the date changes still revert.
    So neither your external drive nor your Aperture library are to blame.
    What do you mean test in a different user acct?  Would it be a good idea to uninstall and re-download aperture 3?
    Appreciate all your help.
    I meant the trouble shooting procedure described here:  Isolating an issue by using another user account
    To test, if some settings in your user account are faulty or preferences files corrupted, it helps to create a new user account from the "Users&Groups" System preferences. With a brand new user account you can see, if something in your current account is causing this.
    Should you see, that Aperture is not even working from a new and clean account, I'd reinstall Aperture, and if need be the Operating system.  Are you using any plug-ins?

  • HT5252 I tried to change my metadata date and got this   Aperture was not able to adjust the date and time of the original file "01769_p_h13ajyrm4bm0944.jpg" because it is locked or you do not have permission to modify it.

    I tried to change the metadata date.  It changed the date on my photo, but when I checked the box that said "also change my original file", it gave me this error message.
    Unable to change original file.  Aperture was not able to adjust the date and time of the original file “01769_p_h13ajyrm4bm0944.jpg” because it is locked or you do not have permission to modify it.
    Wassup?

    What is your Aperture version? The older versions of Aperture 3 had a problem to apply Metadata changes to the original file.
    If you are using the current version Aperture 3.4.5, try to repair the permissions on your Aperture library, if you have not already done so:
    Launch Aperture with the key combination ⌥⌘ held down and select "Repair Permissions" from the First Aid PAnel, that will appear.
    If that does not help, post back with more information on your original files - are the referenced or managed? Where is your Aperture library located? Since when do you have this problem? And what did you do directly before noticed the problem for the first time?
    Regards
    Léonie

  • Just connected apple tv. Everything works perfectly but the screen is not in color. I have tried reversing the HDMI cable and changing the output in settings and restarting. Any ideas of how to fix this?

    Just connected apple tv. Everything works perfectly but the screen is not in color. I have tried reversing the HDMI cable and changing the output in settings and restarting. The screen is still black and white. Any ideas of how to fix this?

    Hi im,
    Thanks for using Apple Support Communities.  This article has a few troubleshooting ideas for issues with color on your TV when using Apple TV:
    Apple TV (2nd and 3rd generation): Troubleshooting video issues
    http://support.apple.com/kb/TS5148
    Cheers,
    - Ari

  • Text file contains data separated by pipe symbol read the data and saved in

    Hi ,
    This is Sreedhar, i am new to java. my query is Report its in text file format it contains data like GLNO,name ,amount. All fields are separated by pipe(|) symbol. I would like to read that
    data and saved into the database. Please anyone can help me.

    thx Ottobonn.
    Scanner is very usefull with string operation like in my problem..but i want try to find java.util.Scanner in j2me, i can't found this class...:(
    so, may be i can't use this class in j2me...
    i new in java, so i try myself to code the simple method for my problem,
    may be anyone can make this class more simple than my coding....:)
    public StringPipe(String _msg){
            String message = _msg;
            int pipe = 0;
            int lengthmessage = message.length();
            int lengthMsgresult = 0;
            while(lengthMsgresult<=lengthmessage){
                String msg = null;
                int pipeX = message.indexOf("|");
                if(pipeX==-1){
                    msg = message;
                else{
                    msg = message.substring(pipe, pipeX);
                    message = message.substring(pipeX+1, message.length());
                    lengthMsgresult += msg.length();  
                // the string seperated by pipe
                System.out.println("msg = " + msg);
                if(pipeX==-1){
                   break;
    }thx...

Maybe you are looking for

  • How to get ATINN value based on material number and Class Type ?

    I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN. However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different. So how can I get ATINN(Internal c

  • CSV to Oracle Table

    Hi In BLT I am FTPing a CSV file with approx 7000 lines, then loading it with "TextLoader" and parsing with "FlatFileParser" then stepping through with a repeater running an SQL insert. It all works OK, but takes about half an hour, I was wondering i

  • Can't download AE, IT SAYS 'DOWNLOAD ERROR, CONTACT CUSTOMER SUPPORT 49

    i'm not able to download AE, IT SAYS 'DOWNLOAD ERROR, CONTACT CUSTOMER SUPPORT 49, can you a advise?

  • Migrating several collections to one domain

    I have a TFS 2013.3 instance in a domain that is just for TFS stuff. lets call it TFSDomain TFSDomain trusts UserDomain(oneway). UserDomain is where all my users log into etc. I have a Developer domain that has a TFS 2010 SP1 instance in it. Lets cal

  • AirPort Express & AirPort Utility

    Hi Everyone, I have an interesting problem (at leats I think it's interesting ). I added an AirPort Express to my existing wireless network (which took some manual configuration with a LAN cable) and I have everything working, almost. I can play song