Application Development and Automation 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: 
Read only

Split range between two dates with in Different months using abap code

Former Member
0 Likes
685

Hi all

I have data as below

Location     equip.no           date to                       date from     

Delhi              1                  08.08.2011                    01.04.2011    

Delhi              2                  02.06.2011                    03.05.2011

suppose i have a date range for equipment say from 01.04.2011 to 08.08.2011 during which period the equipment is in delhi say....

I will have to show this in my bi query like below

(which shows the equipment's availability in different months in a year at a location.)

Location     equip.no     date to       date from       jan  feb  mar   apr    may    june    july  aug   sep .................

Delhi              1         08.08.2011  01.04.2011      0      0    0       1       1         1       1      1      0  ......................

Delhi              2         02.06.2011  03.05.2011      0      0    0       0       1         1        0      0     0   ..............

TOTAL  (number of equipments in)                  0       0     0     1       2          2       1      1     0 ..................

finally this implies that @ delhi  i have 1 equipment in apr july and aug , 2 equipments in may & june

like this i want to split the equipment availability into different months based on the date range (date to and date from)

Can anyone suggest me how this can be achieved  using abap code..

REGARDS

Moderator message : Not enough re-search before posting, discussion locked.

Message was edited by: Vinod Kumar

1 REPLY 1
Read only

Private_Member_49934
Product and Topic Expert
Product and Topic Expert
0 Likes
383

You will need CL_ALV_TABLE_CREATE to create table dynamically based on no. of month you want to display. One short tutorial by Naimesh Patel can be found.