Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

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...



Former Member replied


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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question