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

selection date

Former Member
0 Likes
884

hi experts

i have selection date in the following format format.

zdate : IBT2007070120070901 (2007.07.01 - 2007.09.01)

i want to separate the to date and from date and store in a variable.

pls help,how can i do.

bcoz, i want to do a comparision with to date and another date.

Thanks in advance.

Regards

Rajaram

7 REPLIES 7
Read only

Former Member
0 Likes
850

Hi!

DATA: lv_date_from LIKE sy-datum,

lv_date_to LIKE sy-datum.

lv_date_from = zdate-low.

lv_date_to = zdate-high.

Regards

Tamás

Message was edited by:

Tamás Nyisztor

Read only

Former Member
0 Likes
850

Hi Raja,

Data: ws_datefrom type sy-datum,

ws_dateto type sy-datum.

ws_datefrom = zdate + 3(8).

ws_dateto = zdate + 11(8).

Regards,

Sheron

Message was edited by:

Sheron Mathew

Read only

Former Member
0 Likes
850

Hi Raja,

Split the ZDATE and get the to and from dates.

Check this code.

DATA:

V_TODATE TYPE SY-DATUM,

V_FROMDATE TYPE SY-DATUM,

VC_TODATE(10),

VC_FROMDATE(10).

V_TODATE = ZDATE+3(8).

V_FROMDATE = ZDATE+11(8).

CONCATENATE V_TODATE0(4) V_TODATE4(2) V_TODATE+6(2) INTO VC_TODATE SEPARATED BY '.'.

CONCATENATE V_FROMDATE0(4) V_FROMDATE4(2) V_FROMDATE+6(2) INTO VC_FROMDATE SEPARATED BY '.'.

WRITE:/ VC_TODATE , VC_FROMDATE.

Thanks,

Vinay

Read only

Former Member
0 Likes
850

Hi,

Let suppose selection date is : s_date.

!

DATA : w_fromdate LIKE sy-datum,

w_todate LIKE sy-datum.

w_fromdate = s_date-low.

w_todate = s_date-high.

Regards

Vijay

Read only

Former Member
0 Likes
850

Hi

You can Split the ZDATE and get the to and from dates.

example code:

.

DATA:

V_TODATE TYPE SY-DATUM,

V_FROMDATE TYPE SY-DATUM.

V_TODATE = ZDATE+3(8).

V_FROMDATE = ZDATE+11(8).

reward if helpful.

thanks

kapil

Read only

Former Member
0 Likes
850

Hi

u can use the next code:

data: z_date1 like sy-datum,

z_date2 like sy-datum.

z_date1= z_date-low.

z_date2= z_date-high.

Or

z_date1= z_date+3(8).

z_date2= z_date+11(8).

Regards

Gregory

Reward Points

Read only

Former Member
0 Likes
850

Hai Raja Ram,

For comparison of dates,Use this Function Module.

It is very easy.

<b> /SAPHT/DRM_CALC_DATE</b>

Reward if Useful,

Imran.