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

internal tables and dates

Former Member
0 Likes
879

hi all ,

i got 2 internal tables ,say itab1 and itab2.

itab1 is of like standarad table qmel.

itab2 is having all the feilds of qmel ie, of same structure of qmel but all feilds of type c .

i am uploading data from my flat file to my itab2 and further passing it to itab1.

everything is going fine but, there is 1 fields of date.

which in my flat file is of value 00:00:0000 now this value is coming to my itab2

but when i pass it to itab1 it takes 0.

rest where there is a true date like 01:02:2007 its working fine .

my date field is of type c and length 10.

so is the data passing correctly? becuase for rest of dates its going fine.

let me know if i need to do any changes if yes then like wot?.

1>i have already changed the dates to form yyyy:mm:dd database type

points for sure for solving the problem

thnkx

bhanu

hi all ,

i got 2 internal tables ,say itab1 and itab2.

itab1 is of like standarad table qmel.

itab2 is having all the feilds of qmel ie, of same structure of qmel but all feilds of type c .

i am uploading data from my flat file to my itab2 and further passing it to itab1.

everything is going fine but, there is 1 fields of date.

which in my flat file is of value 00:00:0000 now this value is coming to my itab2

but when i pass it to itab1 it takes 0.

rest where there is a true date like 01:02:2007 its working fine .

my date field is of type c and length 10.

so is the data passing correctly? becuase for rest of dates its going fine.

let me know if i need to do any changes if yes then like wot?.

1>i have already changed the dates to form yyyy:mm:dd database type

points for sure for solving the problem

thnkx

bhanu

8 REPLIES 8
Read only

Former Member
0 Likes
859

Hi,

May be for you WRITE stetement with EDIT MASK works.

Reward if useful!

Read only

0 Likes
859

writev staetement?i mean where to use it i am simply passing data from 1 internal table to other , i am not using any write statement

Read only

Former Member
0 Likes
859

Hi Bhanu,

If it is 0 then hard code it as 00:00:0000

Regards

Arun

Read only

0 Likes
859

hi arun the data is moving like this-->

itab-datefeild = itab-date feild

how to hard code over here?

thnkx

bhanu

Read only

0 Likes
859

Hi Bhanu,

instead of

itab-datefeild = itab-date feild

use stmt

write itab1-datefeild to itab2-datefeild DD/MM/YYYY.

Read only

0 Likes
859

Hi,

After the assignment,check the left hand field of equal to.i.e. itab-datefeild

if itab-datefeild eq 0.

unpack itab-datefeild to itab-datefeild.

endif.

Read only

Former Member
0 Likes
859

Hi,

in ur internal table create that date field as of type <b>sy-datum</b> if u create it as char of length 10 it will neglect the separator between date,month and month,year.

rgds,

bharat.

Read only

Former Member
0 Likes
859

Hi Arun,

Now you have already Itab2 data available.

move Itab2 data to Itab1 do field to field.

Thaks,

Bala.