Skip to Content
0
Former Member
Sep 11, 2007 at 09:33 AM

Please check this start routine code -Urgent

18 Views

Hi all,

I have written this start routine code.

Let me know if any error is there.

It is debugging perfectly.When loading to cube, I am seeing all the data I have loaded.Please go through this code and suggest any changes especially in the last step.can i append wa to source_package?

DATA : ITAB TYPE TABLE OF /BIC/AZPM_DSO400.

DATA : WA TYPE /BIC/AZPM_DSO400.

DATA: ITAB1 type table of /BI0/PPM_ORDER.

DATA : WA1 type /BI0/PPM_ORDER,

wf_exist.

data : zday type scal-indicator.

DATA : zdate type D,

w_date TYPE d.

zdate = sy-datum.

CALL FUNCTION 'DATE_COMPUTE_DAY'

EXPORTING

date = zdate

IMPORTING

day = zday.

break-point.

CASE zday.

WHEN '1'.

w_date = zdate - 6.

WHEN '2'.

w_date = zdate.

WHEN '3'.

w_date = zdate - 1.

WHEN '4'.

w_date = zdate - 2.

WHEN '5'.

w_date = zdate - 3.

WHEN '6'.

w_date = zdate - 4.

WHEN '7'.

w_date = zdate - 5.

ENDCASE.

break-point.

select * from /BIC/AZPM_DSO400 into table itab.

select * from /BI0/PPM_ORDER into table itab1

for all entries in itab where pm_order = itab-pm_order.

break-point.

loop at itab into wa .

clear wa1.

read table itab1 into wa1 with key pm_order = wa-pm_order.

if sy-subrc = 0.

if wa1-COORD_TYPE CP 'N*' AND

wa1-/BIC/ZRESCHED is initial

and wa1-STATUSSYS0 NE 5 AND

wa-BASICSTART GT w_date.

break-point.

append wa to SOURCE_PACKAGE.

endif.

endif.

endloop.