2007 Mar 19 4:53 PM
Hi there, Please help me with this code , I am trying to derive the profit center from cost center since profit center is available as attribute of cost center in the transformation in BI 7.0. Please revise the code and let me know if i can get it resolved
but this code is giving me error as below
Thanks
Soniya Kapoor
<b>Error</b>
E:The data object "L_S_COSTCENTER" has no structure and therefore no
component called "PROFIT_CTR". called "PROFIT_CTR".
<b>
ABAP Code</b>
DATA: l_th_costcenter TYPE HASHED TABLE OF /BI0/QCOSTCENTER
WITH UNIQUE KEY costcenter.
DATA : l_S_COSTCENTER.
DATA : PROFIT_CTR.
IF SOURCE_FIELDS-profit_ctr = space.
IF l_th_costcenter[] IS INITIAL.
SELECT * FROM /BI0/QCOSTCENTER INTO TABLE l_th_costcenter
WHERE objvers = `A`
AND datefrom <= sy-Cdate
AND dateto >= sy-Cdate.
ENDIF.
READ TABLE l_th_costcenter INTO l_S_COSTCENTER
WITH TABLE KEY
costcenter = SOURCE_FIELDS-costcenter.
IF SY-SUBRC = 0.
RESULT = L_S_COSTCENTER-profit_ctr.
ELSE.
RESULT = `DUMMY`
END IF.
ELSE.
RESULT = SOURCE_FIELDS - profit_ctr.
ENDIF.
2007 Mar 20 4:09 AM
Do not use table kay....
Use "with key" instead.....
Hope this solution was helpful
PS : Please award points if helpful.
Do not use table kay....
Use "with key" instead.....
Hope this solution was helpful
PS : Please award points if helpful.
2007 Mar 20 4:09 AM
Do not use table kay....
Use "with key" instead.....
Hope this solution was helpful
PS : Please award points if helpful.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |