I am a BW programmer, not an ABAP-er. But I did manange to get an internal table loaded that looks like below. The first column contains a week number of a period, which is is in the 3 column.
I want to, given a year/week such as 2005 and 15, come back with either the lowest or highest (13 or 18), so that I can figure out that I need to add 2 weeks to 3/7, or subtract 3 from 4/4.
I would appreciate any hints on how to do a table lookup on an internal table.
This is how I defined the setup
l_cal_itab LIKE SORTED TABLE OF l_cal_s WITH UNIQUE KEY fiscyear poper accum_week
The contents:
2005 001 05 01/03/2005 02/06/2005 2005 002 09 02/07/2005 03/06/2005 2005 003 13 03/07/2005 04/03/2005 2005 004 18 04/04/2005 05/08/2005 2005 005 22 05/09/2005 06/05/2005 2005 006 26 06/06/2005 07/03/2005 2005 007 31 07/04/2005 08/07/2005 2005 008 35 08/08/2005 09/04/2005 2005 009 39 09/05/2005 10/02/2005 2005 010 44 10/03/2005 11/06/2005 2005 011 48 11/07/2005 12/04/2005 2005 012 52 12/05/2005 12/31/2005 2006 001 05 01/01/2006 02/05/2006 2006 002 09 02/06/2006 03/05/2006 2006 003 13 03/06/2006 04/02/2006 2006 004 18 04/03/2006 05/07/2006 2006 005 22 05/08/2006 06/04/2006 2006 006 26 06/05/2006 07/02/2006 2006 007 31 07/03/2006 08/06/2006 2006 008 35 08/07/2006 09/03/2006 2006 009 39 09/04/2006 10/01/2006 2006 010 44 10/02/2006 11/05/2006 2006 011 48 11/06/2006 12/03/2006 2006 012 52 12/04/2006 12/31/2006