Application Development 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: 

Select Statement

Former Member
0 Kudos
150

Hi friends,

I need to display all the documents up to date(i.,e <= that date) mention on selection-screen.How can I proceed?

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
132

Hi,

in where condition of your select query give

date_field LE p_date as also told by others where p_date is your user input on the selection screen

With luck,

Pritam.

6 REPLIES 6

Former Member
0 Kudos
132

Hi Hosmath,

Try this.

Select *

from <dbtable>

where t_date LE s_date.

s_date - from selection screen.

Hope this helps you.

Regards,

Chandra Sekhar

Former Member
0 Kudos
132

hi,

First find the Date field of your table.

then Apply the following Code.

select * from <table>

Into table <itab>

where date-field LE <sel screen field>

Regards

Sumit Agarwal

0 Kudos
132

hi,

I have code like this.....

TABLES:zfi_way_bill.

TYPE-POOLS:slis.

TYPES:BEGIN OF ty_tab,

bill_no TYPE zfi_way_bill-bill_no,

issued_on TYPE zfi_way_bill-issued_on,

issued_to TYPE zfi_way_bill-issued_to,

vendor TYPE zfi_way_bill-vendor,

customer TYPE zfi_way_bill-customer,

bill_status TYPE zfi_way_bill-bill_status,

END OF ty_tab.

DATA:it_tab TYPE STANDARD TABLE OF ty_tab INITIAL SIZE 0 WITH HEADER LINE,

wa_tab TYPE ty_tab.

DATA: i_repid LIKE sy-repid,

i_lines LIKE sy-tabix.

DATA: i_fcat TYPE slis_t_fieldcat_alv.

DATA: wa_fieldcat TYPE slis_fieldcat_alv.

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.

PARAMETERS:co_code TYPE bukrs DEFAULT '5000'.

SELECT-OPTIONS:date FOR zfi_way_bill-issued_on NO INTERVALS NO-EXTENSION.

SELECTION-SCREEN:END OF BLOCK b1.

SELECT bill_no

issued_on

issued_to

vendor

customer FROM zfi_way_bill INTO TABLE it_tab WHERE issued_on IN date AND bill_status EQ '1'.

describe table it_tab lines i_lines.

if i_lines lt 1.

write: / 'NO RECORDS FOUND'.

exit.

endif.

i want to fetch all the details up to the date my client enters on selection-screen.

Hope I'm clear with my requirement........

Former Member
0 Kudos
133

Hi,

in where condition of your select query give

date_field LE p_date as also told by others where p_date is your user input on the selection screen

With luck,

Pritam.

Former Member
0 Kudos
132

hi,

Instead of In clause use

Where <field> BETWEEN date-low AND date-high...

That will Do.

Regards

Sumit Agarwal

0 Kudos
132

Thanks guys......