on 2011 Mar 01 8:48 AM
Hello!
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:
DATA:
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.
ENDLOOP.
--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.
endif.
The upper code doesn't work. I tried debuging, but didn't help much.
Any idea what's wrong?
Tnx Gorazd
Edited by: Gorazd Firm on Mar 1, 2011 11:14 AM
Hi Dear,
Do Some Change in Sequence:-
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,
wa_itab like line of itab.
--Then in start routine in routine section I wrote:
DATA:
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-prdha to wa_itab-prod_hier.
SELECT SINGLE * 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.
move WA_SOURCE_PACKAGE-matnr to wa_itab-material.
APPEND WA_ITAB TO ITAB.
ENDLOOP.
--In transformation for ZK_NADHI, I wrote:
Map MAterial To ZK_NADHI in Transformation
read table itab into wa_itab
with key MATERIAL = SOURCE_FIELDS-MATNR.
if sy-subrc = 0.
RESULT = wa_itab-ZK_NADHI.
endif.
Regards
Obaid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.