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

Syntax error

Former Member
0 Likes
3,377

select addrnumber name1 street str_suppl1 city1 region post_code1 country <b>countrycode</b> tel_number

from adrc inner join t005t on adrccountry = t005tland1

into table itab3

for all entries in itab1

where addrnumber = itab1~adrnr

and t005tspras = sylangu.

I am getting error Unknown column name "COUNTRYCODE". not determined until runtime, you cannot specify a field list.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,641

Hi,

Please try this.


select adrc~addrnumber 
       adrc~name1 
       adrc~street 
       adrc~str_suppl1 
       adrc~city1 
       adrc~region 
       adrc~post_code1 
       t005t~landx
       adrc~country  
       adrc~tel_number
from adrc inner join t005t on adrc~country = t005t~land1
into table itab3
for all entries in itab1
where adrc~addrnumber = itab1~adrnr       
and t005t~spras = sy~langu.

Regards,

Ferry Lianto

10 REPLIES 10
Read only

Former Member
0 Likes
1,641

Hi!

In ADRC, there is no COUNTRYCODE, only COUNTRY field.

Simply delete it from your code.

Regards

Tamá

Read only

Former Member
0 Likes
1,641

hi

select addrnumber name1 street str_suppl1 city1 region post_code1 <b>adrc~country</b> tel_number

from adrc inner join t005t on adrccountry = t005tland1

into table itab3

for all entries in itab1

where addrnumber = itab1~adrnr

and t005tspras = sylangu.

regards

madhu

Message was edited by:

Madhumitha Vasudevan

Read only

Former Member
0 Likes
1,641

Hi,

There is no country code field available neither in table ADRC or T005T. Please check your mapping or requirement.


select addrnumber name1 street str_suppl1 city1 region post_code1 country  tel_number
from adrc inner join t005t on adrc~country = t005t~land1
into table itab3
for all entries in itab1
where adrc~addrnumber = itab1~adrnr      <-- add adrc~
and t005t~spras = sy~langu.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,641

Hi,

If you look at the table ADRC, you can not find the Column<b> Countrycode,</b>

Regards

Sudheer

Read only

Former Member
0 Likes
1,641
data: begin of itab3 occurs 0,
      adrnr like adrc-addrnumber,
      name1 like adrc-name1,
      address1 like adrc-street,
      address2 like adrc-str_suppl1,
      city like adrc-city1,
      state like adrc-region,
      zip like adrc-post_code1,
      countrytxt like t005t-landx,
      country like adrc-country,
      telnum like adrc-tel_number,
      end of itab3,
      wa_itab3 like itab3.

select addrnumber name1 street str_suppl1 city1 region post_code1 countrytxt country tel_number
from adrc inner join t005t on adrc~country = t005t~land1
into table itab3
for all entries in itab1
where addrnumber = itab1~adrnr
and t005t~spras = sy~langu.

I need to get the text of the country from table t005t so i am using a join. I still get the error Unknown column name "COUNTRYTXT". not determined until runtime, you cannot specify a field list.

Read only

0 Likes
1,641

hi

data: begin of itab3 occurs 0,

adrnr like adrc-addrnumber,

name1 like adrc-name1,

address1 like adrc-street,

address2 like adrc-str_suppl1,

city like adrc-city1,

state like adrc-region,

zip like adrc-post_code1,

<b>landx</b> like t005t-landx,

country like adrc-country,

telnum like adrc-tel_number,

end of itab3,

wa_itab3 like itab3.

select addrnumber name1 street str_suppl1 city1 region post_code1 <b>landx</b> country tel_number

from adrc inner join t005t on adrccountry = t005tland1

into table itab3

for all entries in itab1

where addrnumber = itab1~adrnr

and t005tspras = sylangu.

regards,

madhu

Read only

Former Member
0 Likes
1,643

Hi,

Please try this.


select adrc~addrnumber 
       adrc~name1 
       adrc~street 
       adrc~str_suppl1 
       adrc~city1 
       adrc~region 
       adrc~post_code1 
       t005t~landx
       adrc~country  
       adrc~tel_number
from adrc inner join t005t on adrc~country = t005t~land1
into table itab3
for all entries in itab1
where adrc~addrnumber = itab1~adrnr       
and t005t~spras = sy~langu.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,641

Hi Megan,

Might be you have declared "countrycode" in other name, so please verify the table once before making the join and then proceed.

The only possibility of getting the error is that you have given different name for it, please check it and then check it.

Thanks and regards

Vipin Das

Read only

Former Member
0 Likes
1,641

Madhu .. that does not work .. instead of landx variable i am using countrytxt but doing the same thing that u mention

Read only

0 Likes
1,641

hi

select addrnumber name1 street str_suppl1 city1 region post_code1 landx country tel_number

from adrc inner join t005t on adrccountry = t005tland1

into table itab3

for all entries in itab1

where addrnumber = itab1~adrnr

and t005t~spras = sy<b>-</b>langu. " chk sy-langu

  • use -(hypen) instead of ~ tilda

regards

madhu