on 07-14-2009 7:36 PM
Hello,
BI gurus this might be an easy one for anyone who knows ABAP. I am loading transaction data into an Infocube in 7.0.
Cube has 0UCCONTRACT as one of the fields to be loaded.
My start routine needs to read master data of 0UCCONTRACT - attribute 0OUTLINE_ID (CHAR,1)
and DELETE RECORDS where 0OUTLINE_ID is NOT blank. (I want blanks)
Something like
DELETE SOURCE_PACKAGE where OUTLINE_ID NE '0'.
But since the attributre is not in the source /transformation the above does not work.
Please help- I am a beginner in ABAP.
Thanks
Naresh
Global Definitions
TYPES : BEGIN OF tp_puccontract,
uccontract TYPE /bi0/oiuccontract,
outline_id TYPE /bi0/oioutline_id,
END of tp_puccontract.
DATA : t_puccontract TYPE HASHED TABLE OF tp_puccontract
WITH UNIQUE KEY uccontract,
wa_puccontract TYPE tp_puccontract,
l_tabix TYPE sy_tabix.
Start Routine
SELECT
uccontract
outline_id
FROM
/bic/puccontract
INTO CORRESPONDING FIELDS OF TABLE
t_puccontract
FOR ALL ENTRIES IN source_package
WHERE
uccontract EQ source_package-uccontract.
End Routine
LOOP AT result_package
ASSIGNING <result_fields>.
CLEAR l_tabix.
l_tabix = sy-tabix.
READ TABLE
t_puccontract
INTO
wa_puccontract
WITH KEY
uccontract = <result_fields>-uccontract.
IF sy-subrc EQ 0 AND
wa_puccontract-outline_id EQ 0.
DELETE
result_package
INDEX
l_tabix.
ENDIF.
ENDLOOP.
Edited by: Dennis Scoville on Jul 14, 2009 11:58 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.