Urgent..getting default & changed values in ALV editable....have ur point.s

Hi all,
I m using interactive ALV grid with 1 column editable with some default values, When i m clicking on SAVE button, only the values which are changed by the user in that column are coming in the internal table, & the default values are automatically deleted by the following code....
But my requirement is to save all the default & changed values of the ALV column....
<b>Help me out & have ur points.</b>
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
               e_grid                           = ref1
CALL METHOD ref1->check_changed_data
IMPORTING
   e_valid   =
CHANGING
   c_refresh = 'X'

Pradeep,
When ur doing the CHECK_CHANGED_DATA, u ll get the edited values inside this callback sub -routine only. so here u trap the values those are changed ( thats after editing).
Once the control goes back to the original program ( calling prog ) , u ll end up with ur old data ( before editing).
you ll have to handle that explictly in your code, or shift to OO alv grid like this -
REPORT ZSKC_GRID.
TABLES : EQUI.
DATA   : BEGIN OF T_EQUI OCCURS 0,
          EQUNR TYPE EQUI-EQUNR,
          AENAM TYPE EQUI-AENAM,
         END   OF T_EQUI.
DATA : T_FCAT  TYPE LVC_T_FCAT,
       G_FCODE TYPE SY-UCOMM.
DATA : G_GRID TYPE REF TO CL_GUI_ALV_GRID.
SELECT-OPTIONS: S_EQUNR FOR EQUI-EQUNR.
START-OF-SELECTION.
* get data.
  PERFORM SUB_GET_DATA.
* Populate catalog.
  PERFORM SUB_BUILD_CATALOG CHANGING T_FCAT.
* Display the grid.
  PERFORM SUB_SHOW_GRID.
  CALL SCREEN 9001.
*&      Form  SUB_GET_DATA
*       Get data
FORM SUB_GET_DATA .
  SELECT EQUNR AENAM
  FROM   EQUI
  INTO   TABLE T_EQUI
  WHERE  EQUNR IN S_EQUNR.
  IF SY-SUBRC NE 0.
*  Give some message if needed
  ENDIF.
ENDFORM.                    " SUB_GET_DATA
*&      Form  SUB_BUILD_CATALOG
*       text
*      <--P_T_FCAT  text
FORM SUB_BUILD_CATALOG  CHANGING PT_FCAT TYPE LVC_T_FCAT.
  DATA : WA_CAT TYPE LVC_S_FCAT.
  CLEAR WA_CAT.
  WA_CAT-FIELDNAME = 'EQUNR'.
  WA_CAT-TABNAME   = 'T_EQUI'.
  WA_CAT-REF_FIELD = 'EQUNR'.
  WA_CAT-REF_TABLE = 'EQUI'.
  APPEND WA_CAT TO PT_FCAT.
  CLEAR WA_CAT.
  WA_CAT-FIELDNAME = 'AENAM'.
  WA_CAT-TABNAME   = 'T_EQUI'.
  WA_CAT-REF_FIELD = 'AENAM'.
  WA_CAT-REF_TABLE = 'EQUI'.
  WA_CAT-EDIT      = 'X'.
  APPEND WA_CAT TO PT_FCAT.
ENDFORM.                    " SUB_BUILD_CATALOG
*&      Form  SUB_SHOW_GRID
*       Show grid
FORM SUB_SHOW_GRID .
* create the Grid Object.
  CREATE OBJECT G_GRID
    EXPORTING
       I_PARENT          = CL_GUI_CONTAINER=>SCREEN0
    EXCEPTIONS
      ERROR_CNTL_CREATE = 1
      ERROR_CNTL_INIT   = 2
      ERROR_CNTL_LINK   = 3
      ERROR_DP_CREATE   = 4
      OTHERS            = 5.
  CHECK SY-SUBRC EQ 0.
* Display contents,
  CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    CHANGING
      IT_OUTTAB                     = t_equi[]
      IT_FIELDCATALOG               = t_fcat
    EXCEPTIONS
      INVALID_PARAMETER_COMBINATION = 1
      PROGRAM_ERROR                 = 2
      TOO_MANY_LINES                = 3
      others                        = 4.
ENDFORM.                    " SUB_SHOW_GRID
*&      Module  STATUS_9001  OUTPUT
*       text
MODULE STATUS_9001 OUTPUT.
   SET PF-STATUS 'PF_9001'.
   SET TITLEBAR 'TITLE_9001'.
ENDMODULE.                 " STATUS_9001  OUTPUT
*&      Module  USER_COMMAND_9001  INPUT
*       text
MODULE USER_COMMAND_9001 INPUT.
  CASE G_FCODE.
    WHEN 'BACK' OR 'CANC' OR 'EXIT'.
      LEAVE TO SCREEN 0.
    WHEN 'HAVE'.
*    After editing everything user presses this button.
     PERFORM SUB_GET_EDITED_DATA.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_9001  INPUT
*&      Form  SUB_GET_EDITED_DATA
*       Read the ALV grid and get current internal table.
FORM SUB_GET_EDITED_DATA .
DATA : T_OLD_DATA LIKE T_EQUI OCCURS 0.
* hold the old values if u need them.
  t_old_data[] = t_equi[].
* This will update the global internal table.
  CALL METHOD G_GRID->CHECK_CHANGED_DATA.
* Now t_equi have changed here. u have the old data in the T_OLD_DATA.
  BREAK-POINT.
ENDFORM.                    " SUB_GET_EDITED_DATA
Create a blank screen called 9001. and Pf-staus has a buton with fcode "HAVE". ( alongwith BACK canc exit).

Similar Messages

  • How to refresh VO to get the changed value in other AM or backend database

    one VO is refrenced by two AMs, when i insert or update data by VO in one AM, how to get the changed data in another AM ?
    another case is i have updated some attributes of the record in database by SQL statement ,but the client can not get the updated value at once .
    i have tried to use executeQuery() ,but it does not work. now i always do a rollback method ,a bad idea.:)
    pls help me ! thanks
    Message was edited by:
    Guo Qinghua

    Mind that ADF BC (probably like any other persistence framework) caches data. So when you update something in the database other than via ADF BC, you then have in the ADF BC cache what is called 'stale data'. When you try to commit that nevertheless, the database will tell ADF BC that the record in the database has been updated by another user, and a rollback will be done. That is all to be expected.
    You can find some more info on how this works here:
    http://download-uk.oracle.com/docs/html/B25947_01/bcvoeo007.htm
    It also explains how to clear the cache and enforce that data will be read from the database.
    Jan Kettenis

  • How to capture changed value in ALV Grid

    Hi Guys,
    I have an ALV grid report where I have 'Edit On' for one of the quantity fields in the report. How do I capture the new (changed) value in the suboutine for user command when user changes the value in the report and clicks on a button ?
    Points assured for helpful replies.

    FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM...........
    Data ref1 type ref to cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = ref1.
    call method ref1->check_changed_data
    ENDFORM.
    Also chk the blog
    /people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

  • Get the Change log for ALV line items

    Hello Experts,
    I am using editable ALV table to display/change data. When user modifies data from ALV line items manually (direct entry), this change is recorded in get_context_change_log method of context node. Also in the screen I have one button, on click of this button I do some calculation for selected line items in action method and update the context node with new values. But with this second approach (button action) though values gets changed this is not recorded in to get_context_change_log of context node. I tried to use method add_context_attribute_change  in button action method to add attribute changes to change log tabel but it's not adding entries to change log. Does method add_context_attribute_change only works with OVS search helps and freely programmed value helps? And is there any other way for capturing changes(done by using action method and not manually) for ALV line items?
    Thanks & Regards
    Jayant

    Here is code:
    METHOD.
    This method is in component controller, which gets called from View Action method (on click * of button).
      FIELD-SYMBOLS:<lfs> TYPE  Data.
    *Data Declaration
      DATA lo_nd_cn_apc_item TYPE REF TO if_wd_context_node.
      DATA lit_apc_item TYPE wd_this->elements_cn_apc_item.
      DATA lo_el_cn_apc_item TYPE REF TO if_wd_context_element.
      data: l_component type ref to if_wd_component,
            l_context type ref to if_wd_context,
            lfd_added type abap_bool.
      CLEAR:lo_nd_cn_apc_item,lo_el_cn_apc_item.
      navigate from <CONTEXT> to <CN_APC_ITEM> via lead selection
      lo_nd_cn_apc_item = wd_context->get_child_node( name = wd_this->wdctx_cn_apc_item ).
      REFRESH:lit_apc_item.
      @TODO handle non existant child
      IF lo_nd_cn_apc_item IS NOT INITIAL.
        lo_nd_cn_apc_item->get_static_attributes_table( IMPORTING table = lit_apc_item ).
    get element via lead selection
        lo_el_cn_apc_item = lo_nd_cn_apc_item->get_element( ).
      ENDIF.
            l_component = wd_this->wd_get_api( ).
            l_context = l_component->get_context( ).
    Calculate Cost
      LOOP AT lit_apc_item ASSIGNING  <lfs>.
            <lfs>-cal_amount = ( <lfs>-cost_percent * <lfs>-sec_amount ) / 100.
            lfd_added = l_context->add_context_attribute_change(
                element              = lo_el_cn_apc_item
                attribute_name       = 'CAL_AMOUNT'
                new_value            = <lfs>-cal_amount
      ENDLOOP.
    Bind Table.
      lo_nd_cn_apc_item->bind_table( new_items = lit_apc_item set_initial_elements = abap_true ).
    ENDMETHOD.

  • Changing Values on ALV Grid (using Classes)

    Hi all,
        I have ALV Grid output, on which ZMENG (Target Qty) column is editable. So user will enter in value in ZMENG column and press ENTER. Then TOTAL column should be populated with ZMENG * NETWR columns. I have tried with changing/ entering values with char data type columns like MAKTX etc.. Its working fine with them. But when I entered in value in ZMENG, the actual value which I have entered is not flowing into LS_GOOD-VALUE. For char data types its been populated with user entered values.
          Can anyone please tell why its not happening with Quantity or Currency fields.
      method handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi,
              l_netwr TYPE vbap-netwr,
              l_total TYPE vbap-netwr,
              l_zmeng TYPE vbap-zmeng.
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
          CASE ls_good-fieldname.
            WHEN 'ZMENG'.
              <<<<l_zmeng = ls_good-value.>>>>
              call method er_data_changed->get_cell_value
                             exporting i_row_id = ls_good-row_id
                                       i_fieldname = 'NETWR'
                             importing e_value = l_netwr.
              l_total = l_zmeng * l_netwr.
              call method er_data_changed->modify_cell
                        exporting i_row_id = ls_good-row_id
                                  i_fieldname = 'TOTAL'
                                  i_value     = l_total.
          ENDCASE.
      ENDLOOP.
    ENDMETHOD.
    Fieldcatlog for Quantity field:
      l_fcat-tabname = 'IT_VBAP'.
      l_fcat-fieldname = 'ZMENG'.
      l_fcat-coltext = 'Qty'.
      l_fcat-outputlen = 17.
      l_fcat-edit = 'X'.
      APPEND l_fcat TO ct_fcat.
      CLEAR l_fcat.

    Hi Jaker 
    Try calling cl_gui_alv_Grid->refresh_table_display.
    refresh table display when ever the qty is changed.
    It should work.
    Venkat.

  • How to get default input values when using promt user for input

    I use "promt user for input" to input some values. The messageboard appears with blank boxes then I will input  new values. I want to make some default values in this blank boxes so that I needn't to enter new values. Is it possible ?

    Right click on he Express Vi terminal and choose open Front panel to convert it into a standard vi. Then open it. Enter a default value for each control, then right-click on the controls and go to data operation > make current value default.
    Message Edité par chilly charly le 11-18-2007 12:52 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Getting changed data back from editable ALV...

    Hello Gurus,
    I am working on ALV using standard ALV function module REUSE_ALV_GRID_DISPLAY. Now, To make the fields editale, I am using flag EDIT = 'X' in field catalog. This working fine.
    Now, when the data is changed in ALV grid and user clicks on SAVE button that I have programmed in i_callback_usercommand, how can I get the changed data back from editable ALV so that I can change data in custom table ?
    Please help.
    Regards,
    Rajesh.

    I see that the method CHECK_CHANGED_DATA is used. I am also doing it as follows. But how do I get the changed data back in table. There are no table parameters in
    CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
    DATA: 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.
    Please guide

  • Not able to get changed values in the SAVE EVENT in ServHPartnerDet view

    Hi Experts,
    I am new CRM WEB IC, i have requirement like need to access four IBASE fields from BupaIbaseDetail and need to display those fiedls in ServHPartnerDet view. I am able display the fields and its values in the target view. But when user press change button and changes those four fields and press save button not able get the changed values in to the SAVE EVENT.Anyone please help me in this.
    IBHEADER , IBASEADDRESS  are the CONTEXT NODE CREATED in target view. I have binded IBHEADER to CuCoIbase custom controller and getting four fields data from IBASEADDRESS. below is the code for CREATE_CONTEXT_NODES.
    METHOD create_ibaseaddress.
      DATA:
        model        TYPE REF TO if_bsp_model,
        coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
        entity       TYPE REF TO cl_crm_bol_entity,              "#EC *
        entity_col   TYPE REF TO if_bol_entity_col.             "#EC *
      model = owner->create_model(
          class_name     = 'ZL_CRM_IC_SERVHPDET_CN00'
          model_id       = 'IBaseAddress' ).                    "#EC NOTEXT
      ibaseaddress ?= model.
      CLEAR model.
      coll_wrapper =
        ibheader->get_collection_wrapper( ).
    TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
        TRY.
            entity_col = entity->get_related_entities(
                            iv_relation_name = 'FirstLevelComponent' ).
          CATCH cx_crm_genil_model_error.
        ENDTRY.
        TRY.
            entity ?= entity_col->get_current( ).
          CATCH cx_sy_move_cast_error.
        ENDTRY.
        CLEAR entity_col.
        IF entity IS BOUND.
          TRY.
              entity_col = entity->get_related_entities(
                              iv_relation_name = 'ComponentAddress' ).
              ibaseaddress->set_collection( entity_col ).
            CATCH cx_crm_genil_model_error.
          ENDTRY.
        ENDIF.
      ENDIF.
    ENDMETHOD.

    Code i have written in the CREATE_CONTEXT_NODE method for my custom context nodes( IBHEADER,IBASEADDRESS).
    this  CREATE_IBHEADER some data related to IBASE header then from this reading the IBASEADDRESS contextnode fields for displaying in the ServHPartnerDet. It is working fine but After changing the four fields values in the ServHPartnerDet view and trying to save, then context is not reading the new values it gives the old values only.
      TRY.
          lr_coll_wr = ztyped_context->ibaseaddress->get_collection_wrapper( ).
          IF lr_coll_wr IS BOUND.
            lr_entity ?= lr_coll_wr->get_current( ).
          ENDIF.
        CATCH cx_crm_genil_model_error.
      ENDTRY.
      CALL METHOD lr_entity->if_bol_bo_property_access~get_property_as_value
        EXPORTING
          iv_attr_name = 'BUILDING'
        IMPORTING
          ev_result    = lw_building.
    the building has got result of old value no the new value.
    method CREATE_IBHEADER.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_CRM_IC_SERVHPDET_CN01'
            model_id       = 'IBHEADER' ). "#EC NOTEXT
        IBHEADER ?= model.
        CLEAR model.
    bind to custom controller
      DATA:
          cuco TYPE REF TO cl_crm_ic_cucoibase_impl,
          cnode TYPE REF TO cl_bsp_wd_context_node.
      cuco ?= owner->get_custom_controller(
            'CuCoIbase' ).                                      "#EC NOTEXT
      cnode ?=
        cuco->typed_context->ibaseheader.
      coll_wrapper = cnode->get_collection_wrapper( ).
      ibheader->set_collection_wrapper( coll_wrapper ).
    endmethod.

  • How to Input Value in  ALV report at reuntime...?

    Dear All,
    How to Input Value or change the value of a field in  ALV report at runtime...?
    regards,

    HI,
    To input value in ALV you have to make it editable.
    to change values at runtime you have to capture some events and then change your values in internal table which is used to display alv.
    Here is an example of editable ALV.
    <b>REPORT ZWA_ALV_EDITABLE_FM .
    type-pools: slis.
    data: gs_layout type slis_layout_alv.
    DATA: d_ref TYPE REF TO data.
    DATA: itab type table of fmfint.
    SELECT * FROM fmfint
    INTO TABLE itab.
    gs_layout-edit = 'X'.
    * Call ABAP List Viewer (ALV)
    call function 'REUSE_ALV_GRID_DISPLAY'
         exporting
              i_callback_program      = 'ZWA_ALV_EDITABLE_FM'
              i_callback_user_command = 'USER_COMMAND'
              i_structure_name        =  'fmfint'
              is_layout               = gs_layout
         tables
              t_outtab                = itab.
    form user_command using r_ucomm type sy-ucomm
                            rs_selfield type slis_selfield.
      if r_ucomm = '&DATA_SAVE'.
        message i000(SU) with 'saved'.
        MODIFY fmfint FROM TABLE itab.
        call function 'REUSE_ALV_LIST_DISPLAY'
             exporting
                  i_structure_name = 'fmfint'
             tables
                  t_outtab         = itab.
      endif.
    endform.</b>
    Regards,
    Wasim Ahmed

  • ALV Editable not working

    Hello Abapers,
    I am not getting the desired output as per example.
    I have followed all the steps as per the example but still a looser can anyone help me in this.
    When I execute the program I get the following run time error
    Field symbol has not been assigned.
    I tried commenting the subroutine call
    1} perform Change_fieldcatalogue and fetch data.
    and i was getting the 2 custom container (top, bottom)  on the screen output this time.
    I have also created a screen 600 with all the attributes.
    But i have doubt with this statement
    Create a Custom container and name it CCONT and OK code as OK_CODE.
    Save check and Activate the screen painter.
    I hope on the layout screen the one which says custom control is only the custom container but i see that the fct code box is not highlighted then how can i assign a fctcode.
    Could you plz also clear this.
    Thanks in advance.
    Ranjith Nambiar
    Program code below
    A small note about this program
    *& AS : ALV report which displays the contents of the table T006
    *& (as a docking container in the bottom) along with the
    *& editable ALV which contains the ALV fieldcatalogue table structure.
    *& With the available toolbar options of the editable ALV in the output,
    *& user can change the fieldcatalogue as per his requirement.
    *& When the user clicks 'SUBMIT',the display of the ALV with table T006
    *& gets modified and customised accordingly to the user's requirement.
    REPORT  ZNRD_ALV_EDITABLE.
    * Structure declaration for t006
    types : begin of ty_t006.
            include structure t006.
    types : end of ty_t006.
    * Internal table and work area declaration for t006.
    data : it_t006 type standard table of ty_t006,
           wa_t006 type ty_t006.
    * Declaration for ALV
    data : ok_code type sy-ucomm,            " Ok code.
           it_fcat type lvc_t_fcat,          " Fieldcatalogue.
           it_fieldcat type lvc_t_fcat,      "  Fieldcatalogue for Fieldcatalogue itself.
           it_layout type lvc_s_layo.
    *Declaration for toolbar functions
    data : it_excl_func type ui_functions,
    * Controls to display it_t006 and its fieldcatalogue
           cont_dock type ref to cl_gui_docking_container,
           cont_alvgd type ref to cl_gui_alv_grid,
    * Controls to display fieldcatalogue as editable alv gridand container
           cont_cust type ref to cl_gui_custom_container,
           cont_editalvgd type ref to cl_gui_alv_grid.
    initialization.
    start-of-selection.
    * Local class definition for data changed in fieldcatalogue alv
    CLASS lcl_event_receiver definition.
    public section.
      methods handle_data_changed
      for event data_changed of cl_gui_alv_grid
        importing er_data_changed.
    endclass.        " lcl_event_receiver definition.
    * Local class implementation for data changed in fieldcatalogue alv
    CLASS lcl_event_receiver implementation.
      method handle_data_changed.
      endmethod.     " handle_data_changed.
    endclass.        "lcl_event_receiver implementation
    * Data declaration for event receiver
    data : event_receiver type ref to lcl_event_receiver.
    end-of-selection.
    * Setting the screen for alv output for table display and changed fieldcatalogue display
    set screen 600.
    *&      Module  STATUS_0600  OUTPUT
    *       text
    MODULE STATUS_0600 OUTPUT.
      SET PF-STATUS 'STATUS600'.
      SET TITLEBAR 'TITLE600'.
    * Create ALV grid if doesn't exits.
    if cont_dock is initial.
      perform Create_alv.
    endif.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    *&      Form  Create_alv
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM Create_alv.
    * Create a docking container and dock the control at the bottom
    create object cont_dock
      exporting
        dynnr = '600'
        extension = 100
        side = cl_gui_docking_container=>dock_at_bottom.
    * Create ALV grid for displaying the table
    create object cont_alvgd
      exporting
        i_parent = cont_dock.
    * Create custom container for ALV
    create object cont_cust
      exporting
        container_name = 'CCONT'.
    * Create alv editable grid
    create object cont_editalvgd
    exporting
       i_parent = cont_cust.
    * Register events for the editable alv
    create object event_receiver.
    set handler event_receiver->handle_data_changed for cont_editalvgd.
    call method cont_editalvgd->register_edit_event
      exporting
        i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    *Building fieldcatalogue for the initial display
    perform Build_fieldcatalogue changing it_fcat it_fieldcat.
    * Building the fieldcatalogue after the user has changed it
    perform Change_fieldcatalogue changing it_fieldcat.
    * Fetch data from the table.
    perform Fetch_data.
    * Get excluding functions for the alv editable tool bar
      APPEND cl_gui_alv_grid=>mc_fc_loc_append_row TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_insert_row TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_cut TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort_asc TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort_dsc TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_subtot TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_graph TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_info TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_print TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_filter TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_views TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_export TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_paste TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_find TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_copy  TO it_excl_func.
    *Alv display for the T006 table at the bottom
      CALL METHOD cont_alvgd->set_table_for_first_display
        CHANGING
          it_outtab       = it_t006[]
          it_fieldcatalog = it_fcat[].
    * optimize column width of grid displaying fieldcatalog
      it_layout-cwidth_opt = 'X'.
    * Get fieldcatalog of table T006 - alv might have
    * modified it after passing.
      CALL METHOD cont_alvgd->get_frontend_fieldcatalog
        IMPORTING
          et_fieldcatalog = it_fcat[].
    *to Send Buffered Automation Queue to Frontend
      CALL METHOD cl_gui_cfw=>flush.
    * Display fieldcatalog of table T006 in editable alv grid
      CALL METHOD cont_editalvgd->set_table_for_first_display
        EXPORTING
          is_layout            = it_layout
          it_toolbar_excluding = it_excl_func
        CHANGING
          it_outtab            = it_fcat[]
          it_fieldcatalog      = it_fieldcat[].
    ENDFORM.                    " Create_alv
    *&      Module  USER_COMMAND_0600  INPUT
    *       text
    MODULE USER_COMMAND_0600 INPUT.
    case ok_code.
      when 'SUBMIT'.
    * To get the current fieldcatalogue from the front end
        call method cont_alvgd->set_frontend_fieldcatalog
        exporting
          it_fieldcatalog = it_fieldcat.
        call method cont_alvgd->refresh_table_display.
        call method cl_gui_cfw=>flush.
      when 'EXIT'.
        leave program.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0600  INPUT
    *&      Form  Build_fieldcatalogue
    *       text
    *      <--P_IT_FCAT  text
    *      <--P_IT_FIELDCAT  text
    FORM Build_fieldcatalogue  CHANGING P_IT_FCAT
                                        P_IT_FIELDCAT.
    * Fieldcatalog for table T006: it_fldcat
    * to generate the fields automatically
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'T006'
        CHANGING
          ct_fieldcat            = it_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    * Fieldcatalog for table LVC_T_FCAT:it_fcat
    * Generate fieldcatalog of fieldcatalog structure.
    * This fieldcatalog is used to display fieldcatalog 'it_fldcat'
    * on the top of the screen.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'LVC_S_FCAT'
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM.                    " Build_fieldcatalogue
    *&      Form  Change_fieldcatalogue
    * After the user has modified the fieldcatalogue we build another fieldcat
    * for the modified alv display
    *      <--P_IT_FIELDCAT  text
    FORM Change_fieldcatalogue  CHANGING P_IT_FIELDCAT.
      DATA ls_fcat TYPE lvc_s_fcat.
      LOOP AT it_fcat INTO ls_fcat.
        ls_fcat-coltext = ls_fcat-fieldname.
        ls_fcat-edit = 'X'.
        IF ls_fcat-fieldname = 'COL_POS' OR ls_fcat-fieldname = 'FIELDNAME'.
          ls_fcat-key = 'X'.
        ENDIF.
        MODIFY it_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " Change_fieldcatalogue
    *&      Form  Fetch_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM Fetch_data .
      select * from t006 into table it_t006 up to 50 rows.
    ENDFORM.                    " Fetch_data

    comment this particular section deals with top container.
    CALL METHOD cont_editalvgd->set_table_for_first_display
        EXPORTING
          is_layout            = it_layout
          it_toolbar_excluding = it_excl_func
        CHANGING
          it_outtab            = it_fcat[]
          it_fieldcatalog      = it_fieldcat[].
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'LVC_S_FCAT'  "This is deep strucure
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    LVC_S_FCAT is a deep structure , so try to comment that section and see. if you want that part , populate the fieldcatalog manually.

  • Can 'Region' field gets defaulted based on owner of account?

    Hi
    Can 'Region' field in Account sales information gets defaulted based on owner of account?
    Owner belongs to 'West' region then account should get defaulted with same region.
    I have defined 'West' as territory for this owner.
    Do anybody has expression available for making field default ?
    Thanks
    Santosh

    Mahesh,
    Read-only is an option, but only if you never want users to change the values. If your users always work in the same Div, Region, and Sub-Region, then it would be reasonable to lock it so they don't feel like they have to update it. If,however, you have users that work in more than one sub-region, and they need to update it, then you wouldn't make it read-only.
    As far as workflow is concerned, you would need it to update the values when the ownership changes, if that is a requirement. If you choose not to update it, then it might not reflect the correct values for the new owner. Your decision on whether or not to implement the workflow would be based on whether or not your business rules require it. Most of the time, customers want the data to reflect the correct values for the current owner, but not always, so check with your customers and let the requirements drive the decision.
    Good Luck,
    Thom

  • Problems with getting default Texts (HRRCF00_GET_DEFAULT_TEXTS)

    Hi experts,
    we are using EHP4 and I have implemented and activated BADI HRRCF00_GET_DEFAULT_TEXTS for getting default Text during the posting procedure within SAP E-Recruiting based on WebDynpro.
    The BADI is called from WD Controller ERC_C_REQ_MGMT_UI.
    get default text values from BADI HRRCF00_GET_DEFAULTS_TEXT
        wd_assist->read_default_posting_text( EXPORTING iv_language                 = ls_language-langu
                                                        is_post_hrobject            = ls_hrobject
                                              IMPORTING ev_company_desc_default     = ls_language_tab-company
                                                        ev_department_desc_default  = ls_language_tab-department
                                                        ev_project_desc_default     = ls_language_tab-project
                                                        ev_task_desc_default        = ls_language_tab-tasks
                                                        ev_requirement_desc_default = ls_language_tab-requirements ).
    Directly after the call of BADI HRRCF00_GET_DEFAULTS_TEXT it seems that the company description is correctly filled.
    But unfortunately I am not able to see the default text within the Input Field of the view.
    As far that I know there should be a Button to fullfill the company description with the default text. But I can't see any button.
    Is there anything else I have to configure?
    Many Thanks!

    Hi Roman,
    I have testet it both. With a complete new requisition and with a old one. Same problem.
    But know I have recognized a strange system behaviour.
    If I toogle the first language I am not able to see my default_text. But if I toggle a second on(English etc) I can see the default text within this second tab.
    So the result is that I am able to see the default texts but only if I toggle two languages
    I am thinking I am missing something within my BADI implementation.
    The only thing I have done is to prorgram follwing section within the method GET_PROJECT_DESC
    method IF_EX_HRRCF00_GET_DEFAULT_TEXT~GET_PROJECT_DESC.
    *{   INSERT         M11K900044                                        1
    break erec1.
    project_desc = 'This is a example for the project description'.
    *}   INSERT
    endmethod.
    And it seems fine becaus if I switch to debugging mode I can see that the method is called and tht the variable project_desc will be filled correctly.
    Would be great if you could give me a helping hand on this.
    Many Thanks!
    Marco

  • Update button in sql report for each row can only get the report value

    I have to added Update for each row of records like:
    select a.*,'Update' button from (
    select c.*,d.login from country c,champ d
    where c.champ_id=d.champ_id(+)
    order by c.name) a
    then go to the report->edit button ->Column Link
    I added some items P40_REGION, P40_CHAMPID,P40_ACTIVE,P40_CODE and assign the value like #region#,#active# ,#code# to these item, but when I click the update button in the report I found the values such as #region#,#active# ,#code# is the report value not the select list selected value(the region, active column are displayed as select list lov).
    Can anyone tell me how to sort this knid of problem?
    Thanks a lot!

    Sorry, it doesn't work. I also tried apex_application.g_f01(i), but not everytime I can get the value or get the incorrect value. If you have time you can try to create it like what I have described. Our team use two days now but still can not sort this problem.

  • How to get the column values

    hi
    i am new to programming... i would like to know how to get the column values... i have a resultset object
    i need code .... asap
    thnx

    @OP: It is always good to type complete sentences and describe your problem at length. It helps in letting people know what you really need instead of making wild guesses or silly jokes. You post mentions that you get the ResultSet. Then you should look up the API docs for java.sql.ResultSet and take a look at the getxxx() method signatures. Use the ones which suit the specific case.
    Besides, it is good to refrain from using asap and urgent. Even if something is urgent to you, it need not be urgent to others. Wording a question properly would attract better replies.
    Finally, would you mind getting down to specifics of your problem? From what I perceived, the JDBC tutorial and the API docs should provide all the information you need.

  • Urgent !!! regarding mapping of  frequency to operation.....Have ur points.

    Hi all,
    In transactin IA05, we make tasklist master.
    I want to link (task group->group counter-><b>operation->frequency</b>) in my itab. Pleas suggest me the table in which i can link the operation with frequency.
    Very urgent....thanks in advance
    <b>Have your points.</b>
    Regards,

    Hi yaar..thanx for reply..
    yaar Here frequency means the frequncy of operation which we set after clicking on maintenance package.
    PLPO Is task-list operation/activity master, contains data regarding operations....there is no field by which i can link the operation with the frequency.
    We have some tables of maintence package master....that also don't have the linking field.
    following are the tables.
    T351P
    T351X
    T351
    T351T
    Pleas assist me....

