Should we index table vbfa if vbeln and vbelv is already key field.
Dear All,
actually I am passing billing document into vbfa and want vbelv for faster access data from data base into internal table
should we index table vbfa if vbeln and vbelv is already key field.
Regards
chandrashekar
no need.
Similar Messages
-
How to read an internal table with more than one (2 or 3) key field(s).
how to read an internal table with more than one (2 or 3) key field(s). in ecc 6.0 version
hi ,
check this..
report.
tables: marc,mard.
data: begin of itab occurs 0,
matnr like marc-matnr,
werks like marc-werks,
pstat like marc-pstat,
end of itab.
data: begin of itab1 occurs 0,
matnr like mard-matnr,
werks like mard-werks,
lgort like mard-lgort,
end of itab1.
parameters:p_matnr like marc-matnr.
select matnr
werks
pstat
from marc
into table itab
where matnr = p_matnr.
sort itab by matnr werks.
select matnr
werks
lgort
from mard
into table itab1
for all entries in itab
where matnr = itab-matnr
and werks = itab-werks.
sort itab1 by matnr werks.
loop at itab.
read table itab1 with key matnr = itab-matnr
werks = itab-werks.
endloop.
regards,
venkat. -
New Z-table to auto-populate description based on the key field entered
Hi Gurus,
I have to created a z-table, there are several fields however I am interested in only two
1) VSTEL and 2) PADEST for shipping point and the printer name. Also there are two other fields I have added to the table that are the descriptions for VSTEL and PADEST. Now the requirement is that when the user enteres a value in table maintenance ( sm30)
for say VSTEL, then its description should auto populate or propose the right values. Same should happen for the PADEST and its description field.
Thanks.Goto the Table maintenance generator of the Table.
On this screen.
Environment -
> Modification -
> Events
Create New entry in the table with T = 05 and Z <any name>
Save it.
An editor button appears next to the from name.
Click on it and create an include.
Write your code in this include...
select vstel
padest
from table XXXX into table I_XXXX
where vstel = (Z_VSTEL)User enterd VSTEL in module pool.
If sy-subrc = 0.
loop at I_XX into wa_xxx.
if wa_xxx-vstel = Z_vstel.
z_padest(Desc field in Tab maint) = wa_XXX-PADEST.
endif.
endloop.
endif.
The same logic can be used to get the desc for VSTEL and PDEST.
You can change this in many ways based on performance.
The above code is just to give an idea...
Regards,
Kittu -
Table name from which to extract bank name and swift code by key field as vendor code
Please help with the table name from which we can extract the bank name and swift code of vendors with the key input as vendor numbers
Hello Subhadra, I'm sorry, I should've said join of LFBK and BNKA. The fields for the join will be the bank country(BANKS) and bank key (BANKL).
If you have not found a docu on SQVI already, you can refer to this:
How to create Report by using SQVI
This is how your join should look in BASIS mode, your selection parameter should be vendor code LIFNR; output fields with be bank name BANKA and swift code SWIFT. -
Key fields and data fields in a DSO ??
i have a question regarding key fields and data fields in a Standard DSO...
i am using 2 datasources to build a open sales report 2LIS_11_VASTH and 2LIS_11_VASTI i am pulling in data from these 2 data sources to a DSO and i am wondering what infoobjects should be in the key fields and data fields .....does this reflect back to table VBUK and VBUP tables and does the key field in the DSO have to be the key fields in VBUK and VBUP tables ???? or what really should be included as key fields and data fields ????
please help....If you look at the various SD tables, VBELN and POSNR are commonly used as the document number and document line item.
For VBAP and VBUP, it's referring to the Sales Order Line Item with the columns VBELN and POSNR as the key for both tables. However, if you look at the LIPS table, which is the Delivery Line Item table, it too has VBELN and POSNR as the key. Likewise, the VTTP table, which is the Shipment Line Item table, also has VBELN and POSNR as the key.
While using RSOSFIELDMAP as a map is a fairly good "rule of thumb", it still needs to be used with a level of skepticism. -
Repeated entries in VAPMA-sales index table-order item
Hi,
I want to know in which scenario SAP system create repeated entries in VAPMA-sales index table for same material and same order.as in my scenario system had created a repeated entries in VAPMA for same material in sales order.so it looks like duplicate entries except there is difference in some of the primary keys.
Thanks
Manish GuptaUhm... VAPMA is just an index table of VBAP/VBAK entries, so when you have different key fields that's when you'll see the "repeated" entries. When the key fields are different it's not a duplicate.
-
Key fields and non-key field of condition table
Hello Gurus,
what is key fields and non-key field of condition table?
thanks very much!Key field
Each condition table contains keys that can be used for creating dependent condition records.
for example let take condition type PR00.
PR00 uses access sequence PR02 .
Access sequence PR02 has following tables associated with it namely 304, 305 & 306
When you create a conditon record for PR00 with transaction VK11 or VK31, you have a button 'key combination' which is nothing but fields associated with tables 304, 305 & 306.
In brief, Condition records are always created using specific keys. Condition tables are used to define the structure of the keys of a condition record.
Non key field
For example take condition table 144 - sales deal basic data.
Table 144 is associated with access sequence PBUD.
If you check the fields associated with this table (click technical view button), there are three fields at bottom which do not have 'key' check mark -KDATU, PLTYP, KSTAF
So, when you create a condition record for PBUD, system does not propose these 3 fields in 'key combination' and hence are non key fields.
Please reward points for good answers as this would help increase the total donation that SAP will make to the United Nations World Food Programme. -
Hi All,
According to the requirement I have to make the CURR type field as the key field in one of the table. But dureing activation it's throwing the below warning :
Key field <Field name> has num. type CURR: Buffering not possible, Transport restricted
Message no. DT607
Diagnosis
A numeric type was used for a key field. A table of this sort cannot be buffered.
When buffering, the table records for numeric values cannot be stored in plain text. Therefore, no entries are found when buffered numerical values are compared in the WHERE condition, although the table can contain entries satisfying the compare criterion.
The contents of the table cannot be transported if you specify the full key. You can only tranport table contents specified with a character field, up to the first occurrence of a numeric key field.
Procedure
You can enter "no buffering" as an attribute of the technical settings and then repeat the activation process. The table is not buffered.
If you want to buffer the table, you must replace the type in the key field by a character type, i.e. that you must modify the table.
If you want to transport the contents of a table, you can only do so for records specified by a character key, up to the first occurrence of a numeric field.
Is this will be a problem when we transport the entries of the table from DEV to QA ???
If yes how we can solve this problem??
Thanks for your help in advance.
Thanks,
Greetsonyou cannot transport entries with a transport request (TABU)
but it should be no problem to fill table in another system with your own export-/import program per file-download/upload or per RFC.
hope that helps
Andreas -
Concatenate Primary Key Fields of an internal table into a String.
Hi,
I have a dynamic internal table created.
In the dynamic internal table,
How to concatenate all the primary keys of that row concatenated into a string and non primary keys into a different string.
Can some one help me on this.
E.g:
Itab1 has 3 Primary fields and 3 Non primary key fields and it has 2 records.
Table col1 col2 col3 col4 col5 col6
Row1 AA AB AC 1 2 3
Row2 ZA ZB ZC 1 2 3
The following is needed.
Itab2 will have the concatenate strings
Key Nkey
Row1 AAABAC 010203
Row2 ZAZBZC 010203
Thanks,
ChaithanyaC,
Try something like this - Use an ASSIGN in a LOOP:
data: lv_PK type string.
data: lv_non_PK type string.
field-symbols: lv_str type string.
assign local copy of initial line of gt_table to <ls_table>.
loop at gt_table. " this is your table.
do n times. " n = 6 in your case
if n < 4.
assign component sy-index of structure <ls_table> to <lv_str>.
concatenate <lv_str> to lv_PK.
else.
assign component sy-index of structure <ls_table> to <lv_str>.
concatenate <lv_str> to lv_Non_PK.
endif.
enddo.
append <ls_table> to <gt_table>.
endloop. -
Key fields in variant tables.
Hi masters,
i would like to know the use of "key field" in variant tables.
according to definition:This indicator shows whether a characteristic is used as a key field for accessing tables. Key fields have the value "X". When the table is accessed, the values assigned to the key fields infer values for the other characteristics.
please give an example of its usage,
thanks regards
RahulHello Rahul,
Please view the following link with the explaination and an example.
http://help.sap.com/saphelp_47x200/helpdata/EN/92/58c5cd417011d189ec0000e81ddfac/frameset.htm
Thanks
Amber -
How to make a key field manadatory, in a Z-Table (SE11)
Hi,
I've created a Z-table is se11 and one of the key fields is IWERK. Now the user does not want this field to be blank when they enter data into the table via SM30.
Does anyone know how to make this field so that a blank entry is not acceptable.
Many Thanks!Hi Robert!
One way would be to adjust SM30 to a mandatory field (in SE11 of course), but this field sounds like you can assign T001W as a check table. In the foreign key definition, you can give a error message, which is called in case of wrong entries in screens -> there is no empty entry in T001W, you can only maintain valid values and got a value list.
Regards,
Christian
P.S.: No, you need to change SE11->Table maintenance generator->Enviroment->Modification->Maintenance Screens->Element list->Tab Special attr. column Input. Set 'required'. Otherwise empty is still allowed
Message was edited by: Christian Wohlfahrt -
Can we create table maintence generator with out key field
Hi,
I have created a ztable in that client is the primary key as I don't want any other field as primary key.
For this i have created table maintenace generator but when i open it in sm30 blnak screen is coming.
Here my question is can we create a table maintenace generator with out key field other than MANDT.
If it's possible please let me know.
Regards
hari>
Mathews Joseph wrote:
> I agree to the above points , but you can try one thing.
>
> When you create the table maintenance screen , from SE11 you assign a function group.
>
> Double click on the function group and you can go to the main program and open that in SE80, take screen generated and try manually adjusting the screen and putting the non key field details...
>
> Not sure this will work , but may be you can give it a try.
>
> Mathews
But the table could hold at most a single record (per client). The design is lacking.
Rob -
Can I di Inner Join on 2 tables by using only 1 key field?
Hello,
I hv 2 Std. SAP tables, KNVV, KNKK.
- KNVV - does hv 2 key fields (KUNNR and some other, say X)
- KNKK - does hv 2 key fields (KUNNR and some other,say Y)
I want to build a inner join on these 2 tables.
So, Can I do a INNER JOIN on these 2 tables by using ONLY one key field (its KUNNR)? bcoz, there is ONLY common field!!
thank youHi,
The correctness depends on your bussiness requirement. If the common key field is not a primary key, you may end up fetching duplicate entries which you may have to delete after the select query. You dont have to take of any extra precautions in a inner join select query compared to a ordinary select query. Just make sure you use most of the primary key fields of both the tables in the where clause of the select query for better performance
Vikranth -
I have very expensive statement running against VBFA table. It comes from a customer report and doing SQL:
SELECT /*+ FIRST_ROWS */ "VBELV"
FROM "VBFA"
WHERE "MANDT" = :A0 AND "VBELN" = :A1 AND ROWNUM <= :A2
It has execution plan:
SELECT STATEMENT ( Estimated Costs = 96.009 , Estimated #Rows = 41 )
|
--- COUNT STOPKEY
|
INDEX RANGE SCAN VBFA~0
As you can see it is very expensive statement because VBFA is huge table and because I have only VBFA~0 index with columns:
UNIQUE Index VBFA~0
COLUMN DISTINCT VALUES
MANDT 1
VBELV 1.589.207
POSNV 4.184
VBELN 3.202.114
POSNN 58.173
VBTYP_N 18
In order to improve performance of this report , would you recomend creating secondary index and would it be on columns: MANDT, VBELN, VBELV
I have not seen this type of secondary index in SAP community (most of the time I see sec.index on mandt, vbeln and posnn columns) so that is why I want to double check it before I deploy it.
Regards,
AndrijaHi,
Indexes speed up access to rows in a table. They can be created for a single column or for a series of columns.
MANDT AND VBELN does not have index then create indexes on these columns.
The explain statement can be used to check the effect of creating or deleting indexes (see index) on the choice of search strategy for the specified SQL statement. You can also estimate the time needed by the database system to process the specified SQL statement. The specified QUERY or SINGLE SELECT statement is not executed while the EXPLAIN statement is being executed.
To be frank to analyze you shd generate trace file and you need to analyze.
Oracle claims that <b>first_rows_n</b> optimization results in faster response time for certain queries, we must remember that the performance is achieved via a change to the costing.
Use the FIRST_ROWS hint when you need only the first few hits of a query. When you need the entire result set, do not use this hint as it might result in poorer performance.
So collect stats,Analyze table create index your query will execute faster.
Analyze in trace file generated.Want to know indexes are used or not have a look on Explain Plan.
Regards
Vinod -
dear gurus,
I stuck with such very strange problem i have a internal table from entries of vbfa
now i am passing vbeln to bsad vbeln but it not fetching all record i am not getting problem.
kindly help me.
TYPES : BEGIN OF TY_BSID ,
BUKRS TYPE BSID-BUKRS,
KUNNR TYPE BSID-KUNNR,
GJAHR TYPE BSID-GJAHR,
BELNR TYPE BSID-BELNR,
BUDAT TYPE BSID-BUDAT,
BLDAT TYPE BSID-BLDAT,
XBLNR TYPE BSID-XBLNR,
BUZEI TYPE BSID-BUZEI,
BLART TYPE BSID-BLART,
BSCHL TYPE BSID-BSCHL,
DMBTR TYPE BSID-DMBTR,
HKONT TYPE BSID-HKONT,
VBELN TYPE BSID-VBELN,
KIDNO TYPE BSID-KIDNO,
TXT20 TYPE SKAT-TXT20,
MATNR TYPE VBAP-MATNR,
END OF TY_BSID.
DATA : WA_BSID TYPE TY_BSID,
IT_BSID TYPE TABLE OF TY_BSID WITH HEADER LINE.
TYPES : BEGIN OF TY_VBFA,
VBELV TYPE VBFA-VBELV,
MATNR TYPE VBFA-MATNR,
VBELN TYPE bsad-VBELN,
END OF TY_VBFA.
DATA : WA_VBFA TYPE TY_VBFA,
IT_VBFA TYPE TABLE OF TY_VBFA WITH HEADER LINE.
IF IT_VBAK[] IS NOT INITIAL.
SELECT VBELV MATNR VBELN FROM VBFA INTO TABLE IT_VBFA FOR ALL ENTRIES IN
IT_VBAK WHERE VBELV = IT_VBAK-VBELN.
ENDIF.
loop at it_vbfa into WA_VBFA.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = WA_VBFA-vbeln
IMPORTING
OUTPUT = WA_VBFA-vbeln.
*MODIFY IT_vbfa FROM WA_VBFA TRANSPORTING vbeln.
*endloop.
IF IT_VBFA[] IS NOT INITIAL.
loop at it_vbfa into WA_VBFA.
SHIFT WA_VBFA-vbeln LEFT DELETING LEADING '0'.
MODIFY IT_vbfa FROM WA_VBFA TRANSPORTING vbeln.
endloop.
sort it_vbfa by vbeln ASCENDING.
if S_BUDAT-low is not INITIAL.
SELECT BUKRS KUNNR GJAHR BELNR BUDAT BLDAT XBLNR BUZEI BLART BSCHL DMBTR HKONT VBELN KIDNO " MATNR
FROM BSID INTO CORRESPONDING FIELDS OF TABLE IT_BSID FOR ALL ENTRIES IN
IT_VBFA WHERE VBELN = IT_VBFA-VBELN
AND BUKRS IN S_BUKRS AND
BLART IN ('RV','VR') and
BUDAT in S_BUDAT.
SELECT BUKRS KUNNR GJAHR BELNR BUDAT BLDAT XBLNR BUZEI BLART BSCHL DMBTR HKONT VBELN KIDNO
FROM BSAD APPENDING CORRESPONDING FIELDS OF TABLE IT_BSID FOR ALL ENTRIES IN
IT_VBFA WHERE VBELN = IT_VBFA-VBELN
AND BUKRS IN S_BUKRS AND
BLART IN ('RV','VR') and
BUDAT in S_BUDAT.
i have done lot of changes because vbfa-vbeln and bsad-vbeln data element diffrent.
HELP ME
Regards
victorHi,
First you have check internal table 'IT_VBAK' data. If data is available in internal table then again you have to check the data in database table BSAD and VBFA also based on internal table data. I think the data is not available in database table based on internal table data.
Ram.
Maybe you are looking for
-
Hi i want to ceate customer through bapi with external no range not implici
hi i want to create customer through bapi which facilitates to enter customer code(our own defined not the sequentially next no.) i have gone through F.M BAPI_CUSTOMER_CREATEFROMDATA1 BUT NOT ABLE TO UNDERSTAND HOW TO INPUT PARAMETER FOR CUSTOMER_COD
-
Trying to export at 300dpi for photobook
I am trying to export photos out of iphoto onto my desktop to create a photobook (not an apple one). The requirement is for photos to be 300dpi. My photos are 72 dpi irrespective of exporting them at the highest quality (they were all taken with a E
-
Hi, I am facing an issue with creation of "direct PO" in SRM from catalog / punch out. In extended classic scenario, we can create POs directly in "Process Purchase order" transaction which would get transfered to SAP with document type ECDP. While a
-
Has anyone set up a mac mini using an iMac
I am trying to set up a mac mini with my iMac. My end goal is to share files between the two and use my iMac 27" screen for the iMac and the mac mini.
-
Flash animations not playing in Captivate 5.5
When I import a swf from Camtasia 5 into Captivate 5.5, it plays when I "play slide," but not when I play "project" or "from this slide." So.... I saved it as a flv. It plays... if I click the play button, but that's not what I want. I've used this t