Skip to Content
Former Member
May 04, 2017 at 10:11 AM

ABAP table ($filter odata) filtering timestamp in a specific Period


Hey guys,

Im pretty new to ABAP and i just wanted to ask if someone maybe got an idea how to solve the problem im actually facing right now.

Im coding the Backend in ABAP for an SAP Ui5 application which should be able to present for instance PICKS in a specific period.

So i have the fields " Chart ", "Aggregation", "Timestamp" and "Value".

charts and aggr. are const. values atm
charts = Picks
aggr. = M

the timestamp is filled with the actual timestamp (just for testing right now)
and - 1000 secs for every line so i have more test data's
(arround 10 lines)

The table is all arround the Picks like mentioned above. Right now im selecting the date of the Picks from a DIFFERENT table, (i also use the filter select options to read the odata filter parameters) so im able right now to filter the Picks i'm selecting from a different table in a specific time period.

my problem is => the TIMESTAMP in the actual table should show something like 01.01. for january and 01.02. for february and so on...
the VALUE should show the numbers of picks done in 1 month
so the first entry might look like this




20 (picks in january)

so my question now is how can i seperate or group the picks per month ?
when im selecting i might have like 1 pick at 01.01., another pick at 03.01., 4 picks at 06.01 and so on... so i need to take all picks inbetween 01.01. to 31.01. and set their TIMESTAMP to 01.01., same goes for febuary and so on... but i dont really know how to do this ?
and then i need to take these for example 20 picks in january and put the value into the field value, because value is the field for the number of picks done in this month.

i hope someone understands me a bit,
even with my bad english :D

thank you already for helping.