Maybe you are looking for

  • Itunes does not start and i cannot sync my iphone 4

    I have installed Itunes 10.1.1.4 on my computer running Windows XP but it does not start. This prevent me to sync my new iphone 4. Previously I had other versions of itunes on the computer and sometimes the same problem happened. I did a search on Ap

  • Create a portlet by using Sun One Studio 5

    Hi, I am having Sun One Studio 5 and Portlet Builder 2.0, however I do not know how to create a portlet and deploy it into war. Please help me create a portlet using Sun One Studio 5. Thanks in advance. [email protected]

  • Mass save photos from Dropbox to iPad

    I've put 350ish photos from my computer onto my dropbox account, and am trying to download them all to a friends iPad. Is there a way to save them all at once to avoid individually clicking "Save photo?" Any help is greatly appreciated.

  • Why does InDesign files create multiple boxes the size of the document when exporting as a PDF?

    Sometimes I need to place customer-supplied files into Illustrator templates to prepare for printing. If they have been originally created in InDesign and I need to make some adjustments in the file, I cannot isolate individual elements in the file.

  • Why does this print a null?

    I have a snippet here that prints one row from a derby DB. The heading row works fine. I             while (!cells[0].isEmpty()) {                 for (int col = 0; col < colNames.length; col++) //System.out.print(cells[col].remove(0).toString() + "\