2010 Dec 07 11:51 PM
Hallo together,
I have a problem with date calculation.
I have to select data for each day in a range.
This means:
The user has the possibility to define a start date and a end date (I tried at first a select-option for the user interface. But I think this will never work right.)
And I have to loop about this range and select for each single date some values.
Is there a functionality / function module who can handle this?
for example a function module with import parameter from and to and return value a table with all dates included.
Because it is really strange to handle this manually with days of month and so on.
Thanks for the help
Moderator message: date calculation questions = FAQ, please search before posting.
Edited by: Thomas Zloch on Dec 8, 2010 9:36 AM
Hallo together,
I have a problem with date calculation.
I have to select data for each day in a range.
This means:
The user has the possibility to define a start date and a end date (I tried at first a select-option for the user interface. But I think this will never work right.)
And I have to loop about this range and select for each single date some values.
Is there a functionality / function module who can handle this?
for example a function module with import parameter from and to and return value a table with all dates included.
Because it is really strange to handle this manually with days of month and so on.
Thanks for the help
Moderator message: date calculation questions = FAQ, please search before posting.
Edited by: Thomas Zloch on Dec 8, 2010 9:36 AM
2010 Dec 08 12:05 AM
I can't understand why you not selecting data based on date range(select Option). there should be no problem.
Anyways you can do it in this way.
PARAMETERS: p_dat1 TYPE sydatum,
p_dat2 TYPE sydatum.
DO.
IF p_dat1 gt p_dat2.
exit.
ENDIF.
DO you processing using P_DAT1.
Then Add 1 day to start date
p_dat1 = p_dat1 + 1.
ENDDO.
While adding date fields automatically handle all the stuff(like 30 days month or 31days month, lip yr etc.)
Thanks
Subhankar Garani
2010 Dec 08 12:09 AM
Howdy,
The requirement seems strange - why wouldn't you just use a select-option and select all entries for the date range into an internal table.
Then you can extract entries for single dates from the internal table.
Cheers
Alex
2010 Dec 08 1:44 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |