Skip to Content
0
Mar 16, 2021 at 08:33 AM

how to choose all same row with alv?

94 Views Last edit Mar 17, 2021 at 01:57 AM 5 rev

Hi Experts

When I choose one row , and I choose all "001000000224" automatically. how do I do it ?

Thanks in advance.

 i_grid_settings-edt_cll_cb  = 'X' .            "显示界面可编辑字段上修改了数据,回车后就会立即将内表的数据也修改
  layout-colwidth_optimize    = 'X'.                "设置字段列宽自适应
  layout-zebra             = 'X'.

  CLEAR afield.
  REFRESH fieldcat.

  fill  'MARK'       'CHOOSE'          '' 'X' 'X'.
  fieldcat-checkbox = 'X'.
  fieldcat-hotspot = ''.
  MODIFY fieldcat INDEX 1 TRANSPORTING checkbox hotspot.
  fill 'WERKS' '工厂' '' '' ''.
  fill 'LAGER' '库存地点' '' '' ''.
  fill 'LGOBE' '库存地点描述' '' '' ''.
  fill 'MATNR' '物料编码' '' '' ''.
  fill 'MAKTX' '物料描述' '' '' ''.
  fill 'SERNR' '序列号' '' '' ''.
  fill 'AUFNR' '工单号' '' '' ''.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_grid_settings          = i_grid_settings                 "显示界面可编辑字段上修改了数据,回车后就会立即将内表的数据也修改
      i_callback_program       = sy-cprog "sy-repid                        "标记当前程序
      it_fieldcat              = fieldcat[]
      is_layout                = layout
      i_callback_user_command  = 'USER_COMMAND'
      i_callback_pf_status_set = 'SET_STATUS'
    TABLES
      t_outtab                 = item.
    SORT ITEM BY aufnr.

Attachments