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

how to convert date without using conversion exit?

Former Member
0 Likes
522

hi!! Guys,

please can anybody help me how to compare date which is not in actual format

i.e. (when comparing BKPF-budat with TCURR-gdatu in where condition of a Select query its giving syntax error "when you use the addition 'fOR ALL ENTRIES IN itab' the fields gdatu and it_bkpf-budat" must have the same type and the same length. its very urgent...

thanks in advance.

akanksha.

2 REPLIES 2
Read only

Former Member
0 Likes
428

Hi,

Budat in bkpf is of data type DATS

gdatu is of data type char of length type 8.

Declare the gdatu as of type data type dats.

Regards

Read only

Former Member
0 Likes
428

try like this.

data : year(4),

mon(2),

day(2).

in itab declare field cbudat(8) type c.

loop at itab.

year = itab-budat(4).

mon = itab-budat+4(2).

day = itab-budat+6(2).

concatenate year mon day into itab-cbudat.

modify itab.

endloop.

now use select for all entries and check gdatu = itab-cbudat.

regards

shiba dutta