make it as one select statement!
See my coding..,
data: customer like kna1-kunnr, name like kna1-name1. parameter: p_filed1 like ztable-filed1 select single kunnr from ztable into customer where filed1 = p_filed1. if sy-subrc = 0. select single name1 from kna1 into name where kunnr = custmer. endif.
So I can pass this name into other parameter(function modules) with out READ and LOOP statements as you know..
Now my question is how can modify above coding with one select statement.
I want name entry in variable only...
Try to change the piece of code as follows:
select single kna1~name1
from kna1 inner join ztable
on kna1kunnr = ztablekunnr
where ztable~filed1 = p_filed1.
Thanks & Regards,