‎2010 May 19 5:54 AM
Hi Experts,
Please let me know why my select statement is failing to get data form transparent table REGUH. My code query is as below:
SELECT * FROM REGUH WHERE
LAUFD = RUN_DATE AND
LAUFI = ID AND
LIFNR = P0009-PERNR AND
RZAWE = 'C'.
MOVE REGUH-RWBTR TO CASH.
CASH = CASH * -1.
ENDSELECT.
REGUH table has data for the given query but it is not retreiving the data.Please let me know what is the problem with the query
because of which it is not fetching the data.The same query is working fine in Developement but fails in production may be because one new patch is updated.please help asap.
‎2010 May 19 6:07 AM
Hi,
Do one simple thing debug the program, the variable assign in sql not the value of all variable and open table in se16 and put all value which receiving in the dubug. you get exact situaltion over there. Some time happend people define select option for input and while select SQL use = sign insted of in.
Try this.
Rgds
Ravi Lanjewar
‎2010 May 19 6:07 AM
Hi,
Do one simple thing debug the program, the variable assign in sql not the value of all variable and open table in se16 and put all value which receiving in the dubug. you get exact situaltion over there. Some time happend people define select option for input and while select SQL use = sign insted of in.
Try this.
Rgds
Ravi Lanjewar
‎2010 May 19 6:16 AM
No, i have checked it already all variables are under parameter statement only and there is data in the table for the provided query i have checked it during debbuging.
‎2010 May 19 6:22 AM
Ankita,
try to add where condition one by one and check whether select query is able to fetch data
Thanks
Bala Duvvuri
‎2010 May 19 8:15 AM
Hi ,
Actually the same query is running fine in development and QA but fails in production.Can you tell any reason why is it happening?
Rgds,
Ankita
‎2010 May 19 8:37 AM
Hi Ankita,
Why you are going for select *
Try This...
SELECT SINGLE RWBTR
INTO v_RWBTR
WHERE LAUFD = RUN_DATE
AND LAUFI = ID
AND LIFNR = P0009-PERNR
AND RZAWE = 'C'.
MOVE v_RWBTR TO CASH.
CASH = CASH * -1.
Regards,
Raj.
‎2010 May 19 9:18 AM
Hi,
p0009 is a structure right....why you are given strucutre in condition
Regards,
Raj...
‎2010 May 19 8:42 AM
Hi,
I think there is a datatype mismatch between LIFNR (CHAR10) and P0009-PERNR(NUMC 8). Use the conversion exit and check the query again.
Regards
Vinod
‎2010 May 19 9:29 AM
Hi,
in REGUH are the fields LIFNR and PERNR.
LIFNR = WA_ITAB-LIFNR "if you have an LIFNR in WA_ITAB
or
PERNR = P0009-PERNR
LIFNR is CHAR 10
PERNR in NUMC 8.
Look via SE11 in REGUH.
Regards, Dieter
‎2010 May 19 9:46 AM
Hi Dieter,
You are right but why same things are running fine in DEV and QA but not in production?
Rgds,
Ankita
‎2010 May 19 9:57 AM
Hi,
do you have the same authority in all systems?
regards, Dieter
‎2010 May 19 10:09 AM
‎2010 Jun 23 12:57 AM
Hi,
I am facing the same issue with a select statement on Transparent Table in Development. I do not have any where conditions and the fields are declared based on the same Transparent Table.
I am just selecting two fields MATNR & PRDHA from MATKEY table, where both are not key fields. I am wondering why this happens?
Pls let me know if any one has the solution?
Thanks,
Naren
‎2010 Jul 06 9:54 PM
Mine got resolved.. The Variables I was using to read the data from the table had names starting with 'Z', which was the issue.
I changed the Variable names to some proper names and the select statement worked properly.
‎2010 May 19 9:51 AM
Hi,
Goto se16 what are the value pass the select query same value pass to database table manually.So you'll get the solution for it.
Thanks
With Regards
I.Muthukumar.
‎2010 May 19 10:07 AM
Hi Muthukumar.
Ya i have done the same and it is displaying the data for the same.
Rgds,
Ankita