Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

loop at gt_lips into ls_lips. data lv_uecha like lips-uecha. clear lv_uecha.

select single uecha into lv_uecha from lips where uecha = ls_lips-posnr. if sy-subrc = 0. delete gt_lips. endif. endloop. if sy-subrc = 0. read table gt_lips into gs_lips1st index 1. endif.

LOOP AT gt_lips INTO ls_lips. READ TABLE gt_lips INTO wa_lips WITH KEY uecha = LS_LIPS-POSNR. IF sy-subrc = 0. DELETE gt_lips. ENDIF. ENDLOOP. IF sy-subrc = 0. READ TABLE gt_lips INTO gs_lips1st INDEX 1. ENDIF.

clear gs_likp. clear gs_lips1st. iv_vbeln = is_dlv_delnote-hd_gen-deliv_numb. select single * into corresponding fields of gs_likp from likp where vbeln = iv_vbeln. refresh gt_lips. select * into corresponding fields of table gt_lips from lips where vbeln = iv_vbeln and lfimg > 0. data ls_lips like lips. clear ls_lips. data: wa_lips like ls_lips. loop at gt_lips into ls_lips. read table gt_lips into wa_lips with key uecha = ls_lips-posnr. if sy-subrc = 0. delete gt_lips. endif. endloop. if sy-subrc = 0. read table gt_lips into gs_lips1st index 1. endif.

You might also like