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

Problem in select query

Former Member
0 Likes
610

Hi all,

Presently I am working with an outbound interface.In this object I have to fetch some data from table PA0168 based on some conditions.One of the condition is that the run date of the interface (sy-datum)will be in between BEGDA and ENDDA.

How I will write this code?because when I am writting that SY-DATUM is BW BEGDA and ENDDA,it is showing some syntax errors that sy-datum is not defined.I have also tried by taking sy-datum in a variable,but it showing the same syntax error.

Can any one help me out?

Waiting for your response.

Thanks in advance.

Raj

3 REPLIES 3
Read only

Former Member
0 Likes
509

Hi,

Put where condition as :

Select *
  into table itab
  from PA0168
where begda le sy-datum
  and  endda ge sy-datum.

Thanks & Regards,

Navneeth K.

Read only

Former Member
0 Likes
509

Hi

Hope this helps

In where clause use as

where begda le sy-datum

and endda ge sy-datum.

REegards

Hitesh

Close this thread once your query is resolved

Read only

Former Member
0 Likes
509

Hi,

Try out like this:

Select * from PA0168

into corresponding fields of table<int table name>

Where sy-datum ge BEGDA

and Sy-datum le ENDDA.

Hope it will work.

Thanks

Rajesh Kumar