on 02-05-2012 6:43 AM
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
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[].
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.