Skip to Content
0
Former Member
Jan 28, 2011 at 10:22 PM

form/endform

243 Views

Hi,

In BW start routine, I want to put the code in a routine such as perform so I can call it repeatedly, passing different value each time as in an ABAP program in ECC. Can this be done? For example, I have a function module to get the month/year 1 month ago, 6 month ago, or 10 months ago. This is the current code:

*to get the month date 3 months ago.

ALL FUNCTION 'ZBW_CALMONTH'

EXPORTING

calmonth = DATA_PACKAGE-calmonth

backmonths = '2'

IMPORTING

smonth = month_3.

*to get the month date 6 months ago.

ALL FUNCTION 'ZBW_CALMONTH'

EXPORTING

calmonth = DATA_PACKAGE-calmonth

backmonths = '5'

IMPORTING

smonth = month_6.

I want to do:

PERFORM get_month using data_package-calmonth '2'. " to get the date 3 months ago.

PERFORM get_month using data_package-calmonth '5'. " to get the date 6 months ago.

Please advise.

Thank you.