Code: Alles auswählen.
loop at s_datum.
add 1 to zeile.
spalte = 2.
perform fill_cell using zeile spalte s_datum-sign.
add 1 to spalte.
perform fill_cell using zeile spalte s_datum-option.
add 1 to spalte.
perform fill_cell using zeile spalte s_datum-low.
add 1 to spalte.
perform fill_cell using zeile spalte s_datum-high.
add 1 to spalte.
endloop.
add 1 to zeile.
loop at s_matnr.
add 1 to zeile.
spalte = 2.
perform fill_cell using zeile spalte s_matnr-sign.
add 1 to spalte.
perform fill_cell using zeile spalte s_matnr-option.
add 1 to spalte.
perform fill_cell using zeile spalte s_matnr-low.
add 1 to spalte.
perform fill_cell using zeile spalte s_matnr-high.
add 1 to spalte.
endloop.
add 1 to zeile.
...
Code: Alles auswählen.
perform ausgabe tables s_datum.
perform ausgabe tables s_matnr.
form ausgabe tables tmp_tab structure ? . "Vielleicht ein field-symbol?
loop at tmp_tab.
add 1 to zeile.
spalte = 2.
perform fill_cell using zeile spalte tmp_tab-sign.
add 1 to spalte.
perform fill_cell using zeile spalte tmp_tab-option.
add 1 to spalte.
perform fill_cell using zeile spalte tmp_tab-low.
add 1 to spalte.
perform fill_cell using zeile spalte tmp_tab-high.
add 1 to spalte.
endloop.
endform.
Code: Alles auswählen.
Data: begin of seltab occurs 0,
sign(1),
option(2),
low(132),
high(132),
end of seltab.
loop at s_.....
move-corresponding s_.... to seltab.
append seltab.
endloop.
perform ausgabe tables seltab.
form ausgabe tables tmp_tab structure seltab.
Code: Alles auswählen.
TABLES: mara.
DATA: dref TYPE REF TO data.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECT-OPTIONS: s_mtart FOR mara-mtart.
GET REFERENCE OF s_mtart[] INTO dref.
PERFORM loop_at_seltab USING dref.
GET REFERENCE OF s_matnr[] INTO dref.
PERFORM loop_at_seltab USING dref.
FORM loop_at_seltab USING p_dref TYPE REF TO data.
FIELD-SYMBOLS <table> TYPE ANY TABLE.
FIELD-SYMBOLS: <struct> TYPE ANY.
FIELD-SYMBOLS: <field> TYPE ANY.
ASSIGN dref->* TO <table>.
LOOP AT <table> ASSIGNING <struct>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <struct> TO <field>.
IF sy-subrc EQ 0.
WRITE: <field>.
ELSE.
SKIP.
EXIT.
ENDIF.
ENDDO.
ENDLOOP.
ENDFORM.