Skip to Content
0
Former Member
Apr 24, 2012 at 11:01 AM

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

298 Views

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