02-03-2009 5:18 AM
Hi,
I have written a query in ABAP.I am getting following error.Can some one help me resolve this.There is a column "LANDX" in standard table T005 of PI which i need to get values from. The problem is that the column is visible only at runtime and not otherwise.How can i fetch data from this coulmn writing a select query for this.
Query written is:
SELECT landx from T005 into table it_t005.
Error:
"Unknown column name "XYZ" not determined untill runtime,you cannot specify a field list."
02-03-2009 5:27 AM
02-03-2009 5:27 AM
02-03-2009 5:31 AM
Hi.
It is LANDK instead of LANDX.
so just change it.
hope then will be no error
02-03-2009 5:34 AM
Hi.
use it as.
REPORT ztn_test.
tables: t005.
data: it_t005 like STANDARD TABLE OF t005 WITH HEADER LINE.
SELECT landk from T005 into CORRESPONDING FIELDS OF TABLE it_t005.
02-03-2009 5:38 AM
If Tcode se11 is used to view data in T005 column "LANDX " is also shown.
Is thre any other standard table where in i can get countries name as well as their ISO country codes.?
02-03-2009 5:40 AM
Hi Deepika.
I have find it using SE11 but not find any landx field.
but it have XLAND instead of LANDX.
please check it again
02-03-2009 5:40 AM
Column "LANDK" is the vehicle country code. My requirement is Country names and their ISO codes both.
02-03-2009 5:42 AM
Try this FM COUNTRY_CODE_SAP_TO_ISO.
Else the fields for Country Name & ISO Code are:
Country Name --> T005T-LANDX
ISO Code --> T005-INTCA
BR,
Suhas
Edited by: Suhas Saha on Feb 3, 2009 11:13 AM
02-03-2009 5:44 AM
Hi .
SELECT landk intca from T005 into CORRESPONDING FIELDS OF TABLE it_t005.
landk is country short name and intca is it's ISO Code
02-03-2009 5:47 AM
SELECT lkvrz intca from T005 into CORRESPONDING FIELDS OF TABLE it_t005.
now lkvrz is country short name and intca is country iso code
02-03-2009 6:00 AM
Hi Deepika u were right. that there is a landx field but it is included in that table.
so u cant exactly get it.
now u can get ur country name and iso code just like this.
tables: t005t , t005.
data: BEGIN OF it OCCURS 100,
landx like t005t-landx,
intca like t005-intca,
END OF it.
SELECT t005t~landx t005~intca into CORRESPONDING FIELDS OF TABLE it
from T005t
INNER JOIN t005 on ( t005t~land1 = t005~land1 ).
it is fulfilling ur need.
Edited by: Matt on Feb 3, 2009 7:49 AM - Please don't use txtspk
02-03-2009 6:04 AM
Hello Tahir,
Great ... You reply to my post & state:
Hi Deepika u were right
I am Suhas & not Deepika )
Reported !!!
Cheers,
Suhas
02-03-2009 6:08 AM
oops suhas brother.
i did not check ur reply.
while posting i was checking the table after executing and it was showing landx field. then i check this field by using f1 key and check that it's table is t005t instead t005 so i beagan to write code for inner join.and may be in mean while u posted. however sorry
02-03-2009 8:01 AM
02-03-2009 5:34 AM
Hi ,
Please check the data base field name
and check it with your select query field name that you are passing
Thanks
Arun Kayal