Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Editable OO ALV Problem

Former Member
0 Likes
672

Hi Everyone,

My Problem is when i set the edit option in field catalog respective field get converted into edit mode but the data of field is get disappear.

wa_fcat1-fieldname  = 'TRADESCHM'.
  wa_fcat1-coltext    = 'TRADE SCHEME'.
  wa_fcat1-col_pos    =  7.
  wa_fcat1-ref_table  = 'T_ZVCBD_TRADE_SCHM'.
  wa_fcat1-outputlen  = '7'.
  wa_fcat1-emphasize  = c_x.
  wa_fcat1-edit       = c_x.
  APPEND wa_fcat1 TO t_fcat1.
  CLEAR wa_fcat1.

i searched the all threads but didn't got the reason of my problem.

Regards,

Sandeep

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
638

hi,

you r calling these FM on your code ,......in user command ....function code is 'OK.'

CALL METHOD V_OBJ_ALV->CHECK_CHANGED_DATA      " object
         .

  CALL METHOD CL_GUI_CFW=>FLUSH.

  CALL METHOD CL_GUI_CFW=>DISPATCH.

for reflecting the changes.

regards

Gaurav

7 REPLIES 7
Read only

Former Member
0 Likes
638

This message was moderated.

Read only

Former Member
0 Likes
638

This message was moderated.

Read only

0 Likes
638

Hi Rohit ,Gaurav,

i searched all this thread .

Please read question carfully

Regards,

Sandeep

Edited by: pas_abap on Feb 15, 2010 10:17 AM

Read only

Former Member
0 Likes
639

hi,

you r calling these FM on your code ,......in user command ....function code is 'OK.'

CALL METHOD V_OBJ_ALV->CHECK_CHANGED_DATA      " object
         .

  CALL METHOD CL_GUI_CFW=>FLUSH.

  CALL METHOD CL_GUI_CFW=>DISPATCH.

for reflecting the changes.

regards

Gaurav

Read only

Former Member
0 Likes
638

Hi,

when we run the report for first time before edit that time only its not showing.

if we check in debugger at this code field have data.

*   Calling the method for alv display
    CALL METHOD w_obj_alv_grid->set_table_for_first_display
       EXPORTING
*        i_buffer_active                =
*        i_bypassing_buffer            =
*        i_consistency_check           =
*        i_structure_name              =
         is_variant                    = w_var
         i_save                        = w_save
*        i_default                     = 'X'
         is_layout                     = wa_layout
*        is_print                      =
*        it_special_groups             =
*        it_toolbar_excluding          =
*        it_hyperlink                  =
*        it_alv_graphics               =
*        it_except_qinfo               =
*        ir_salv_adapter               =
      CHANGING
        t_outtab                      = t_zvcbd_trade_schm*+ "  till here is data present perfectly but in outputeditable   field is blank for which we " put the editable on
        it_fieldcatalog                = t_fcat1
*        it_sort                       =
*        it_filter                     =
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.

Edited by: pas_abap on Feb 15, 2010 10:27 AM

Read only

0 Likes
638

Hi

Check the values you have populated for layout also wa_layout.

And it is always good to create the field catalog with FM ' lvc_fieldcatalog_merge' by creating structure so that we can avoid this type of issues.

Thanks & Regards

Jyo

Read only

Former Member
0 Likes
638

hi,

try this in field catalog............

wa_fcat1-fieldname  = 'TRADESCHM'.
  wa_fcat1-TABNAME = ' '.   " table name
  wa_fcat1-coltext    = 'TRADE SCHEME'.
  wa_fcat1-col_pos    =  7.
  wa_fcat1-outputlen  = '7'.
  wa_fcat1-emphasize  = c_x.
  wa_fcat1-edit       = c_x.
  APPEND wa_fcat1 TO t_fcat1.
  CLEAR wa_fcat1.

Regards

Gaurav