Application Development 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: 

progrqming help needed

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

u can do this i guess : p_name - 1.

p_name is of sy-datum right?

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

thanks to all of you guys!

br

saso