Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

date query

Former Member
0 Likes
921

Hi,

I am unable to execute the query.Its not working for date.

REPORT ZIRREPORT.

TABLES: ADRC,crmd_orderadm_h.

SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : country FOR ADRC-COUNTRY,

date FOR sy-datum .

PARAMETERS: user like crmd_orderadm_h-created_by,

category like crmd_srv_subject-codegruppe.

SELECTION-SCREEN END OF BLOCK bl1.

data : it_guid type table of CRMT_OBJECT_GUID.

select GUID

into table it_guid

from crmd_orderadm_h

where CREATED_BY = user

and PROCESS_TYPE = 'ZPG'

AND posting_date in date.

Thanks and Regards

Shilpi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
868

Hi Shilpi

DATE is a reserved word, we cant use it,

Change the declaration with some other name,

Hope it will work fine.

Regards,

Nitin.

7 REPLIES 7
Read only

Former Member
0 Likes
869

Hi Shilpi

DATE is a reserved word, we cant use it,

Change the declaration with some other name,

Hope it will work fine.

Regards,

Nitin.

Read only

Former Member
0 Likes
868

USe the following


REPORT ZIRREPORT.
TABLES: ADRC,crmd_orderadm_h.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : country FOR ADRC-COUNTRY,
s_date FOR sy-datum .
PARAMETERS: user like crmd_orderadm_h-created_by,
category like crmd_srv_subject-codegruppe.

SELECTION-SCREEN END OF BLOCK bl1.
data : it_guid type table of CRMT_OBJECT_GUID.
select GUID
into table it_guid
from crmd_orderadm_h
where CREATED_BY = user
and PROCESS_TYPE = 'ZPG'
AND posting_date in s_date.

Read only

Former Member
0 Likes
868

Hi,

What is the error message you are getting?

Regards,

Naveen

Read only

sarbajitm
Contributor
0 Likes
868

May be in the table, there is no data corresponding to the date range that you are providing. Otherwise the query is ok. Please Check giving only LOW option of DATE. Hope you may get some result from that. Also change DATE to V_DATE or S_DATE.......something like that.

Regards.

Sarbajit.

Edited by: Sarbajit Majumdar on Apr 7, 2009 11:35 AM

Read only

Former Member
0 Likes
868

Hi,

Check whether you passing data in field user and check the DB table has entry with the combination your checking for.

Read only

0 Likes
868

I am not getting ne error message.sy-subrc is 4 after execution of this query.This is not a data issue.

Regards

Shilpi

Read only

Former Member
0 Likes
868

Hi,

Try this way,,using "corresponding fields of"


select GUID
into *corresponding fields of* table it_guid
from crmd_orderadm_h
where CREATED_BY = user
and PROCESS_TYPE = 'ZPG'
AND posting_date in date.

regards,

naveen