2019 Mar 27 12:28 PM
Hi Gurus,
We have a peculiar requirement..
Consider we have below variables.
DATA(lv_c1d1_month) = sy-datum+4(2). "03 - Current month for date 27/03/2019
a)below variables can contain values: 1..12 (similar to above)
we have lv_c1d1_month, lv_c2d2_month, lv_c3d3_month,... lv_c24d24_month.
DATA(lv_c1d1_year) = sy-datum+0(4) . "2019 - Current Year for date 27/03/2019
b) below variables can contain values: 2019 or preceding year. (similar to above)
we have lv_c1d1_year,lv_c2d2_year,lv_c3d3_year, ... lv_c24d24_year.
Case:
Based on certain condition if lv_c4d4_month has the value '12' then we need to set corresponding lv_c4d4_year as preceding year (2018).
Any ideas on how to approach this?
2019 Mar 27 12:34 PM
Why in the world are you doing this with sooooo many variables?!?!! Why not just make 2 data structures/internal tables and then have them related by index....ie. if table1[03] = 12 then table2[03] = 18 (preceding year). That is WAY more simple to "set" and "get" the right, related fields from each set. Past that, why can't you just store the date in one single data structure (table of dates) and just do your calculation on the fly?
Hi Gurus,
We have a peculiar requirement..
Consider we have below variables.
DATA(lv_c1d1_month) = sy-datum+4(2). "03 - Current month for date 27/03/2019
a)below variables can contain values: 1..12 (similar to above)
we have lv_c1d1_month, lv_c2d2_month, lv_c3d3_month,... lv_c24d24_month.
DATA(lv_c1d1_year) = sy-datum+0(4) . "2019 - Current Year for date 27/03/2019
b) below variables can contain values: 2019 or preceding year. (similar to above)
we have lv_c1d1_year,lv_c2d2_year,lv_c3d3_year, ... lv_c24d24_year.
Case:
Based on certain condition if lv_c4d4_month has the value '12' then we need to set corresponding lv_c4d4_year as preceding year (2018).
Any ideas on how to approach this?
2019 Mar 27 12:34 PM
Why in the world are you doing this with sooooo many variables?!?!! Why not just make 2 data structures/internal tables and then have them related by index....ie. if table1[03] = 12 then table2[03] = 18 (preceding year). That is WAY more simple to "set" and "get" the right, related fields from each set. Past that, why can't you just store the date in one single data structure (table of dates) and just do your calculation on the fly?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |