on 10-08-2008 9:30 PM
Hi Guys,
I am loading data from an ODS to Cube.
I am trying to read the Data Package in start routine and compare the records with an internal table.
I want to delete the records in the data package when the Order field in data package matches with Order in internal table and the field type is EXT. if it is INT it should load that record into Cube with a prod num which is pulled from mapping table
When I load just the records where the Orders are of field type EXT it is working. Those records are excluded during laod into Cube.
But when I am loading whole data at once they are also loading into cube which I dont want.
Looks like the DELETE DATA_PACKAGE command is being executed only once.
can somebody please help me with this code?
READ TABLE itab_prod WITH KEY
order = DATA_PACKAGE-/BIC/ZORDER
sys = 'CLT80'.
IF SY-SUBRC = 0.
IF itab_prod-ftype = 'EXT'.
DELETE DATA_PACKAGE.
MODIFY DATA_PACKAGE.
ELSE.
IF itab_prod-ftype = 'INT'.
SELECT SINGLE prd_no INTO prodnum
FROM ZPRODUCT
WHERE S_PL = prod.
IF SY-SUBRC = 0.
DATA_PACKAGE-/BIC/ZPRODNO = prodnum.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Modify DATA_PACKAGE.
ENDLOOP.
If the Order in the Data Package exits in Mapping and table and the field type of that Order in mapping table is EXT that record should be excluded.
Thanks in advance.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: wa_area like line of data_package.
DATA: v_index1 type sy-tabix.
LOOP AT DATA_PACKAGE into wa_area.
v_index1 = sy-tabix.
READ TABLE itab_prod WITH KEY
order = wa_area-/BIC/ZORDER
sys = 'CLT80'.
IF SY-SUBRC = 0.
IF itab_prod-ftype = 'EXT'.
clear wa_area.
ELSE IF itab_prod-ftype = 'INT'.
SELECT SINGLE prd_no INTO prodnum
FROM ZPRODUCT
WHERE S_PL = prod.
IF SY-SUBRC = 0.
wa_area-/BIC/ZPRODNO = prodnum.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Modify DATA_PACKAGE from wa_area index v_index1.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.