cancel
Showing results for 
Search instead for 
Did you mean: 

******Creation of a loading selection for cube in info package level

Former Member
0 Kudos

Hi,

when we are scheduling the info package(Infp package name is like XYZ),we want to load past 6 months data from the current date(INFO OBJECT(0CREATEDON) BETWEEN (Sy-Datum - 6 months TO Sy-Datum),in the selection tab in schedule i want to write the abap routine (type 6).please can any one have this type of code please sedn to me asap.

this is very urgent.delivery is tomorrow.

Regards

lekha

Accepted Solutions (0)

Answers (2)

Answers (2)

edwin_harpino
Active Contributor
0 Kudos

hi Lekha,

for date, try following code

data: l_idx like sy-tabix.

read table l_t_range with key

iobjnm = '0CREATEDON'.

l_idx = sy-tabix.

*....

DELETE l_t_range

WHERE iobjnm = '0CREATEDON'.

L_t_RANGE-SIGN = 'I'.

L_t_RANGE-OPTION = 'EQ'.

  • if not work, try

  • L_t_RANGE-OPTION = 'BT'.

  • BT = between

  • last 6 month

L_t_RANGE-LOW = sy-datum - 180.

  • current date

L_t_RANGE-HIGH = sy-datum.

append l_t_range.

modify l_t_range index l_idx.

p_subrc = 0.

$$ end of routine - insert your code only before this line -

endform.

edwin_harpino
Active Contributor
0 Kudos

hi Lekha,

try

data: l_idx like sy-tabix,

l_month(6) type c,

l_dtlast6month like sy-datum.

read table l_t_range with key

iobjnm = '0CREATEDON'.

l_idx = sy-tabix.

*....

DELETE l_t_range

WHERE iobjnm = '0CREATEDON'.

L_t_RANGE-SIGN = 'I'.

L_t_RANGE-OPTION = 'EQ'.

  • if not work, try

  • L_t_RANGE-OPTION = 'BT'.

  • BT = between

  • current month

concatenate sy-datum3(2) sy-datum0(4) into l_month.

L_t_RANGE-HIGH = l_month.

  • last 6 month

clear l_month.

l_dtlast6month = sy-datum - 180.

concatenate l_dtlast6month4(2) l_dtlast6month0(4) into l_month.

L_t_RANGE-LOW = l_month.

append l_t_range.

modify l_t_range index l_idx.

p_subrc = 0.

$$ end of routine - insert your code only before this line -

endform.