Query with tables VEPVG, VBAK, VBAP AND KONV
hi all,
I have a requirement, that is Open Sale Orders which is having Special Discount. I am trying to write a Query, But KONV table is not coming into the joins. my execution plans is bellow
VEPVG --> VBAK vbak-knumv = konv-knumv and konv-kschl = Special Discount
VBAP
Please explain me, how to design the query with conditions.
Thanks & Regards,
Srinivas
Hi,
Have you referred this help document.
http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCSRVQUE/BCSRVQUE.pdf
Regards - Shree
Similar Messages
-
Sales Document from VBAK ,VBAP and VEDA
Hi ,
I need to fetch the Sales Document from VBAK and VBAP and VEDA with the contract sign date for sales document line item .
Contract sign date is in selection screen as select options.
Please let me know how to fetch the sales Document per line item from these 3 tables considering that A sales document could have many line items and each can have a different sign date.
Thanks
SachinHi,
The link between all the tables VBAK, VBAP and VEDA is VBELN i.e sales document number.
However, while fetching from VBAP and VEDA you would need to consider POSNR as well.
As your ABAPer to code the logic using 'for all entries' method.
Regards,
Amit
Edited by: Amit Iyer on Jun 23, 2011 12:28 PM -
How can I create a query with tables in INFOSET?
Dear Gurus,
How can I create a query with tables in INFOSET?
Just tables and fields INFOSET?
Kind Regards,Hello
Check following SCN Article for your understanding/reference:
- [Using Infoset Query ,SAP Query and Quick Viewer|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10eab7af-0e54-2c10-28a5-87b47adbe1a5]
Regards
JP -
RELATIONSHIP BETWEEN VBAK/VBAP AND V46R_HEAD TABLE
Hi,
can you please tell me that is there any relationship between VBAK and V46R_HEAD TABLE or VBAP and V46R_HEAD TABLE table.
where V46R_HEAD TABLE is a structure and i want to display sme fields of vbak and some of V46R_HEAD and some of VBAP.
I got the relation between VBAK and VBAP ie. the field VBELN. But i am not getting the relation with V46R_HEAD sturcture.
Please help me to solve this problem.Hi,
the field vbeln is present in V46R_HEAD also.
Please check it!! Please do a CTR+F and look for VBELN.
Regards. -
Reading VBAK, VBAP and VBFA table during a process
Hi friends,
I have an execution DUMP in a Z report, so I would be very thankful if you can give me your expert opinion.
I have a Z report which collects some information into an internal table. After that, I need to go over each record and read VABK, VBAP and VBFA tables and compute some quantities. It is not possible to do this in another way because I need to get some information first.
Of course, each table is being read in the corresponding sequence (1st VBAK, then VBAP and then VBFA and at the end LIPS table) using the key or part of it. The problem is that if the user wants to execute the report online, it will be finish in a dump at this routine.
My question is if it is possible to skip the dump getting VBAK and VBAP tables in memory and instead of reading directly, read them from memory. Notice that if I do this I need to put almost the entire table into memory. So, do you think that I will earn time or it will be the same or worse?
Thanks in advance & kind regards,
MMP.Hi everybody!
We applied the note but it doesn't help. We realized that we have a problem with records quantity, so the key user is going to analyze which other parameter could be helpful.
Thank everybody very much!
Kind regards. -
Query with tables of BKPF and BSEG and Structures COBL, RF05A
hi experts,
I want to create query with the tables of BKPF and BSEG and Structures COBL, RF05A
How can i proceed?
Please give me complete points
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PMcheck the common fields and required fields and the write SELECT query useing Inner Joins or For all entries
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:52 PM -
Performance problem with selecting records from BSEG and KONV
Hi,
I am having performance problem while selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
Regards,
PrashantHi,
Some steps to improve performance
SOME STEPS USED TO IMPROVE UR PERFORMANCE:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
5. Avoid using nested SELECT statement SELECT within LOOPs.
6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
7. Avoid using SELECT * and Select only the required fields from the table.
8. Avoid nested loops when working with large internal tables.
9. Use assign instead of into in LOOPs for table types with large work areas
10. When in doubt call transaction SE30 and use the examples and check your code
11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
12. Use "CHECK" instead of IF/ENDIF whenever possible.
13. Use "CASE" instead of IF/ENDIF whenever possible.
14. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING" creates more coding but is more effcient. -
Query with Tables from another Database
Hi.
I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
"....FROM [-BDName-].[dbo].[-TableName-] T1..... "
Any suggestions? Thanks a lot....
(Suggestions in English or Spanish)None
-
Query with two filter prompts(phase and document)
Hi All,
I am new to sap sourcing.
I am trying to customize a query for (Sourcing Report for all supplier registrations showing the cycle times for each
approval phase of the process)which I have added two filter prompts(phase and document name).
When I try to execute the query, I don't get the required output for the phase filter prompt.
Also phase is a value list and when I select the phase from the drop down, the report doesn't give any value.
Please find the query as mentioned.
SELECT <%RESULTS%>
FROM <%SCHEMA%>.FCI_WORK_ITEM
T1
INNER JOIN <%SCHEMA%>.FCI_WORK_PROCESS T2 ON T1.PARENT_OBJECT_ID =
T2.OBJECTID INNER JOIN (
SELECT
OBJECTID,
10002203 AS
CLASSID,
CREATED_BY_USER_OBJECT_ID,
CREATED_BY_USER_CLASS_ID,
CREATED_BY_USER_OBJECT_NAME,
CREATED_AT,
EDIT_AT_DATETIME, MODIFIED_AT
FROM
<%SCHEMA%>.ODP_ODP_VEN_MODIFICATION_WF
WHERE
CONTEXTID=<%CONTEXT(odp.vendormgmt.wf_vendor_modification)%>
UNION
ALL
SELECT
OBJECTID,
10002213 AS
CLASSID,
CREATED_BY_USER_OBJECT_ID,
CREATED_BY_USER_CLASS_ID,
CREATED_BY_USER_OBJECT_NAME,
CREATED_AT,
EDIT_AT_DATETIME, MODIFIED_AT
FROM
<%SCHEMA%>.ODP_ODP_VEN_REGISTRATION_WF
WHERE
CONTEXTID=<%CONTEXT(odp.vendormgmt.wf_vendor_registration)%>
T3 ON
T3.OBJECTID = <%COALESCE%>(T1.ROOT_PARENT_OBJECT_ID,
T1.BIZ_DOC_OBJECT_ID) AND
T3.CLASSID = CASE WHEN
T1.ROOT_PARENT_OBJECT_ID IS NULL THEN T1.BIZ_DOC_CLASS_ID ELSE
T1.ROOT_PARENT_CLASS_ID END
WHERE
T1.CONTEXTID=<%CONTEXT(workflow.process)%> AND
(T2.PHASE_SUB_REF_OBJECT_NAME like ?OR T2.BIZ_DOC_OBJECT_NAME like
<%ORDERBY%>
Please suggest how can I change the query accordingly.
Also , please suggest how can add the result fields for calculating the duration(created at - Action date).
Please do the needful.
Thanks and Regards
GangaHello Vignesh,
Thank you!!
I could find that only the supplier registration modifications are included in the query given by you, but we need to include the supplier registrations as well.
I tried modifying the query and it worked.
But, now the challenge is to include the workflow status(T1.APPROVAL_STAUS) in the filter prompt.
T1 table is FCI_WORK_ITEM.
T.APPROVAL_STAUS is an integer data type in the table.
I defined the T.APPROVAL_STAUS as string In Result fields and in the filter prompt.
But the query works for other filter prompts except workflow status.
I have included the filter prompts as mentioned below:
T1.CONTEXTID=<%CONTEXT(workflow.process)%> AND
UPPER(T2.BIZ_DOC_OBJECT_NAME) like ? AND
UPPER(T2.PHASE_SUB_REF_OBJECT_NAME) like ? AND
UPPER(T1.APPROVAL_STATUS) like ? AND
UPPER(T1.PERFORMER_OBJECT_NAME) like ?
<%ORDERBY%>
Please suggest on this.
Thanks and Regards
Ganga Durga -
Query with user-exit hierarchy variable and input ready hierarchy node var.
Hello everyone.
we are using several hierarchies (2005, 2006 and 2007) of the same info object 0FUNDS_CTR (one for each fiscal year). We would like to be able to use same reports regardless of chosen fiscal year (selected hierarchy) and ever more, to select node inside proper hierarchy. At the moment reports use 3 parameters:
1) fiscal period from - fiscal period to
2) hierarchy name
3) hierarchy node
Our goal is to get report with only 2 parameters:
1) fiscal period from - fiscal period to
2) hierarchy node
since hierarchy name could be derived (user exit) from fiscal period.
When user selects hierarchy node he is being asked to select hierarchy name (despite of user exit for hierarchy name) and key date (populated with current date).
We would like to avoid step of user selecting hierarchy. Is it possible?
Any other approaches to problem would be appreciated.
Kind regards,
Josko.Hi Jörg,
As mentioned, I_STEP = 3 is processed once per query, not once per varaiable.
If this statement is placed within case-endcase for I_VNAM it never will be processed.
Please take a look on this, it might be helpful..
Regards
Joe -
Column chart from Bex query with 2 characteristics in rows and column
Hi,
We're trying to represent the following column chart in Dashboard Design:
Material/Month
January
February
March
Material 1
100
200
300
Material 2
400
500
600
Material 3
700
800
900
The BEX query has:
Result objects: Material, Month/year; amount
The problem is when i paste the Material dimension in the Excel, i'm getting the following result:
Material/Month
January
February
March
Material 1
100
200
300
Material 1
400
500
600
Material 1
700
800
900
So, when i display the column chart, the material tag is incorrect:
as the image attached shows.Hey Flora,
Happy to hear that its working now.
Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
or
If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
Hope this helps in clear, please revert me for any clarification. -
Contract Sign Date from VBAK and VBAP and VEDA.
Hi ,
I need to fetch the Sales Document from VBAK and VBAP and VEDA with the contract sign date for sales document line item .
Contract sign date is in selection screen as select options.
Please let me know how to fetch the sales Document per line item from these 3 tables considering that A sales document could have many line items and each can have a different sign date.
Thanks
SachinHi,
The link between all the tables VBAK, VBAP and VEDA is VBELN i.e sales document number.
However, while fetching from VBAP and VEDA you would need to consider POSNR as well.
As your ABAPer to code the logic using 'for all entries' method.
Regards,
Amit
Edited by: Amit Iyer on Jun 23, 2011 12:28 PM -
Af:query with bind variables and Saved Search
I have a VO and view criteria(VC).
VC has a criteria item ObsoleteDate with range specified as bindVariables "dateFrm" and "dateTo" I dragged & dropped the named criteria as af:Query with table. Table toolbar has 2 buttons in which I set & clear the bind variables. Data is fetched as per as expected based on the VC & bind variables.
The problem is,
If I save my search with bind variables set and swap between the saved searches , all works fine. But the moment I clear bind variables & swap between searches.. "dateFrm" is populated and "dateTo" is null and I get an Exception oracle.jbo.AttrValException: JBO-27035: Attribute Obsolete Date: is required.
Why is this happening?? Saved search is supposed to save the VC with all the bind values set while saving and clearing bind variables shouldn't affect the saved search, right?? Or I have understood it wrong?
I am using JDeveloper 11.1.2.3.0
ThanksTry
like ? || '%' -
Query Form with Table - Table not stretching
Gentlefolk
I have a very simple JSF page.
I have based this JSF page on Oracle quick start layout (stretched).
I add a query component (including a table) to the page.
When I run the page the Search Panel Re-sizes to fit the browser (stretches). The table below does not.
p.s. the query component itself works fine. Its the table that returns the results that remains unstretchable.
Any ideas appreciated
Thx
Darren PalmerHaving the table in a stretchable component will stretch it (the panel group isn't such a component).
So you can layout your page like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
<f:view>
<af:document id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelStretchLayout id="psl1" topHeight="200px">
<f:facet name="center">
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.DepartmentsView1.rangeSize}"
rowBandingInterval="0"
filterModel="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
rowSelection="single" id="resId1">
<af:column sortProperty="DepartmentId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
id="resId1c1">
<af:outputText value="#{row.DepartmentId}" id="ot1">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="DepartmentName" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
id="resId1c2">
<af:outputText value="#{row.DepartmentName}" id="ot2"/>
</af:column>
<af:column sortProperty="ManagerId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.ManagerId.label}"
id="resId1c3">
<af:outputText value="#{row.ManagerId}" id="ot3">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.ManagerId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="LocationId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.LocationId.label}"
id="resId1c4">
<af:outputText value="#{row.LocationId}" id="ot4">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.LocationId.format}"/>
</af:outputText>
</af:column>
</af:table>
<!-- id="af_one_column_stretched" -->
</f:facet>
<f:facet name="top">
<af:panelHeader text="Departments" id="ph1">
<af:query id="qryId1" headerText="Search" disclosed="true"
value="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"
queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.ImplicitViewCriteriaQuery.processQueryOperation}"
resultComponentId="::resId1"/>
</af:panelHeader>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>Another option is to use a panel splitter - basically take the template you used - add a splitter (vertical) - drag the query with table to the top - then move the table to the bottom:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelSplitter id="ps1" orientation="vertical">
<f:facet name="first">
<af:panelGroupLayout layout="vertical" id="pgl1">
<af:panelHeader text="Departments" id="ph1">
<af:query id="qryId1" headerText="Search" disclosed="true"
value="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"
queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.ImplicitViewCriteriaQuery.processQueryOperation}"
resultComponentId="::resId1"/>
</af:panelHeader>
</af:panelGroupLayout>
</f:facet>
<f:facet name="second">
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="row"
rows="#{bindings.DepartmentsView1.rangeSize}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.DepartmentsView1.rangeSize}"
rowBandingInterval="0"
filterModel="#{bindings.ImplicitViewCriteriaQuery.queryDescriptor}"
queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
rowSelection="single" id="resId1">
<af:column sortProperty="DepartmentId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
id="resId1c1">
<af:outputText value="#{row.DepartmentId}" id="ot2">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="DepartmentName" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
id="resId1c2">
<af:outputText value="#{row.DepartmentName}" id="ot4"/>
</af:column>
<af:column sortProperty="ManagerId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.ManagerId.label}"
id="resId1c3">
<af:outputText value="#{row.ManagerId}" id="ot1">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.ManagerId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="LocationId" filterable="true"
sortable="true"
headerText="#{bindings.DepartmentsView1.hints.LocationId.label}"
id="resId1c4">
<af:outputText value="#{row.LocationId}" id="ot3">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.LocationId.format}"/>
</af:outputText>
</af:column>
</af:table>
</f:facet>
</af:panelSplitter>
<!-- id="af_one_column_stretched" -->
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root> -
Connection error with Crystal Report XI, VB6 and Sybase ASE15
Hello !
I have an error #4002 when I want to launch a report in VB6 with the ActiveX Crystal Report Viewer.
I use Sybase ASE 15 with an ODBC link and the reports run stored procedures.
This error seems to be an authentification error, but I don't know what parameters are missing or wrong...
- My reports works well in the report designer.
- The reports connected to a text file or an ADO recordset work in VB6.
- The Verify Database works in design mode in VB6.
- The problem is the same with tables, stored procedures, SQL and with or without parameters...
- I tried to connect the report to a DataEnvironnment but I get the same error.
The problem appears when I use the Crystal Wizard to create a form automatically AND when I create objects directly in code like :
Dim crapp As CRAXDRT.Application
Dim oReport As CRAXDRT.Report
Set crapp = New CRAXDRT.Application
Set oReport = crapp.OpenReport("C:\myreport.rpt")
CRViewer.ReportSource = oReport
CRViewer.viewReport
Please help !Hello,
I don't see any database logon code in what you posted. You need to log onto the database at runtime since Crystal Reports will never store passwords.
You can download and review the [Connection Properties|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81] document for more information on how to log onto your database at runtime. This document was written for CR9, but it's the same for CR10, CR XI (v11.0), and CR XI R2 (v11.5).
I hope this helps.
Sincerely,
Dan Kelleher
Maybe you are looking for
-
Connection problem with new database
Hi Installed new database on my windows machine successfully while connectting as sys user error ORA-12500:TNS: listner failed to start dedicated server process wlile connecting toad and sqlplus
-
Album Artwork sucking in other albums
I have already looked at http://support.apple.com/kb/TS1468 Say I have audio books A, B, and C. Each of them is a 4 part audiobook. When I look at them by Album scroll list, I see 4 of A, 4 of B, 4 of C. Tracking? So, I right-click on on the 4 parts
-
Issue w/Wiped Text Messages?
I'm trying to find out if anyone else has had part of their text messages wiped from their Blackberry? Back in August '12, I noticed that I wasn't able to access text messages that were before a specific day in August. I chalked it up to a bug or a
-
Correct handling of objects extended from FX classes
Quick simple question. If I write a class that's extended from one of JavaFX's classes, do I need to make state changes that weren't part of the original class on the FX Application thread? In my case, I'm creating a signal class that's basically a P
-
OWB View validation??
OWB View validation?? We are using OWB repository 10.2.0.2.0 and OWB client 10.2.0.2.8. The Oracle version is 10 G (10.2.0.2.0). OWB is installed on Sun 64 bit server. We created view in OWB mapping. The validation was successful. As we deploy the vi