Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2756

Re: BW Routine

$
0
0

Hi Sunil,

 

let me know on which info-object you want to write dtp routine.. pls specify the dtp field name/type.

as of now i assume you want to write dtp routine on calday.

 

Data: lv_month TYPE /bi0/oicalmonth2,

          lv_first     TYPE sy-datum,

          lv_last      TYPE sy-datum.

 

  lv_month = sy-datum+4(2).

 

IF lv_month > 05.

****************************************************

lv_first = sy-datum.

lv_first+4(2) = '01'.

lv_first+6(2) = '01'.  "set lv_first to first day of the current year.

****************************************************

lv_last = sy-datum.

lv_last+4(2) = '02'.

lv_last+6(2) = '01'.

 

 

CALL FUNCTION 'SN_LAST_DAY_OF_MONTH' "use this fm becuase feb may have 28/29 days.
  EXPORTING
    day_in             =  lv_last
IMPORTING
   END_OF_MONTH       = lv_last  .   "set lv_last to last day of second(Feb.) month
      

 

****************************************************

  l_t_range-sign = 'I'.

  l_t_range-fieldname = 'CALDAY'.

  l_t_range-iobjnm = '0CALDAY'.

  l_t_range-option = 'BT'.

  l_t_range-low = lv_first.

  l_t_range-high = lv_last.

 

  Append l_t_range.

ENDIF.

 

 

Regards,

Hitesh


Viewing all articles
Browse latest Browse all 2756

Trending Articles