‎2008 Oct 01 6:38 AM
Hi..,
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...
Thanks,
Naveen.I
‎2008 Oct 01 6:58 AM
Hi,
Try to change the piece of code as follows:
select single kna1~name1
into name
from kna1 inner join ztable
on kna1kunnr = ztablekunnr
where ztable~filed1 = p_filed1.
Thanks & Regards,
Navneeth K.
‎2008 Oct 01 6:42 AM
‎2008 Oct 01 6:44 AM
Hi..,
Yes, I can join.
But how i can pass name1 into single variable, please get back with sample code..,
Thanks,
Naveen.i
‎2008 Oct 01 6:47 AM
Hi,
You did not mention all the fields of the ztable.
So if you have common key fields in both ztable and kna1 then you can Join both the table in single select statement.
‎2008 Oct 01 6:58 AM
Hi,
Try to change the piece of code as follows:
select single kna1~name1
into name
from kna1 inner join ztable
on kna1kunnr = ztablekunnr
where ztable~filed1 = p_filed1.
Thanks & Regards,
Navneeth K.