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

Reagrding write from variable to other...

Former Member
0 Likes
291

Hello,

I want to know following difference. In case a), the date from variable v_fromdat exactly get copied into a field of internal table chg_roles-from_dat but in case of b) the v_fromdat gets copied with different format.

a) chg_roles-from_dat = v_fromdat.

b) write v_fromdat to chg_roles-from_dat.

Regards,

Rajesh.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
275

If we have v_formdat = sy-datum than it will:

a) chg_roles-from_dat = v_fromdat.

chg_roles-from_dat will have 20080814

Here chg_rols-from_dat should be TYPE D.

b) write v_fromdat to chg_roles-from_dat.

chg_roles-form_dat will have 08/14/2008 (based on your date settings MMDDYYYY or DDMMYYYY).

Here chg_roles-form_dat should be type CHAR10

Basically this statement WRITES the data to the target variable as it writes the data to output.

Regards,

Naimesh Patel

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
276

If we have v_formdat = sy-datum than it will:

a) chg_roles-from_dat = v_fromdat.

chg_roles-from_dat will have 20080814

Here chg_rols-from_dat should be TYPE D.

b) write v_fromdat to chg_roles-from_dat.

chg_roles-form_dat will have 08/14/2008 (based on your date settings MMDDYYYY or DDMMYYYY).

Here chg_roles-form_dat should be type CHAR10

Basically this statement WRITES the data to the target variable as it writes the data to output.

Regards,

Naimesh Patel