cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Start routine

Former Member
0 Kudos

Hello Experts,

I am new to ABAP and am trying to create a start routine in the transformation from Info Cube1 to Info Cube2. My logic is to compare the ProductID(ZPROD) from Info Cube 1 to the Product ID in Data Store Object(ZDSO1). If this Product Id in the Cube1 is found in the DSO, then the record should be transferred to Info Cube2. I have written the following code but I am stuck up with too many errors. Please help me out

types: BEGIN OF TY_INT,

TY_INT TYPE /BIC/AZDSO100,

END OF TY_INT.

DATA: i_int type table of ty_int.

data: wa_dp type source_package.

Select * from /BIC/AZDSO100 into table i_int.

Loop at source_package into wa_dp.

if LOOP AT data_PACKAGE INTO wa_dp.</b>

IF zprod <> /BIC/AZDSO100

Delete source_package from wa_dp.

endloop.

Current error: Type "SOURCE_PACKAGE" is unknown

Thanks and Regards,

Laxmi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Experts,

>

> I am new to ABAP and am trying to create a start routine in the transformation from Info Cube1 to Info Cube2. My logic is to compare the ProductID(ZPROD) from Info Cube 1 to the Product ID in Data Store Object(ZDSO1). If this Product Id in the Cube1 is found in the DSO, then the record should be transferred to Info Cube2. I have written the following code but I am stuck up with too many errors. Please help me out

>

> types: BEGIN OF TY_INT,

> TY_INT TYPE /BIC/AZDSO100,

> END OF TY_INT.

> DATA: i_int type table of ty_int.

> data: wa_dp type source_package.

> Select * from /BIC/AZDSO100 into table i_int.

> Loop at source_package into wa_dp.

> if LOOP AT data_PACKAGE INTO wa_dp.</b>

> IF zprod <> /BIC/AZDSO100

> Delete source_package from wa_dp.

> endloop.

>

> Current error: Type "SOURCE_PACKAGE" is unknown

>

> Thanks and Regards,

> Laxmi

Dear Laxmi, Please change the declaration statement as below.

#1:

data: ln_dp type _ty_s_SC_1,
w_dp TYPE TABLE OF _ty_s_SC_1.

#2:

DATA: source_package_tmp1 TYPE _ty_t_sc_1.
           source_package_tmp1[] = SOURCE_PACKAGE[].

Former Member
0 Kudos

i guess for declaration it should be data: wa_dp like line of source_package[].

Edited by: AnshulR on Feb 5, 2012 9:24 AM

Former Member
0 Kudos

Hi,

Thank you for your reply. I now get the error: ":Field "LOOP" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."

with the following code:

types: BEGIN OF TY_INT,

TY_INT TYPE /BIC/AZDSO100,

END OF TY_INT.

DATA: i_int type table of ty_int.

data: wa_dp like line of source_package.

Select * from /BIC/AZDSO100 into table i_int.

Loop at source_package into wa_dp.

if LOOP AT data_PACKAGE INTO wa_dp.

IF zprod /BIC/AZDSO100

Delete source_package from wa_dp.

endloop.

Please help!

Thanks,

Laxmi

Former Member
0 Kudos

Loop at source_package into wa_dp.

if LOOP AT data_PACKAGE INTO wa_dp.

IF zprod /BIC/AZDSO100

Delete source_package from wa_dp.

what is the purpose of above code..pls teel for what purpose you want above code.

if you want to use nested loop, you can directly include loop in side loop