cancel
Showing results for 
Search instead for 
Did you mean: 

Transitive attribute problem

Former Member
0 Kudos
113

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member222556
Contributor
0 Kudos

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

Former Member
0 Kudos

Solved. Thank you for contribution

Edited by: Gorazd Firm on Mar 1, 2011 1:40 PM

Answers (0)