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: 

DATE Comparison

Former Member
0 Kudos
217

hi

I am new to ABAP, I want to know how to choose data from VBAK which has ERDAT ( Date of creation ) after a particular date say 15-08-2004..

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos
129

Welcome to SDN.

data: itab type standard table of VBAK .

select * from vbak into table itab where erdat gt '20040815' .

http://help.sap.com

Regards

Raja

6 REPLIES 6

Former Member
0 Kudos
129

Hi rahul,

1. simple.

2. just copy paste in new program.

(u can give any date on selection screen)

report abc.

*----


data : vbak like table of vbak with header line.

*----


parameters : erdat like vbak-erdat default sy-datum.

*----


select * from vbak

into table vbak

<b>where erdat > erdat.</b>

*----


regards,

amit m.

Former Member
0 Kudos
129

hi Rahul

use select statement for that

v_date type d value '15082004'.

<b>select * from vbak

into table vbak

where erdat > v_date</b>

athavanraja
Active Contributor
0 Kudos
130

Welcome to SDN.

data: itab type standard table of VBAK .

select * from vbak into table itab where erdat gt '20040815' .

http://help.sap.com

Regards

Raja

Former Member
0 Kudos
129

Hi Rahul,

Use

SELECT * FROM VBAK INTO TABLE ITAB

WHERE ERDAT > 'GIVE THE DATE'.

HOPE THIS HELPS,

PRIYA.

former_member188685
Active Contributor
0 Kudos
129

Hi,


data: it_vbak type  table of vbak .

select *
      from vbak
      into table it_vbak
    where erdat gt '20040815' .

Regards

vijay

former_member635028
Active Participant
0 Kudos
129

Hi,

select erdat from VBAK into v_erdat where erdat > '15.08.2004'.

IF u want select all fileds use

select * from vbak into itab where erdat > '15.08.2004'.

holp this will help you.

Regards,

Sreevani.