SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Выделение цветом ячейки ALV



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
ask
Участник
Участник


Age: 38
Joined: 21 Jun 2010
Posts: 10
Location: Сургут

PostPosted: Thu Oct 07, 2010 2:00 pm    Post subject: Выделение цветом ячейки ALV Reply with quote

Добрый день!
Пытаюсь выделить цветом ячейку и ничего не выходит Sad Подскажите, пожалуйста что делаю не так.
Code:

DATA ls_cellcolor TYPE lvc_s_scol.

DATA: BEGIN OF gt_outtab OCCURS 0.
        INCLUDE STRUCTURE zmm_541_alv.
DATA:   ct TYPE lvc_t_scol. "Table for colors
DATA: END OF gt_outtab.

  LOOP AT gt_outtab.
    ind = sy-tabix.
    IF gt_outtab-error = 'X' .
      CLEAR ls_cellcolor.
      ls_cellcolor-fname = 'TEXT_ER'.
      ls_cellcolor-color-col = '6'.
      APPEND ls_cellcolor TO gt_outtab-ct.
    ENDIF.
    MODIFY gt_outtab INDEX ind.
  ENDLOOP.


    CALL METHOD ref_alv->set_table_for_first_display
      EXPORTING
*    I_BUFFER_ACTIVE               =
*    I_BYPASSING_BUFFER            =
*    I_CONSISTENCY_CHECK           =
        i_structure_name              = 'ZMM_541_ALV'
        is_variant                    = disv_wa
        i_save                        = 'A'
*      i_default                     = 'X'
       is_layout                     = layo_wa
*    IS_PRINT                      =
*    IT_SPECIAL_GROUPS             =
*    it_toolbar_excluding           = lt_exclude
*    IT_HYPERLINK                  =
*    IT_ALV_GRAPHICS               =
*    IT_EXCEPT_QINFO               =
      CHANGING
      it_outtab                     = gt_outtab[] 
      it_fieldcatalog               = fcat_itab
      it_sort                       = sort_itab
*    IT_FILTER                     =
  EXCEPTIONS
    invalid_parameter_combination = 1
    program_error                 = 2
    too_many_lines                = 3
    OTHERS                        = 4.

    IF sy-subrc <> 0.
      MESSAGE a102(zca) WITH sy-subrc.
    ENDIF.




Перед методом ref_alv->set_table_for_first_display проверяла таблицу gt_outtab она правильно заполнена. а цветные ячейки так и не получаются((
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Thu Oct 07, 2010 2:08 pm    Post subject: Reply with quote

Забыли перед вызовом метода сделать
Code:
layo_wa-ctab_fname = 'CT'.
Back to top
View user's profile Send private message Blog
ask
Участник
Участник


Age: 38
Joined: 21 Jun 2010
Posts: 10
Location: Сургут

PostPosted: Thu Oct 07, 2010 2:35 pm    Post subject: Reply with quote

Действительно забыла Crying or Very sad . Большое спасибо!! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.