ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ALV 双击类事件 (3)

ALV 双击类事件 (3)

原创 Linux操作系统 作者:ytfsrs2008 时间:2009-10-21 10:58:33 0 删除 编辑

*&-------------------------------------------------------*

*&      Form  fill_field_form

*&--------------------------------------------------------*

FORM. fill_field_form1.

  clear lt_fieldcat1.

  refresh lt_fieldcat1.

  perform. alv_form_filed1 using:

    '1'  'WERKS'  'ITAB'   'Plant'  '8',

    '2'  'MATNR'  'ITAB'   'PartNo' '18',

    '3'  'MAKTX'  'ITAB'   'Mat.desc'  '40'.

ENDFORM.

*&----------------------------------------------------*

*&      Form  alv_form_filed

*&-----------------------------------------------------*

FORM. alv_form_filed1  USING    col_pos

                             fieldname

                             tabname

                             desc

                             len.

  ls_fieldcat1-col_pos = col_pos.

  ls_fieldcat1-fieldname = fieldname.

  ls_fieldcat1-tabname   = tabname.

  ls_fieldcat1-REPTEXT   =  desc.

  ls_fieldcat1-outputlen = len.

  append ls_fieldcat1 to lt_fieldcat1.

 

ENDFORM.

 

form. alv2_display_form.

if alv_container2 is initial.

    create object alv_container2

       exporting

          container_name = 'ALV2'.

    create object alv_grid2

        exporting

          i_parent = alv_container2.

     perform. fill_field_form1.

     call method alv_grid2->set_table_for_first_display

       exporting

            is_layout   = alv_layout1

            i_save      =  'A'

        changing

           it_outtab    = itab1[]

           it_fieldcatalog = lt_fieldcat1.

  else.

     call method alv_grid2->set_table_for_first_display

       exporting

            is_layout   = alv_layout

            i_save      =  'A'

        changing

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15117617/viewspace-617068/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-10-31

  • 博文量
    52
  • 访问量
    49573