Hi all,
I am planning to write an ABAP routine for a update rule. Now I want to know whether I can find out some data from some tables. These data are a part of my master data.
Let me explain; I have a field in the communication structure called BookID and two dimensions in the cube called BookID and AuthorName. Now both these dimensions are characteristic infoobjects with some master data already uploaded.
I have to write a update rule routine, where I'll fetch the AuthorName from the BookID. AuthorName is an attribute of BookID.
Can you tell me if this is possible? If yes, then which are the database tables I need to look at? Also, some code examples will really help.
If it's not possible, please suggest some way to do it. Currently I have AuthorName as "Master data attrib. of" BookID. But still it doesn't update the records. New records are being created with only BookID. No AuthorName.
Please help.
Thanks,
Satyajit.
hi,
are you going to update AuthorName in master data BookID or AuthorName in the cube ? do the AuthorName set as 'navigational' attribute of BookID ?
Both are possible for update.
Master data has 3 tables (beside other table) : text, attribute and hierarhy.
For master data that's not time-dependent, attribute are stored in /bi0/p[infoobject name] - without 0, e.g infoobject 0customer has /bi0/pcustomer table for attribute. for our own created infoobject it's stored in /biC/p[infoobject name], e.g ZCUSTOMER has /bic/pZcustomer table.
For update in infocube, if you didn't set it as navigational attribute, you may use Update Method 'Master data attrib. of'.
sample code :
data : it_data_package like DATA_PACKAGE occurs 0 with header line,
begin of it_authorname occurs 0,
/bic/zbookid like /bic/pzbookid-/bic/zbookid,
end of it_authorname,
l_tabix like sy-tabix.
tables : /bic/pzbookid.
select /bic/zbookid
from /bic/pzbookid
into corresponding fields of table it_authorname
for all entries in data_package
where /bic/zbookid = data_package-/bic/zauthorname.
loop at DATA_PACKAGE.
....
endloop.
Hi Satyajit,
You will need to include the master data table for BOOKID, which might be like /BIO/M<b>BOOKID</b>
BOOKID being your InfoObject technical name..
SELECT SINGLE <b>AUTHORNAME</b> INTO RESULT
FROM /BI0/MBOOKID WHERE BOOKID EQ TRAN_STRUCTURE-BOOKID.
AUTHORNAME - Technical name of author info object
Hope it helps..
Ashish..
Add a comment