‎2007 Sep 06 11:09 AM
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
‎2007 Sep 06 11:11 AM
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
‎2007 Sep 06 11:13 AM
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
‎2007 Sep 06 11:17 AM
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
‎2007 Sep 06 11:22 AM
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
‎2007 Sep 06 11:22 AM
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
‎2007 Sep 06 2:54 PM
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
‎2007 Sep 06 3:12 PM
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.