Code: Alles auswählen.
LOOP AT lt_1251 INTO ls_1251.
IF lh_agr_name NE ls_1251-agr_name.
CLEAR ls_ag.
ls_ag-ag = ls_1251-agr_name.
ls_ag-t_object = lt_obj.
IF lh_object NE ls_1251-object.
CLEAR: lt_obj, ls_obj.
ls_obj-object = ls_1251-object.
ls_obj-t_field = lt_fld.
IF lh_field NE ls_1251-field.
CLEAR: lt_fld, ls_fld.
ls_fld-field = ls_1251-field.
ls_fld-t_value = lt_val.
IF lh_value NE ls_1251-low.
CLEAR: lt_val, ls_val.
ls_val-low = ls_1251-low.
IF lh_value NE ls_1251-high.
CLEAR: lt_val, ls_val.
ls_val-high = ls_1251-high.
ENDIF.
APPEND ls_val TO lt_val.
ENDIF.
APPEND ls_fld TO lt_fld.
ENDIF.
APPEND ls_obj TO lt_obj.
ENDIF.
APPEND ls_ag TO gt_ag.
ENDIF.
ENDLOOP.
Code: Alles auswählen.
LOOP AT lt_1251 INTO ls_1251.
IF lh_agr_name NE ls_1251-agr_name.
Code: Alles auswählen.
CLEAR ls_ag.
ls_ag-ag = ls_1251-agr_name.
ls_ag-t_object = lt_obj.
IF lh_object NE ls_1251-object.
Code: Alles auswählen.
CLEAR: lt_obj, ls_obj.
ls_obj-object = ls_1251-object.
ls_obj-t_field = lt_fld.
IF lh_field NE ls_1251-field.
Code: Alles auswählen.
CLEAR: lt_fld, ls_fld.
ls_fld-field = ls_1251-field.
ls_fld-t_value = lt_val.
IF lh_value NE ls_1251-low.
CLEAR: lt_val, ls_val.
ls_val-low = ls_1251-low.
IF lh_value NE ls_1251-high.
CLEAR: lt_val, ls_val.
ls_val-high = ls_1251-high.
ENDIF.
APPEND ls_val TO lt_val.
ENDIF.
APPEND ls_fld TO lt_fld.
ENDIF.
APPEND ls_obj TO lt_obj.
ENDIF.
APPEND ls_ag TO gt_ag.
ENDIF.
ENDLOOP.
Code: Alles auswählen.
FORM get_data .
DATA: lt_1251 TYPE TABLE OF agr_1251,
ls_1251 TYPE agr_1251,
ls_ag TYPE gy_ag,
lh_agr_name TYPE agr_1251-agr_name,
lh_object TYPE pt1251-object,
lh_field TYPE tprfield,
lh_value TYPE xuval,
lt_val TYPE gyt_value,
ls_val TYPE gy_value,
lt_fld TYPE gyt_field,
ls_fld TYPE gy_field,
lt_obj TYPE gyt_object,
ls_obj TYPE gy_object.
* 1) Rollen lesen
SELECT * FROM agr_1251
INTO TABLE lt_1251
WHERE agr_name IN s_agr.
LOOP AT lt_1251 INTO ls_1251.