Join between ekpo and lips
Hi,
this join is syntactically correct but because ekpo-ebelp is the type numc(5) and lips-vgpos is the type numc(6) it's not working.
Example: ekpo-ebelp = 00010
lips-vgpos = 000010
What should i do? Please someone help me.
Thank you.
SELECT SINGLE e~ebelp e~aedat e~matnr e~menge e~netpr l~lfimg
INTO CORRESPONDING FIELDS OF it_joindata
FROM ekpo AS e LEFT JOIN lips AS l ON e~matnr = l~matnr AND
e~ebeln = l~vgbel AND
e~ebelp = l~vgpos AND
l~vbeln = pa_vbeln
WHERE e~ebeln = pa_ebeln AND e~idnlf = it_file-cod.
Edited by: Dan M. on Nov 3, 2008 5:14 PM
Hi Dan,
You'll have to exclude the line item criteria from the join I'm afraid.
I'd select both ebelp and vgpos into my internal table and then remove the unwanted ones after the select statement. You'll be able to use offsets to compare the two fields at this stage.
Darren
Similar Messages
-
Hi
I have tried for long time to find the connection between EKPO and EKBE, but can't find a uniq way.
As example:
EKPO contain 2 lines (2 items)
EKBE contain 3 lines (2 lines for item 00010 and 1 line for item 00020).
The BELNR in EKBE has the same value for 2 of the entries (item 00010 and 00020), but another BELNR for the last item (00010).
Further more the field BUZEI is different.
EBELN EBELP ZEKKN VGABE GJAHR BELNR BUZEI BEWTP
4500002152 00010 00 1 2009 5000000689 0001 E
4500002152 00010 00 1 2009 5000000691 0001 E
4500002152 00020 00 1 2009 5000000691 0002 E
The value that I want from EKBE is EKBE-BEWTP
Any ideas how to get the right line from EKBE?
thanks,Hi,
Table EKBE is PO history, it means that connection between EKPO and EKBE is 1:N.
EKPO -<EBELN, EBELP>- EKBE
In your example you have two "BELNR" (two material document) which represent two goods receipt --> for PO item 10 there were two goods receipt (5000000689 , 5000000691) whilst against PO item 20 there was only one (5000000689).
BELNR the material document which may have several items, each item may correspond to one PO item. There's no (direct) connection between PO item and material document item numbering, so there's no direct connetcion between EBELP and BUZEI (I mean if EBELP is 10, BUZEI can be 1, 2, 3, ...25, 56, etc).
In EKBE you can find other kind of docuemnts also (not only material document but e.g. invoice receipt also)
Regards,
Csaba
Edited by: Csaba Szommer on Jul 22, 2010 3:00 PM -
Join Between W_PERSON_F and W_POSITION_D
Hi,
I want to join W_PERSON_F fact table and W_POSITION_D dimension table. Database: Siebel DB.
Is there any direct join or we want to join through some other table?
Thanks,
SatheeshAs per my knowledge there is no direct join between w_person_f and w_position_d
but you can create an alisa of w_person_d as contact(w_person_d) and join with w_person_f
as below
contact(w_person_d).row_wid = w_person_f.contact_wid
please mark the ans if it is correct.
Thanks -
Please advice me how to join gl_import_references and ap_invoices_distribution_all in R12. I have understanding of join between gl_import_references and ap_invoices_all, but I am not clear how to join ap_invoice_distriutions_all to gl_import_references.
ThanksHi,
we don't have direct link for GL_JE_LINES and AP_INVOICE_DISTRIBUTIONS_ALL.
First join AP_INVOICE_DISTRIBUTIONS_ALL and GL_CODE_COMBINATIONS then link to GL_JE_LINES.
Please see below eg:
SELECT *
FROM gl_code_combinations gcc,
ap_invoice_distributions_all apd,
gl_je_lines gjl
WHERE gcc.code_combination_id = apd.dist_code_combination_id
AND gcc.code_combination_id = gjl.code_combination_id;
your case use apd.dist_code_combination_id instead of apd.po_distribution_id (>
and apd.po_distribution_id = GJL.CODE_COMBINATION_ID Add -----------Problem here-----------)
I hope this will help to you.
Thanks,
Prasad Raju -
Relation between EKPO and EKKN
Hi, what is the relation between EKPO and EKKN?
I want to retrieve the requestor name (EKKN-WEMPF) for all open orders in EKPO. But I dont find any matching data between these two tables.Hi
But what do you really need to do?
The link between EKKN and EKPO are only the field EBELN and EBELP.
If you know the item you can know its data for account reading EKKN, you don't need to know how to relate KOSTL or AUFNR with EKPO.
SELECT * FROM EKPO WHERE EBELN = P_EBELN
SELECT * FROM EKKN WHERE EBELN = EKPO-EBELN
AND EBELP = EKPO-EBELN
>EKKN-KOSTL is the cost center of the position you're elaborating
Max -
Join Between PO and Requisition
Hi,
I am trying to do a report in Disco (4.1.48) on all the Open Po's associated Req with the Req Amount and Amount receipted.
I can get the info for the Req fine and the info for the PO's fine.
But I cannot get the join between the Po and Req to work so all the data pulls onto one sheet.
I keep getting an error "Join configuration cannot resolved as one detail folder uses non aggregated items"
I have a Join between Po Distributions All.Req Distribution Id and Po Req Distributions All.Distribution Id
Any Help Greatly appreciated
MickHi,
Personally, I would avoid custom folders. It sounds as though you are using a master and two detail folders in your report, and you are using an aggregation function (e.g. SUM) on an item in one of the detail folders. You may be able to resolve this by changing (using Discoverer Administrator) the join on the other detail folder to be a one-to-one join.
Rod West -
Best Practice - Outer Join between Fact and Dim table
Hi Gurus,
Need some advice on the below scenario
I have an OOTB subject area and we have around 50-60 reports based on it. The related subject area Fact and Dim1 table are having inner join.
Now I have a scenario for one report where outer join has to be implemented between Fact and Dim1. Here I am against changing the OOTB subject area join as the outer join will impact the performance of other 50-60 reports.
Can anyone provide any inputs on what is the best way to handle this scenario?
ThanksOk. I tried this:
Driving table : Fact, Left outer join -- didnt work.
Driving table: Dimension D left outer join -- didnt work either
In either the case, I see physical query as D left outer Join on Fact F. and omitting the rows.
And then I tried this -
Driving table: Fact, RIght outer join.
Now, this is giving me error:
Sybase][ODBC Driver]Internal Error. [nQSError: 16001] ODBC error state: 00000 code: 30128 message: [Sybase][ODBC Driver]Data overflow. Increase specified column size or buffer size. [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement. (HY000)
I checked all columns, everything matched with database table type and size.
I am pulling Fact.account number, Dimension.account name, Fact.Measures. I am seeing this error each time I pull Fact.Account number. -
Select Query and Join Between int and Numeric(22)
I have two tables
tablea
Field1 int
tableb
Field1 Numeric(22)
I know this design is wrong but this is what I have ?
tablea contains about 12M records
Field1 in tablea is one to one related to Field1 in tableb
Now I have Select Query
Select tablea.* from tablea,tableb where tablea.field1=tableb.field1 and tableb.field2 > somrthing
Query here is
Does Join Between
int typeYes, avinash said rightly.
there is another way bit diffict.
use the indexes properly as available in the mseg table and mkpf table even then it is diffcult
else try using BAPI.
some bapi will give the entire details of the MATERAIL DOCUMENT
go to BAPI explorer tcode BAPI.
where you can find the BAPI name like the 'GET_LIST'.
Try this.
hope this will serve your purpose.
Thanks and regards
Ramchander Rao.K -
Join between Oracle and non-Oracle Database
We are working at a project with the follow architecture:
- 5 Databases (3 Oracle, 1 Sybase and 1 DB2);
- Session Bean like Session Facade Pattern;
- Entity Bean (BMP);
- OC4J (Oracle Container for J2EE);
The case is that we cannot make join between tables of different bases, for example, join with one table of Oracle and one other of DB2, therefore the customer does not possess tool midleware for this.
The idea that appeared was: we make a query in table XXX of Oracle and return a HashTable with its respective VO�s and Keys (PKs from the first query that will serve of base for the second query), later we have access the DB2 that one second collection would return, to inside make join of the application.
The problem is that with this solution, we will have fall in the performance. And we do not know if it is the best form.
Do you have any idea???
Thanks,
Eric SanderHi,
If you have different databases then the join has to be done in the VM (either by the appserver or by you).
If you want to do it yourself, I would try the following:
-write one DAO per business object (at least one per database)
-this DAO contains the specifics of its database
-return a hashtable of keys and VOs from one DAO (as you say you do?)
-in the other DAO, add a method "joinWith ( Hashtable foreignKeys )" that will return the join's result
-implement the method along these lines:
1. retrieve the candidate rows from the second DAO's tables (1 query execution)
2. put the keys in a new Hashtable, say "candidateKeys" (meaning 1 iteration over all results)
3. iterate over all elements of foreignKeys (1 iteration)
4. for each element, check if a key exists in "candidateKeys" (1 hash lookup, very fast)
5. add any such row to the result
This is called a hash join (Oracle does it internally if you do a join).
It is the fastest algorithm to do joins.
Best,
Guy
http://www.atomikos.com - JTA transaction manager -
Join between SO and AR tables in Oracle Apps 11.0.3
Hello,
I am new to Order Management. Can anyone please suggest join between SO Tables and Receivables tables in Oracle Apps version 11.0.3.
I am working on an Invoicing error during Autoinvoice Import Program and I am doing workaround on this issue. This error comes for specific SO only. The error causes all invoices for a org not be imported into AR. To find out a solution for the same we run Autoinvoice into batches by Sales Order using a process of elimination to determine the offending So transaction. From these offending SO then we determine the customer for these SO's. And then find out if there are any other accounts that have relationships with the offending customer and then turn off that relationship. Then rerun Autoinvoice for that SO. Most of the time SO will be imported successfully. Can anyone please suggest what must be the issue in Autoinvoice Program as I am new this.
Thank You.
Regards,
MeghanaHi again;
I found this please also check this:
Price List Migration from 11.0.3 to 11.5.10/R12.
Regard
Helios -
Combinataion between VBRK AND LIPS
hi,
I have a requirement, where i have to combine two tables , which doesnt have any field in common. but i have to combine the tables
VBRK and LIPS.
from lips
i have to select matnr and lfimg.
from vbrk, i have to take vkorg,vtweg, kunrg.
how can i take the materials from lips for the partiicular VKORG or KUNRG.?
the only possible link, i have got is linking vbuk with both the tables.since the vbuk-vbeln hold the vbeln of both these tables.
i m not willing to use join also.
I prefer for all entries.
can some one help me out with the codes.hi,
DATA:it_lips LIKE lips OCCURS 0 WITH HEADER LINE.
DATA:it_vbrp LIKE vbrp OCCURS 0 WITH HEADER LINE.
DATA:it_vbrk LIKE vbrk OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM lips
INTO TABLE it_lips
UP TO 1000 ROWS.
*where vbeln in s_vbeln and matnr in s_matnr.
IF NOT it_lips[] IS INITIAL.
SELECT * FROM vbrp INTO TABLE it_vbrp
FOR ALL ENTRIES IN it_lips
WHERE vgbel = it_lips-vbeln
AND vgpos = it_lips-posnr
AND vgtyp = 'J'.
ENDIF.
IF NOT it_vbrp[] IS INITIAL.
SELECT * FROM vbrk INTO TABLE it_vbrk
FOR ALL ENTRIES IN it_vbrp
WHERE vbeln = it_vbrp-vbeln.
ENDIF.
LOOP AT it_vbrk.
WRITE: / it_vbrk-vbeln,it_vbrk-vkorg,it_vbrk-vtweg,it_vbrk-kunrg.
ENDLOOP.
( If you are not getting entries into it_lips means you have to use conversion exit function module for vbeln in the tbale s_vbeln )
Regds
Sivaparvathi
Please dont forget to reward points if helpful..
Edited by: Siva Parvathi on Jan 10, 2008 8:50 AM -
Inner join between OBOE and OBOT
Hi all,
I am trying to query these tables, but for all the system displays data from these tables in only one windows, MSQL does not inner join this tables.
So, we are looking for the relation in these two tables, or between OBOE and JDT1/OJDT would be enought.
Thanks and regards,
Javier ZapataHi,
i'm not sure but you can try to use the table BOT1 (Bill of Exchange Transactions details).
Here you can find the field AbsEntry (related to the table OBOT) and the field BOENumber (related to OBOE table).
Hope this helps
Regards,
Fabio Salucci -
What is the joining condition between hz_cust_site_uses_all and pa_agreements_all table? How hz_cust_site_uses_all and pa_agreements_all table can be joined?
Hi,
What happens if you simply use a DISTINCT clause, something like:
SELECT DISTINCT pa.customer_id ,hcs.cust_acct_site_id
FROM hz_cust_acct_sites_all hca,
hz_cust_site_uses_all hcs,pa_agreements_all pa
WHERE hcs.cust_acct_site_id = hca.cust_acct_site_id
AND hca.cust_account_id = pa.customer_id
Thanks &
Best Regards, -
Creating a Join between VBAK and EKKO
Hello
I have to prepare a Sales Report for Third Party Orders....
The Report takes fields from EKKO (PO DOC Header) and VBAK (Sales Order Doc).
The Problem is that I cannot find anything to join these two Tables. The BSTNK Field in VBAK does not match with the EBELN field in EKKO.
Anticipating a quick reply
Thanks in advance
Zubin KurianHi,
You can use matnr as key.
Look for the Keyfileds between two tables.If you can't found any key fields you can go for FM.
Check it once.
Reg
Pra -
I want to fetch LFIMG from LIPS based on EBELN,EBELP from EKPO
where VGBEL = EBELN and VGPOS = EBELP.
As VGBEL and VGPOS are not primary Key of LIPS ,Its casuing Performance issue of my program and taking long time.
Is there any other option/querry to get this value so that performace can be more.
Thanks
kumarhi for the performance use many no of fields for getting the data . i thnk there are more number of fields as the common for these two tables.....use the link for getting the common fields for there two tablse ...just input the table names...
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/enter%252bany%252b2%252btables%252band%252bget%252bthe%252bcommon%252bfields
Maybe you are looking for
-
Hi Friends, I was woking on the Abap Proxy scenerio ( Server Type). I was going through the link Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III, and this was great. I hav still not started, but I hav a question. I can
-
HI All, My application team getting below error : ORA-12034 error with this msg '"materialized view log on PASSPORT.FACL_CONTRACT_BILLTO_D i searched in google and found that MVIES is not refreshed , so i did complete refreshed and the date shows
-
I have a batch file which can install matlab software. How to use group policy to run that batch file and install matlab on multiple computers. Can some one help me out? thank you so much...
-
IOS 8.0 changed my photo stream
Since the 8.0 upgrade, my photo stream is completely messed up. My photos are still in different albums but have been removed from my stream. My photo stream is correct on my iPhone 4 (not upgraded to 8.0) (because it is not available to the 4 only
-
E-Recruiting 603 HCM_ERC_SES_1
Hi Sap brains, We are implementing ERECRUIT603 with the following business function sets, HCM_ERC_SES_1, HCM_TM_ANALYTICS_1, HCM_ERC_CI_1. We have problem with HCM_ERC_SES_1, as we have activated it, we are configuring search functions with SES (Sear