i have written the following code
LOOP AT gt_ekpo WHERE ebeln NE ' '.
MOVE gt_ekpo-ebeln TO gt_final-ebeln.
MOVE gt_ekpo-matnr TO gt_final-matnr.
READ TABLE gt_mara WITH KEY matnr = gt_ekpo-matnr BINARY SEARCH.
IF sy-subrc = 0.
MOVE gt_mara-bismt TO gt_final-bismt.
ENDIF.
READ TABLE gt_equi WITH KEY matnr = gt_ekpo-matnr BINARY SEARCH.
IF sy-subrc = 0.
MOVE gt_equi-invnr TO gt_final-invnr.
MOVE gt_equi-sernr TO gt_final-sernr.
ENDIF.
APPEND gt_final.
clear gt_final.
the problem is i am comparing all the fields with matnr and reading the remaing fields.
if matnr field is empty, then all the remaing fields are also empty except ebeln.
then when matnr is empty it should not display in the output.
please help me how to write code for this.