I have a following situation.
0material --> 0prod_hier --> ZK_NADHI
The upper IO are hierarhical, and ZK_NADHI is filled in BW via flat file. I want it to work like a navigational atribute, and I found so called transitive attributes. I have version 7.0, and the SAP white paper is for 3.5, so not of much help for me (being a novice at SAP BW).
I tried to map the ZK_NADHI field directly to 0material.
--In Start routine of 0materia in global section I wrote:
Types: begin of itabtype,
PROD_HIER type /BI0/OIPROD_HIER,
ZK_NADHI type /BIC/OIZK_NADHI,
MATERIAL type /BI0/OIMATERIAL,
end of itabtype.
data : itab type standard table of itabtype
with key MATERIAL,
wa_itab like line of itab.
--Then in start routine in routine section I wrote:
WA_SOURCE_PACKAGE TYPE tys_SC_1,
wa_prod_hier TYPE /BI0/PPROD_HIER.
LOOP AT SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
move WA_SOURCE_PACKAGE-matnr to wa_itab-material.
move WA_SOURCE_PACKAGE-prdha to wa_itab-prod_hier.
SELECT SINGLE PROD_HIER /BIC/ZK_NADHI FROM /BI0/PPROD_HIER
INTO corresponding fields WA_PROD_HIER
WHERE PROD_HIER = WA_SOURCE_PACKAGE-PRDHA.
move WA_PROD_HIER-/BIC/ZK_NADHI to WA_ITAB-ZK_NADHI.
APPEND WA_ITAB TO ITAB.
--In transformation for ZK_NADHI, I wrote:
read table itab into wa_itab
with key MATERIAL = SOURCE_FIELDS-MATNR.
if sy-subrc = 0.
RESULT = wa_itab-ZK_NADHI.
The upper code doesn't work. I tried debuging, but didn't help much.
Any idea what's wrong?
Edited by: Gorazd Firm on Mar 1, 2011 11:14 AM