mo_grid->get_selected_rows( IMPORTING et_index_rows = lt_index_rows ).
LOOP AT lt_index_rows ASSIGNING FIELD-SYMBOL(<fs_index_row>).
ASSIGN gt_table[ <fs_index_row>-index ] TO <fs_record>.
IF sy-subrc = 0.
APPEND CORRESPONDING #( <fs_record> ) TO lt_message_header.
ENDIF.
ENDLOOP.
lo_proxy=>read_details( EXPORTING it_message_headers = lt_message_header
RECEIVING rs_read_out = ls_read_out ).
mo_grid->get_selected_rows( IMPORTING et_index_rows = lt_index_rows ).
LOOP AT lt_index_rows ASSIGNING FIELD-SYMBOL(<fs_index_row>).
ASSIGN gt_table[ <fs_index_row>-index ] TO <fs_record>.
IF sy-subrc = 0.
APPEND VALUE #( record = REF #( <fs_record> ) ) TO lt_reference_table.
APPEND CORRESPONDING #( <fs_record> ) TO lt_message_header.
ENDIF.
ENDLOOP.
lo_proxy=>read_details( EXPORTING it_message_headers = lt_message_header
RECEIVING rs_read_out = ls_read_out ).
LOOP AT lt_reference_table ASSIGNING FIELD-SYMBOL(<fs_reference>).
ASSIGN lt_read_out[ sy-tabix ] TO <fs_read_out>.
IF sy-subrc = 0.
<fs_reference>-record->* = CORRESPONDING #( <fs_read_out> ).
ENDIF.
ENDLOOP.
TYPES: tt_i TYPE TABLE OF i WITH DEFAULT KEY,
tt_string TYPE TABLE OF string WITH DEFAULT KEY,
BEGIN OF ty_reference,
record TYPE REF TO string,
END OF ty_reference,
tt_reference TYPE STANDARD TABLE OF ty_reference WITH DEFAULT KEY.
DATA(lt_indexes) = VALUE tt_i( ( 1 ) ( 3 ) ( 7 ) ).
DATA(lt_table) = VALUE tt_string( ( |name1| ) ( |name2| ) ( |name3| ) ( |name4| ) ( |name5| ) ( |name6| ) ( |name7| ) ).
DATA(lt_reftab) = VALUE tt_reference( ).
lt_reftab = VALUE #( FOR i IN lt_indexes ( record = REF #( lt_table[ i ] ) ) ).
LOOP AT lt_reftab ASSIGNING FIELD-SYMBOL(<fs_row>).
<fs_row>-record->* = |{ <fs_row>-record->* }_ref|.
ENDLOOP.
LOOP AT lt_table ASSIGNING FIELD-SYMBOL(<fs_line>).
WRITE: / <fs_line>.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |