SAP ABAP动态地将alv行附加到另一个表吗?

时间:2017-08-14 10:18:46

标签: sap abap

This is the picture

如何选择行事件?

for idx in range(len(a)):
    item_from_a = a[idx]
    item_from_b = b[idx]
    if item_from_a == item_from_b:
        c += 1
    elif item_from_a in b_set:
        d += 1

有人能帮助我吗?我希望点击该行动态地附加到if (alv_table_1_row) is selected or if button is pressed append to alv_table_2

1 个答案:

答案 0 :(得分:1)

创建一个如下所示的本地类来处理ALV网格的<!-- Styled user-content inside some wrapper --> <div class="user-content"> <div class="wrapper"> <p>Hello!</p> </div> </div> <!-- A component inside user-content should be unstyled --> <div class="user-content"> <dov class="component"> <p>Hello!</p> </dov> </div> <!-- But nested elements of a component still recieve styling --> <div class="user-content"> <div class="component"> <div class="wrapper"> <p>Hello!</p> </div> </div> </div>行事件。

double-click

在初始化左ALV后,在代码中的某处注册事件处理程序。

class lcl_alv_event_receiver definition.

  public section.

  methods:  handle_double_click.
    for event double_click of cl_gui_alv_grid
        importing e_row e_column.

endclass.  

class lcl_alv_event_receiver implementation.

    method handle_double_click.
        " Your event handler code here like below
        " read table alv_table_1 index e_row-index into ls_row.
        " append ls_row to alv_table_2.
        " alv_table_2_grid->refresh_table_display( ).
    endmethod.

endclass.