Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select stmt.

Former Member
0 Likes
569

i suppose to add ename and parvw to respective i_sales_cust1. here i am able to add itab but for particular means ename to i_sales_cust1-ename, the syntax i have forgotten. can u help me.

select single aPARVW Bename from KNVP AS A INNER JOIN Pa0001 AS B

ON Aprnr = Bprnr into i_SALES_CUST1

where kunnr = i_sales_cust1-pkunag.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
535

hey u can do like this na.

select single aPARVW Bename into (i_sales_cust1-parvw, i_sales_cust1-ename) from KNVP AS A INNER JOIN Pa0001 AS B

ON Aprnr = Bprnr where kunnr = i_sales_cust1-pkunag.

4 REPLIES 4
Read only

Former Member
0 Likes
535

Hi,

select single a~PARVW

B~ename

from KNVP AS A

INNER JOIN Pa0001 AS B

ON APERNR = BPERNR into i_SALES_CUST1

where kunnr = i_sales_cust1-pkunag.

If you know the values of VKORG

VTWEG

SPART

PARVW

PARZA

also include them in the where clause.

Best regards,

Prashant

Read only

Former Member
0 Likes
535

Hi Kalyan,

Try below code.

select aPARVW Bename into corresponding fields of i_sales_cust1 from KNVP AS A INNER JOIN Pa0001 AS B

ON Aprnr = Bprnr into i_SALES_CUST1

where A~kunnr = i_sales_cust1-pkunag.

if sy-subrc = 0 "means first record selected

exit. "so that only 1 record is moved

endselect.

Cheers,

Vikram

Read only

Former Member
0 Likes
535

Hi,

Just try this-

select single a~PARVW

B~ename

into corresponding fields of i_sales_cust1

from KNVP AS A INNER JOIN Pa0001 AS B

ON Aprnr = Bprnr into i_SALES_CUST1

where A~kunnr = i_sales_cust1-pkunag.

Hope this helps u.

Regards,

Seema.

Read only

Former Member
0 Likes
536

hey u can do like this na.

select single aPARVW Bename into (i_sales_cust1-parvw, i_sales_cust1-ename) from KNVP AS A INNER JOIN Pa0001 AS B

ON Aprnr = Bprnr where kunnr = i_sales_cust1-pkunag.