08-05-2008 1:08 PM
Hi ,
I have on selection screen of the program the file name which uploading our stock.
It looks like this:
PARAMETER: p_name LIKE epsf-epsfilnam
DEFAULT 'STOCKDDMMYYYY02.txt'.
INITIALIZATION.
REPLACE 'DD' WITH sy-datum+6(2) INTO p_name.
REPLACE 'MM' WITH sy-datum+4(2) INTO p_name.
REPLACE 'YYYY' WITH sy-datum+0(4) INTO p_name.
for example this is ok for today, but how I can set that the program will check sy-datum - 1day? This means, I want to have yesterday date written here...
Thanks for the answer
Saso
08-05-2008 1:11 PM
Hi,
Declare a variable of type sy-datum and pass the value in initialization
w_date = sy-datum - 1.
use w_date in your replace statements.
regards
padma
08-05-2008 1:12 PM
hi,
u can do this i guess : p_name - 1.
p_name is of sy-datum right?
08-05-2008 1:13 PM
In INITILIZATION event write the below code:
data: w_date type sy-datum.
w_date = sy-datum - 1.
CONCATENATE 'STOCK'
w_date+6(2)
w_date+4(2)
w_date+0(4)
'02'
'.TXT'
INTO p_name.
Regards,
Kiran Bobbala
08-05-2008 1:15 PM
Hi ,
check this...
data : date type sy-datum.
PARAMETER: p_name LIKE epsf-epsfilnam
DEFAULT 'STOCKDDMMYYYY02.txt'.
INITIALIZATION.
date = sy-datum.
date = date - 1.
REPLACE 'DD' WITH date+6(2) INTO p_name.
REPLACE 'MM' WITH date+4(2) INTO p_name.
REPLACE 'YYYY' WITH date+0(4) INTO p_name.
08-05-2008 1:25 PM