cancel
Showing results for 
Search instead for 
Did you mean: 

Loading data from 1st dso to 2nd dso giving errors due to endroutine

Former Member
0 Kudos

Hi Friends,

I am loading the data from 1st DSO to 2nd DSO ,while loading the data from 1st DSO to 2nd DSO I applied some logic in my transformation in endroutine .Now while loading data into 2nd DSO Iam getting the following errors in monitor screen,

I checked it by debug mode the final data in endroutine ie in source_package

populating the data correclty

<b>Data package1 : Errors during processing

Update to 2nd dso :

Exceptions in subset :Write data package

Processing terminiated</b>

Can you pls suggest anyone what might be the problem ? Your answers are higly appreciable and points will be awarded

Best Regards,

Govind.

Here is my code in endroutine also for ur reference

data : e_s_result type tys_TG_1.

data : e_t_result type tyt_TG_1.

data : e_s_result1 type tys_TG_1.

data : e_t_result1 type tyt_TG_1.

data : cnt1 type n.

data : /BIC/YMATERL type /BIC/OIYMATERL.

data : curtdp1(6) type c.

data : mat type /BIC/OIYMATERL.

data : idx like sy-tabix.

data : begin of i_s_tdp,

/BIC/Y10DAYPRD type /BIC/OIY10DAYPRD,

/BIC/YV2TDP type /BIC/OIYV2TDP,

/BIC/YV3TDP type /BIC/OIYV3TDP,

end of i_s_tdp.

data : i_t_tdp like table of i_s_tdp.

data : i_t_tdp1 like table of i_s_tdp.

data : RESULT_PACKAGE1 like RESULT_PACKAGE.

DATA : /BIC/YCURTDP TYPE /BIC/OIYCURTDP.

break-point.

RESULT_PACKAGE1[] = RESULT_PACKAGE[].

SORT RESULT_PACKAGE1[] BY /BIC/YMATERL .

SORT RESULT_PACKAGE[] BY /BIC/YMATERL .

DELETE ADJACENT DUPLICATES FROM RESULT_PACKAGE1

COMPARING /BIC/YMATERL.

select /BIC/Y10DAYPRD /BIC/YV2TDP /BIC/YV3TDP into table i_t_tdp

from /BIC/PY10DAYPRD

where OBJVERS = 'A'.

LOOP AT RESULT_PACKAGE1 into e_s_result1.

cnt1 = 0.

LOOP AT RESULT_PACKAGE into e_s_result WHERE /BIC/YMATERL =

e_s_result1-/BIC/YMATERL .

if cnt1 >= '9'.

exit.

endif.

ENDLOOP.

if cnt1 >= '9'.

curtdp1 = e_s_result-/BIC/YCURTDP.

mat = e_s_result-/BIC/YMATERL.

UPDATE /BIC/PYDP_LOKUP SET /BIC/YCURTDP = CURTDP1 /BIC/YDPFLAG

= 'F' WHERE /BIC/YDP_LOKUP = mat.

read table i_t_tdp with key

/BIC/YV2TDP = E_S_RESULT-/BIC/YFORTDP

transporting no fields.

IF SY-SUBRC = 0.

MOVE 'V2' TO E_S_result-/BIC/YVERSION .

append e_s_result to e_t_result.

ENDIF.

read table i_t_tdp with key

/BIC/YV3TDP = E_S_RESULT-/BIC/YFORTDP

transporting no fields.

IF SY-SUBRC = 0.

MOVE 'V3' TO E_S_result-/BIC/YVERSION .

append e_s_result to e_t_result.

ENDIF.

else.

UPDATE /BIC/PYDP_LOKUP SET /BIC/YCURTDP = CURTDP1

/BIC/YDPFLAG = 'P' WHERE /BIC/YDP_LOKUP = mat.

read table i_t_tdp with key

/BIC/YV2TDP = E_S_RESULT-/BIC/YFORTDP

transporting no fields.

IF SY-SUBRC = 0.

MOVE 'V2' TO E_S_result-/BIC/YVERSION .

append e_s_result to e_t_result.

ENDIF.

read table i_t_tdp with key

/BIC/YV3TDP = E_S_RESULT-/BIC/YFORTDP

transporting no fields.

IF SY-SUBRC = 0.

MOVE 'V3' TO E_S_result-/BIC/YVERSION .

append e_s_result to e_t_result.

ENDIF.

endif.

ENDLOOP.

insert lines of e_t_result[] into table RESULT_PACKAGE[].

Accepted Solutions (0)

Answers (3)

Answers (3)

soren_hansen
Employee
Employee
0 Kudos

Hi All!

Please see the SAP Note: 1223532 regarding the addition of records to the end routine. Basically you need to control the value of the field 'RECORD' in the RESULT_PACKAGE. Not doing so will result in an error; REGUEST, PACKAGE and RECORD should be the unique key. If this is not the case the update will fail.

BR/

Søren

Former Member
0 Kudos

there is a OSS note reg end routine..

try searchinga nd applying if tht helps..

Former Member
0 Kudos

Hi Govinda,

I unfortunately have the same problem. Did you fix this problem by applying SP14 as was described in a forum post?

I have SP14, but the problem still persists.

Arnold

Former Member
0 Kudos

Hi Arnold,

Still even I didn't get the solution for this error "Exception Substep Process terminated" loading data from 1st dso to 2nd dso but for the time being alternatevely

Iam sending data from 1st dso to cube(ie instead of 2nd dso) its working fine .

I will appreciate your reply by any chance suppose you will resolve this .

Best Regards,

Govind

Former Member
0 Kudos

And I guess you don't have the ABAP-routine from DSO1 -> IC?

I seem to have the same logic as your routine, i.e. my routine also append rows to result_package after looping.

insert lines of e_t_result[] into table RESULT_PACKAGE[].

- If I don't append new rows to result_package, then DTP succeeds.

- If I clear result_package before appending new rows, then DTP succeeds.

- However, if I merge the new rows with the already existing into result_package, then DTP fails.

I'm not an ABAP-expert, but could there be a key error when merging result_package with new rows?

Arnold

Former Member
0 Kudos

Hi Arnold,

From DSO1 -> IC I have abap routine at IC transformation level (ie the same routine copied whatever i had from DSO1 to DSO2).

Thats correct as per your mentined points even for me also like that .

As per abap program its correct whatever our logic the abap program generating no.of records and instead of DSO2 iam sending it to the IC its working fine(ie with generating more no of records).

So the same logic in IC transformation end routine working fine but not to DSO2 and our abap program is 100% correct.

we need to think about why its not going to DSO2 and why only going data to IC ?

Former Member
0 Kudos

Hi,

I got an identical error message when creating new records, in addition to the existing ones in result package, from PSA -> DSO. I suspect it to be something about datapakid, because result_package will have datapakid = 1, and the appended records will have datapakid = 0 (I didn't know how to change that).

Anyway, I solved it by appending the result_package (records from transformation) AFTER the new records (use a temp result_package). Then I cleared the 'export' result package, using refresh, and re-populated the export result_package from the temp result_package.

I don't know if that was a logical reasoning for error, but it worked for me after many hours of struggling

Cheers,

Torbjorn