Performance tuning of Master Data Table: VBAK LIPS VBFA MSEG MKPF
Hi, ALL
How to improve performance to following statements: inner join.
select LIPSVGBEL LIPSVBELN MSEGMATNR MKPFBUDAT
MKPFUSNAM MSEGLBKUM MSEGBWART MSEGWERKS
VBAKIHREZ MSEGMBLNR VBAKAUART LIPSPSTYV
MSEGLGPLA MSEGMEINS MSEGMJAHR MKPFMJAHR
into corresponding fields of table it_out
from ( VBAK
<b>inner join</b> LIPS
on LIPSVGBEL = VBAKVBELN
<b> inner join</b> VBFA
on VBFAPOSNV = LIPSPOSNR
and VBFAVBELV = LIPSVBELN
<b>inner join</b> MSEG
on MSEGMATNR = VBFAMATNR
and MSEGMBLNR = VBFAVBELN
<b>inner join</b> MKPF
on MKPFMBLNR = MSEGMBLNR )
where VBAK~AUART in S_AUART
and VBAK~IHREZ in S_IHREZ
and LIPS~PSTYV in S_PSTYV
and LIPS~VBELN in S_VBELN
and LIPS~VGBEL in S_VGBEL
and MSEG~BWART in S_BWART
and MSEG~LBKUM in S_LBKUM
and MSEG~MATNR in S_MATNR
and MSEG~MBLNR in S_MBLNR
and MSEG~MENGE in S_MENGE
and MSEG~WERKS in S_WERKS
and MKPF~BUDAT in S_BUDAT
and MKPF~USNAM in S_USNAM.
Thank you very much.
Thanks all of you and your suggestioin.
Now I have modified my original select statements to two parts.
1. select LIPS VBAK VBFA to an internal table it_A
2. select MKPF MSEG to an internal table it_B for all entries in it_A
3. disuse "into corresponding fields of table"
After that, my performance has improved for about 10 times.
Welcome any other suggestions.
Performance is an forever topic, I think:)
Similar Messages
-
How can i make indexes on the Master data table
Hi Gurus,
I got a query, in this one i have an Infoobject with many values, like to say invoice number, and i filter and need a lot of Nav Attr of this IO, for this reason the query performance its really bad but i dont know what to do, some friend advice me this : So I would suggest some indexes on the Master data table of your IO for the navigationnal attributer you want to use.
what else can you tell me? if i put this IO in Line item dimension? , or just with flag high cardinality ? help guys.....Hi Jorge.....
Look.........Line item dimension and High Cardinality r related to each other..............Characteristic which has High Cardinality..we will use it as Line item dimension..........But........A dimension marked as a line item cannot subsequently include additional characteristics.......... This is only possible with normal dimensions...........If u r very sure.............then u can go for Line item dimension............no issues........
U can also try to Create index..............
Check this...........
Re: Indexes on Master Data tables
Regards,
Debjani.......... -
Changing Master data table keys
Hello,
I have a custom extractor (built by someone else)on R/3 that gets data from table HRP1001. This extractor contains data I need to implement "job relationships" for HR in BW.
I am trying to extract the data into a master data object on BW. One job in the HRP1001 table (OBJID on R/3) can have multiple relationships (or object types, OTYPE on R/3). However, since the key of the master data for 0JOB is just JOB, OBJVERS, and DATETO (and does not include OTYPE), the load fails due to duplicate records.
Since to modify the master data table for 0JOB would be an SAP mod, I created my own "Z" object from 0JOB. I have been manipulating the /BIC/M, /BIC/P and BIC/Q tables to try to adjust the key to include at least the OTYPE. I can successfully change the key of the Z object's master data to appear as I want it, but the new objects I added as keys are "flagged" after the load fails due to duplicate records. (Checks of each /BIC table are okay and activated changes. Also performed SE14 adjustment of each table)
So my questions are 1) does anyone know of a business content item that for storing this type of data that I have missed? and 2) If not, can anyone recommend how I can correctly modify the key fields of a master data object?
Any assistance is greatly appreciated.
Thank you,
KelleyHello Kelley,
If you want to enhance the key of your master data table, include the infoobject in compounding. All the infoobjects included in compounding will be included in the key of master data table.
Hope it helps.
Regards,
Praveen -
How to find the number of entries in a master data table
Hi Experts,
I am trying to find the entries in 0CUSTOMER master data.
BW>LISTCUBE>Data target: 0CUSTOMER and selected the fields that I need.
I would like to know how to find the "number of entrees". I tried to run the SUM for a count field, but it is taking forever as there are huge number of records .Hi Dev,
Go to the change/display mode of the info object (0CUSTOMER) in your case. Go to the Master data/Text tab. Here you will find the master data tables according to your settings (P orQ or X or Y). Double click on the table name and it will take you to the SE11 display. From there, you can check the number of records as you do in any transparent table.
Hope this helps.
Thanks and Regards
Subray Hegde -
Abap code not working - deleting based on master data table information
Hi,
I wrote a piece of code earlier which is working and during test we found out that it will be hard for the support guys to maintain because it was hard coded and there is possibility that users will include more code nums in the future
sample code
DELETE it_source WHERE /M/SOURCE EQ 'USA' AND
/M/CODENUM NE '0999' AND
/MCODENUM NE '0888' AND.
Now I created a new InfoObject master data so that the support people can maintain the source and code number manually.
master data table - the codenum is the key.
XCODENUM XSOURCE
0999 IND01
0888 IND01
now I wrote this routine all the data gets deleted.
tables /M/PGICTABLE.
Data tab like /M/PGICTABLE occurs 0 with header line.
Select * from /M/PGICTABLE into table tab where objvers = 'A'.
if sy-subrc = 0.
LOOP at tab.
DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM NE tab-XCODENUM.
ENDLOOP.
Endif.
But when I chage the sign to EQ, I get opposite values , Not what I require.
DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM EQ tab-XCODENUM.
Cube table that I want to extract from
/M/SOURCE /M/CODENUM
IND01 0999
IND01 0888
IND01 0555
IND01 0444
FRF01 0111
I want to only the rows where the /M/CODENUM = 0999 and 0888 and i would also need FRF101
and the rows in bold should be deleted.
thanks
Edited by: Bhat Vaidya on Jun 17, 2010 12:38 PMIt's obvious why it deletes all the records. Debug & get your answer i wont spoon feed
Anyways on to achieve your requirement try this code:
DATA:
r_srce TYPE RANGE OF char5, "Range Table for Source
s_srce LIKE LINE OF r_srce,
r_code TYPE RANGE OF numc04,"Range table for Code
s_code LIKE LINE OF r_code.
s_srce-sign = s_code-sign = 'I'.
s_srce-option = s_code-option = 'EQ'.
* Populate the range tables using /M/PGICTABLE
LOOP AT itab INTO wa.
s_code-low = wa1-code.
s_srce-low = wa1-srce.
APPEND: s_code TO r_code,
s_srce TO r_srce.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM:
r_code COMPARING ALL FIELDS,
r_srce COMPARING ALL FIELDS.
* Delete from Cube
DELETE it_source WHERE srce IN r_srce AND code IN r_code. -
What are the master data tables for 'Plant'?
Hi friends,
What are the master data tables for 'Plant' that contain below data?:
PLANT
NAME1
NAME2
LANGUAGE
HOUSE_NUM_STREET
PO_BOX
POSTAL_CODE
CITY
COUNTRY_KEY
REGION
COUNTRY_CODE
CITY_CODE
TIME_ZONE
TAX_JURISDICTION
FACTORY_CALENDAR
Thanks a lot!Hi,
Plz try out following tables for your requirement.
TOO1W
ADRC
J_1IMOCOMP
T001W : werks TYPE t001w-werks, "PLANT
name1 TYPE t001w-name1, "PLANT DESCRIPTION
adrnr TYPE t001w-adrnr, "PLANT ADDRESS NUMBER
ADRC: addrnumber TYPE adrc-addrnumber, "ADDRESS NUMBER
str_suppl1 TYPE adrc-str_suppl1, "STREET2
str_suppl2 TYPE adrc-str_suppl2, "STREET3
street TYPE adrc-street, "STREET
city1 TYPE adrc-city1, "CITY
post_code1 TYPE adrc-post_code1, "CITY POSTAL CODE
post_code2 TYPE adrc-post_code2, "PO Box postal code
tel_number TYPE adrc-tel_number, "TELEPHONE NUMBER
fax_number TYPE adrc-fax_number, "FAX NUMBER
str_suppl3 TYPE adrc-str_suppl3, "STREET4
location TYPE adrc-location, "STREET5
city2 TYPE adrc-city2,
For Tax Details :
J_1IMOCOMP : werks TYPE j_1imocomp-werks,
j_1icstno TYPE j_1imocomp-j_1icstno,
j_1ilstno TYPE j_1imocomp-j_1ilstno,
Hope this will help.
Regards,
Archana -
M or P master data table to be used in routine read statement
Hi
I update of a DSO i had a requirment for a routine to get the Attribute of a Infoobject.
So which master data table M or P table i need to use in my read statement and why
ThanksUse M table as it it the view on time dependent(P table) and time independent(Q table) tables.
M table is view on time dependent and time independent attributes, you can see characteristic values and all the attributes for the Characteristic.
The tables that go in the view are the Master Data Table and the Time-Dependent Master Data Table. If the characteristic only has time-dependent attributes, only the time-dependent master data table goes in. If the characteristic has only non-time-dependent attributes, only the master data table goes in. -
Which master data table to be used to get attribute value
Hi all,
I am writing routine in update rule to get data for one master data attribute of master data 0customer.
But I am cofused in choosing master data table to get data.
There are two master data table in master data tab of 0customer characteristics.
1. View of MstrDtaTbls :- /BI0/MCUSTOMER
2. Master data tab :- /BI0/PCUSTOMER
Suggest me which one to take .
Although I have tried with 2 one and it is working fine.Hi,
If the attribute is not time-dependent please use /BI0/PCUSTOMER, else use /BIC/QRCOSTCTR.
Just remember P table and Q table.
Regards,
Frank -
How are attribute and text master data tables linked in SAP R/3?
Hello,
how are attribute and text master data tables linked in SAP R/3?
Most tables with attribute master data like T001 for company codes,
have a text master data table T001T (add "T" to table name).
When looking at the content of table T001 via transaction se11,
the text are automatically joined.
But for some tables there is no "T"-table (e.g. table TVBUR for sales offices
has no text table TVBURT), but in se11 you get texts. There is an address
link in TVBUR, but the Name1, etc. are empty.
a) Where are the text stored?
b) How does the system know of the link?
Hope someone can help!
Best regards
ThomasHi Thomas
The master and text table are not linked by name, of course, if you see the text table, it has the same key fields of master table, only it has the field key spras and the field for description.
The link beetween the tables is done by foreign key: if you check the text table TVKBT u need to see how the foreign key for field VKBUR is done:
-> Foreing key with table TVBUR
-> Foreing key field type -> KEY FIELD FOR A TEXT TABLE
->Cardinality-> 1-:CN
It's very important the attribute sets for Foreing key field type, if it's KEY FIELD FOR A TEXT TABLE, it'll mean the table is a text table: i.e. that mean the master table is a check table for the text table, where the foreign key type is for text table.
U can find out the text table of master table by SE11: GoTo->Text Table
U can fined some information in table DD08L.
Max -
How to create time dependant master data table in R/3?
Hi gurus,
I am new to BW.I try to execute the 'Time dependant Attribute' into BW.in my scenario my source system must give me the data like "salesrep ID,Manager ID,Date to,Date from,Sales region". I like to know how to define this master data in SAP R/3(Source system)?. Give me the steps to create master data table in R/3.
Manager may change periodically.even i need to maintain all the changes in R/3.
Thanks & Regards,
Bharathbuilt-in type method means.,
there is no need to create data element and domain objects seperately for each and every field of the table which ever you are creating, system will implicitly fix the size based on the data type you selected.... -
Insert data in a user master data Table
Hi every body,
I've created a User Master data table named 'MyTable'. i want to add data to this table but there is an error which occur : 'to generate this. First Define the Numbering Series in the Administration Module'. I want to add data to this table using C# code, without using UDO.
Is it possible?
Thank you for helping me
HaifaHi,
thank you for your answer.
I didn't understand very well, i will ask the question in an other way.
it is possible to insert records in a master data table by using the code C#
I mean :
usertable = _Company.UserTables.Item(tablename);
usertable.Code = code;
usertable.Name = name;
usertable.UserFields.Fields.Item("U_ContCode").Value = ContCode;
usertable.UserFields.Fields.Item("U_CardCode").Value = CardCode;
lRetCode = usertable.Add();
without encountering the problem of numbering series.
Haifa -
How to check the records in Master Data Table?
Hi,
I am trying to load the Master Data Table using the Flat File.Now how to check the records in Master Data Table?
I done the following way:
Info Provider->Info Object->Right Click->Display Data or Maintain Master Data
But it's not showing the records.It's asking like CID from......To......
CID(SID)from.............To.......
here CID means customer id(characteristic).
and showing some settings.
Please guide me.
Thanks & RegardsHi Sri,
Go to T- code RSD1 and type your info object name and open the P- table in the infoobject then select execute symbol to see the updated data in to master data info object.
regards
sap -
Master Data table in a Lookup in Transformation
Hi,
I am writing a Lookup in Transformations.As per the logic i need to read the Master Data Table of a Infoobject to get the Attribute from the master data table.
The Master data is not time dependent
Which Master Data table should i use in my Logic
/BI0/M *
/BI0/P *
ThanksIf there is no time dependency, use /BI0/P *
-
Field not being updated in Master Data table
Hi guys,
I'm pulling data from master data in BW... specifically 0ven_compc. I haven't added any new fields to this maser data table, and one field that I'm trying to pull is not being populated. In the master data table this field is blank, but in the PSA there are values. Somehow the values are not being loaded into the master data table. I've checked the transfer rules and communication structure and everything looks fine. Why is this happening?
Thanks,
AnthonyHi Anthony,
The problem may be that there is an inconsistency with the target master data infoobject. Please make a dummy change to the target infoobject (i.e you can change the description), save this change and then click on the activate icon. Please then check if the field is filled with the next load.
If the problem still exists please let us know your BI version and support package level.
Best Regards,
Des. -
Hi
Currently we have 0COSTELMT which is compunded to 0C0_AREA.
Now I have to create ZCOSTELMT which is not compunded to 0CO_AREA.
Also I have to create a new Cost Element Master table which is a copy of the existing Master table, except that Controlling Area is not included. Duplicates in the source (two or more rows, from different Controlling Area, having the same Cost Element id) should result in one record. The Cost Accounting cubes will then drop the existing Cost Element Master and include instead this new Master. Any hierarchies built on Cost Element must also be attached to this new Cost Element Master.
How do I create new master data tables which are a copy of old ones with some changes.
Also how do I attach the hierarchies.How do I delete this attachment of datasources to 0COSTELMNT.
Do I need to create new infopackages using the same datasources or should I create all three datasources too from scratch.
I dont want 0CO_AREA in the new master data.
Voodi,
Can you elaborate " transformations between original DS and new IO"
Thanks
Maybe you are looking for
-
Driver issue causing new update not to finish
I tried to update to IOS 8 last night on my iPhone 5. The drivers on my laptop have been messed up since I changed the hard drive in early 2014. iTunes on my laptop does not recognize my device due to the compatibility issue between the drivers so I
-
PICTURES ARE ROTATED WHEN i DOWNLOAD THEM TO MY pc
This just started happening. When I download pictures from my Iphone 5 to my Dell PC desktop, the pictures are all rotated 90 degrees. This never happened in the past. How do I fix this?
-
Hey All! I'm enjoying our recent move to Cap. 2, lot's of great new features. I've run into a bit of an oddity and am planning to submit a bug report, but wanted to toss it out here first. Here is what I am doing and experiencing: 1. Record a demonst
-
Hi there, I have a 15'' Macbook Pro with Retina Display and I'm looking for the best, most flexible and secure laptop stand for it. Any suggestions? Thanks in advance!
-
Do you folks recommend getting this book as a reference? I've got the rudiments, with all of your help, and will probably not go through it lesson by lesson. As a reference, is it useful, given we have this forum and the Help sites? Do you find that