‎2008 Aug 08 10:08 AM
Hi all I made a select query and its giving me a strange error.
"Unknown column name "a~BUKRS". not determined until runtime, you
cannot specify a field list."
Plz suggest...
select a~bukrs
a~fkdat
a~spart
b~vbeln
b~posnr
b~matnr
b~zzpernr
c~werks
b~zzfname
b~zzlname
b~ps_psp_pnr
b~spart
into table git_data
from ( vbak as a join vbap as b
on avbeln = bvbeln )
join pa0001 as c
on
cpernr = bzzpernr
where a~vbeln in so_vbeln
and a~bukrs in so_bloc
and b~spart in so_bu
and b~ps_psp_pnr in so_proj
and b~zzpernr in so_epno
and a~fkdat in so_per
and a~fksto ne 'X'
and a~fkart ne 'S1'
and c~werks in so_loc
and c~endda in '99991231'.
‎2008 Aug 08 10:11 AM
(In ECC 6.0) there is no field BUKRS in VBAK, only BUKRS_VF.
Thomas
‎2008 Aug 08 10:11 AM
(In ECC 6.0) there is no field BUKRS in VBAK, only BUKRS_VF.
Thomas
‎2008 Aug 08 10:11 AM
Hi,
The error is because the table VBAK i.e a does not have field called BUKRS.
Regards,
Sujit
‎2008 Aug 08 10:12 AM
>"Unknown column name "a~BUKRS". not determined until runtime, you
There is no field BUKRS in VBAK that is the reason you are getting the syntax error.
select a~BUKRS_VF "Try this
a~fkdat
a~spart
b~vbeln
b~posnr
b~matnr
b~zzpernr
c~werks
b~zzfname
b~zzlname
b~ps_psp_pnr
b~spart
into table git_data
from ( vbak as a join vbap as b
on avbeln = bvbeln )
join pa0001 as c
on
cpernr = bzzpernr
‎2008 Aug 08 10:14 AM
Plz change your query as per bold area
select a~bukrs_vf
a~fkdat
a~spart
b~vbeln
b~posnr
b~matnr
b~zzpernr
c~werks
b~zzfname
b~zzlname
b~ps_psp_pnr
b~spart
into table git_data
from ( vbak as a join vbap as b
on avbeln = bvbeln )
join pa0001 as c
on
cpernr = bzzpernr
where a~vbeln in so_vbeln
and a~bukrs_vf in so_bloc
and b~spart in so_bu
and b~ps_psp_pnr in so_proj
and b~zzpernr in so_epno
and a~fkdat in so_per
and a~fksto ne 'X'
and a~fkart ne 'S1'
and c~werks in so_loc
and c~endda in '99991231'.
‎2008 Aug 08 10:19 AM
Hi Shashank,
As others have also said, the field name is as BUKRS_VF in table VBAK that is Company code to be billed.
So change BUKRS to BUKRS_VF in your select query whether is are working in ECC 6.0 or ECC 4.7.
With luck,
Pritam.