cancel
Showing results for 
Search instead for 
Did you mean: 

Please check this start routine code -Urgent

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Pallavi,

append wa to SOURCE_PACKAGE

-->> Adds new records to SOURCE_PACKAGE. Chases of infinite loop.

Hope it Help

Srini

Former Member
0 Kudos

Thanks for your replies.

Now I am able to execute the code without this field condition wa1-/BIC/ZRESCHED.I don't know why it is not showing the value for this field

/BIC/ZRESCHED.

Can you please suggest the reason or how to get data into that field.

Former Member
0 Kudos

You said that when you debug it, everthing is so fine. But, what is your exact problem? When will it happen?

Do you try declaring 'WA' as the same structure as that of SOURCE_PACKAGE?