In end-of-selection if first loop has data and second loop has no data i.e if kna1-kunnr has definitely one customer and he may or may not have sales header i.e vbak-vbeln....if second loop fails i want the data of first loop how write the code can u xplain plz....
loop at t_kna1 into w_kna1.
loop at t_vbak into w_vbak where kunnr = w_kna1-kunnr.
write : w_kna1-kunnr , w_kna1-name1 w_kna1-ort01 ,w_vbak-vbeln
in above stmt if both are true nly data is written .if second loop fails i want to write the data of first loop how to write it can any one xplain.