cancel
Showing results for 
Search instead for 
Did you mean: 

l_t_range: How do I add yesterday from sy-datum to my selection?

Former Member
0 Kudos

Hi

I have the ABAP selection below in a infopackage. I would like to add sy-datum-1 ("yesterday") as well to the selection. How will I do that and is it possible to say sy-datum-1?

Thanks in advance, kind regards,

Torben

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = '/BIC/ZSY_DATE'.

l_idx = sy-tabix.

if l_t_range-low is initial and l_t_range-high is initial.

l_t_range-sign = 'I'.

l_t_range-option = 'EQ'.

l_t_range-low = sy-datum.

*....

modify l_t_range index l_idx.

endif.

p_subrc = 0.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Date: lv_datum type sy-datum.


lv_datum+0(2)     = sy-datum+0(2) - 1.

Regards.

Marius.

Former Member
0 Kudos

CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'

EXPORTING

date = sy-datum

days = 1

months = 0

SIGNUM = '-'

years = 0

IMPORTING

calc_date = v_date.

This gives sy-datum - 1 in field v_date....

use it.....

Regards

Vasu

Former Member
0 Kudos

Hi,

Use "sy-datum - 1". (Note the spaces).

Or something like "subtract 1 from ..." with a temporary variable.

Regards, Joerg