2007 Jul 19 8:07 AM
hi all,
when i put AUFNR = AUFNR in where condition
syntax error is aufnr has two meaning in open sql
what it means?
plz tell me.
regards
sonu
Hi Sonu
On one side declare your internal table aufnr and on other side declare your table aufnr
Can i have your part of coding please
Reward all helpfull answers
Regards
Pavan
2007 Jul 19 8:09 AM
Just change the variable name AUFNR to something else like V_AUFNR.
so new query would be AUFNR = V_AUFNR
2007 Jul 19 8:09 AM
Hi Sonu
On one side declare your internal table aufnr and on other side declare your table aufnr
Can i have your part of coding please
Reward all helpfull answers
Regards
Pavan
2007 Jul 19 8:10 AM
Hi,
you need to specify the table name before aufnr.
table1-AUFNR = table2-AUFNR.
regards,
Ruchika
2007 Jul 19 8:10 AM
Hello,
If you are using a Join Statement then specify the alias name for the aufnr
i.e
SELECT F~CARRID F~CONNID F~FLDATE
INTO (CARRID, CONNID, DATE)
FROM SFLIGHT AS F INNER JOIN SPFLI AS P
ON F~CARRID = P~CARRID AND
F~CONNID = P~CONNID
WHERE P~CITYFROM = 'FRANKFURT'
AND P~CITYTO = 'NEW YORK'
AND F~FLDATE BETWEEN '20010910' AND '20010920'
AND F~SEATSOCC < F~SEATSMAX.
WRITE: / DATE, CARRID, CONNID.
ENDSELECT.
As said above use a~ or any alphabet ~ in the where condition which you as used to select from.
If u r not using joins then change ur paramter aufnr to p_aufnr and then check.
Regards,
Deepu.K
.
2007 Jul 19 8:11 AM
Hi,
Tables:your table name
data: WA type your table name.(WA means work area)
select * form your table name where WA-AUFNR = AUFNR.
write: / 'success'.
(here WA-AUFNR is field of WA which is same as Actual AUFNR Which is present in data base table, whose value is specied by you at run time)
***********PLEASE REWARD POINTS IF THE INFORMATION IS HELPFUL TO YOU*************
2007 Jul 19 8:14 AM
HI,
UR CODE WORKS FINE FOR SELECT STATEMENT BUT IT DOESN'T WORK FOR INTERNAL TABLES.
FOR TO COMPARE FIELDS OF TWO INTERNAL AS
LOOP AT ITAB WHERE AUFNR = ITAB2-AUFNR.
.............................
.............................
ENDLOOP.
OR WHEN COMPARING WITH ANY PARAMETER IT AGAIN WORKS FINE
LOOP AT ITAB WHERE AUFNR = AUFNR. // AUFNR IS A PARAMETER.
...............
..............
ENDLOOP.
IF HELPFUL REWARD SOME POINTS.
WITH REGARDS,
SURESH.A
2007 Jul 19 8:16 AM
hi
u change aufnr as V_aufnr or s_aufnr.
then in select query write like this..
aufnr in v_aufnr.
reward if useful
2007 Jul 19 8:17 AM
Hello Sonu...
I think you are using this statement in a select query... If you are using innerjoin operation... You should use alias name also in where condition...
Like a~aufnr = aufnr.
Reward if helpful.
Regards
--
Sasidhar Reddy Matli.
2007 Jul 19 8:17 AM
SELECT A~VKORG " Sales Organization
A~BUKRS " Company Code
B~VTWEG " Distribution Channel
B~SPART " Division
FROM TVKO AS A JOIN TVTA AS B
ON AVKORG EQ BVKORG
INTO TABLE T_TVTA
FOR ALL ENTRIES IN T_KNB1_TEMP
WHERE A~VKORG IN S_SALORG
AND A~BUKRS EQ T_KNB1_TEMP-BUKRS
AND B~VTWEG IN S_DISCHA
AND B~SPART IN S_DIVI.
Change your select query similar to the above query.
Regards,
Pavan
2007 Jul 19 11:15 AM
hi sonu
if u have given AUFNR in select option then change it as s_AUFNR and write
where AUFNR in s_AUFNR.
if u have given AUFNR in parameters then change it as p_AUFNR and write
where AUFNR = p_AUFNR.
if u didnt declare it either in select options or parameters then write
where AUFNR = tablename-AUFNR.
REWARD IF USEFUL....
2007 Jul 19 11:42 AM
HI
(is table field on which u want to put condition )AUFNR = AUFNR ( this should refer to the variable or the field from int table , change name here u may get through) Praveen
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |