2008 Feb 03 10:11 AM
Hi,
I am using vbak, vbap, and kna1 tables to get sales order information. it_so and It_cu are my internal tables. To get the customer name from kna1 table, used the second query.
my query is:
select avbeln aaudat akunnr bposnr b~matnr
into corresponding fields of table it_so
from vbak as a
inner join vbap as b
on avbeln = bvbeln.
select kunnr name1
into table it_cu
from kna1
for all entries in it_so
where kunnr = it_so-kunnr.
For the above, I am getting "No component exists with the name KUNNR.
Please help. What I am doing wrong?
Thanks in advance.
Hi,
I am using vbak, vbap, and kna1 tables to get sales order information. it_so and It_cu are my internal tables. To get the customer name from kna1 table, used the second query.
my query is:
select avbeln aaudat akunnr bposnr b~matnr
into corresponding fields of table it_so
from vbak as a
inner join vbap as b
on avbeln = bvbeln.
select kunnr name1
into table it_cu
from kna1
for all entries in it_so
where kunnr = it_so-kunnr.
For the above, I am getting "No component exists with the name KUNNR.
Please help. What I am doing wrong?
Thanks in advance.
2008 Feb 03 10:20 AM
Hi ,
Try this logic.
select a~vbeln
a~audat
a~kunnr
b~posnr
b~matnr
into corresponding fields of table it_so
from vbak as a
inner join vbap as b
on avbeln = bvbeln.
if it_so[] is not initial.
select kunnr
name1
into table it_cu
from kna1
for all entries in it_so
where kunnr = it_so-kunnr.
endif.
2008 Feb 03 10:31 AM
Hi Thanks for the reply. No still not working.getting the same message.
I wrote these two queries in two different from.......endform. But it does not make any difference. Right?
Thank you.
2008 Feb 03 10:55 AM
Resolved the problem. I did not give Kunnr in internal table.
Thanks.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |