‎2007 Nov 18 10:04 AM
I have 2 records in my table if I write the below select st. I'm not getting the records
SELECT * FROM z_emp INTO CORRESPONDING FIELDS OF TABLE it_tab
WHERE z_uname = pa_empno and z_date = pa_date.
but if I write the select st. without where clause as below I'm getting the records that I have
SELECT * FROM z_emp INTO CORRESPONDING FIELDS OF TABLE it_tab.
Can you please explain why? Thanks in advance
‎2007 Nov 18 10:15 AM
Hi Shaheen,
SELECT * FROM z_emp INTO CORRESPONDING FIELDS OF TABLE it_tab
<b>WHERE z_uname = pa_empno and z_date = pa_date.</b>
Probably... u r not getting the records becoz the records exist in z_emp table which matches ur requirement z_uname = pa_empno and z_date = pa_date
try to get it manually ...
or look whether the records presents or not as per ur criteria through SE11 ...
Display z_emp nd try to see the records in that... enter ur criteria in parameters here..
Hope it will solve ur problem..
<b>Reward points if useful...</b>
Thanks & Regards
ilesh 24x7
‎2007 Nov 18 10:15 AM
Hi Shaheen,
SELECT * FROM z_emp INTO CORRESPONDING FIELDS OF TABLE it_tab
<b>WHERE z_uname = pa_empno and z_date = pa_date.</b>
Probably... u r not getting the records becoz the records exist in z_emp table which matches ur requirement z_uname = pa_empno and z_date = pa_date
try to get it manually ...
or look whether the records presents or not as per ur criteria through SE11 ...
Display z_emp nd try to see the records in that... enter ur criteria in parameters here..
Hope it will solve ur problem..
<b>Reward points if useful...</b>
Thanks & Regards
ilesh 24x7
‎2007 Nov 18 10:18 AM
1) Are you passing the right field in the select query (Is Empno and Username the same field or by mistake you are comparing UNAME with the Employee Number field )
2) Check if the data is present in the database with the parameters that you are using for testing.
‎2007 Nov 18 12:13 PM
Hi,
Check Z_EMP is having the records with date pa_date you are passing.
Regards,
Satish
‎2007 Nov 18 4:16 PM
You may have to run pa_empno through a conversion exit to pad it with the correct number of leading zeroes. Look at FMs <b>conversion_exit_ alpha_input</b> and <b>conversion_exit_ alpha_output</b>.
Rob
‎2007 Nov 18 5:34 PM
Hi Shaheen
In you question you said that you have 2 record in the table. Does that mean there are only two records in the table or 2 records that satisfy the condition in where clause.
In both the cases.
The only thing can be that parameters that you are selecting in the SELECT statement does not match.
As previous replies suggested check out in SE16 Data Browser. If any concerns please reply.