Equivalent select statement for complex selection
HI,
What is the equivalent select statement for below mentioned condition.
SELECT-OPTIONS : SALEDOCU FOR VBAK-VBELN OBLIGATORY,
DATE FOR VBAK-ERDAT OBLIGATORY,
CHANEEL FOR VBAK-VTWEG,
SALETYPE FOR VBAK-AUART OBLIGATORY DEFAULT 'QT'
NO INTERVALS NO-EXTENSION.
Regards,
John.
hi,
you can use following code.
tables vbak.
data : begin of t_vbak occurs 0.
include structure vbak.
data : end of t_vbak.
select * from vbak into table t_vbak where
vbeln in saledocu and
erdat in date and
vtweg in chaneel and
auart in saletype.
Hope this helps.
Regards,
Shashank
Similar Messages
-
Nested SQL statements for complex, detailed queries.
Is it possible to write nested SQL statements for complex, detailed queries. A nested query
has a WHERE clause that includes a SELECT statement ? Is it true or false ?Hi wahid,
Here are pretty good examples:
http://www.databasejournal.com/features/mssql/article.php/3464481/Using-a-Subquery-in-a-T-SQL-Statement.htm
http://technet.microsoft.com/en-us/library/aa213252(v=sql.80).aspx
Regards Harsh -
DISTINCT in SELECT statements for Entities / Views - Oracle JDeveloper 11G
Hi Steve,
i have a question about using DISTINCT in SELECT statements for
Entities / Views. On Oracle JDeveloper 11G ADF / BC4J
--- This is unique---
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
from "grp_courses" GC
--- This is NOT unique, but ROWID seems to be mandatory as PrimaryKey---
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
rowid
from "grp_courses" GC
How to use this query;
SELECT
distinct(GC."course_title"),
GC.SEC_GRP_PARENT_ID,
from "grp_courses" GC
and yet still be able to use it in View / Entity without a Primary Key or some equivalent solution.
Thanks & Regards,Hi, OK - I got it to work...
Some notes:
1) The View wizard cannot be initiated from the Entity Object.
2) During the View wizard process - do not associate with Entity
3) Selected columns must be mapped as expressions
4) Using non-distinct columns will override the distinct function -
Using variable in from close of select statement for LOV
Hi all,
I had a select list based on a query with a variable in it for the database schema. Something like this:
"select name, id from &SCHEMA..countries order by name". This warked in version 1.4.4..., I don't remember the rest. Now we upgraded to version 1.6.0.00.87 and I am trying to change the condition for this select item but I recieve this error:
1 error has occurred
LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
Whatever I'm trying to change for this item, it always gives me this error when I click on "Apply Changes" button. Everything works fine when I remove &SCHEMA. from the query and instead write directly the database schema name.
Can you help me?Sabiha,
This is a case where the builder cannot parse the query at design time because there is no state for &SCHEMA. in the session. You can try this trick, change the lov query to: if htmldb_application.get_current_flow_sgid(:APP_ID) = htmldb_application.get_sgid then
return 'select name d, id r from &SCHEMA..countries order by name';
end if;Notice also the addition of aliases for the column names.
Scott -
How to write Select statement for this codition
I need to check whether SGTXT contains BELNR value.
SGTXT is a text field and It should be matched with BELNR
How to write select statement for this.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT should have the given BELNR Value.
Plz note : Here I cannot give as SGTXT = BELNR as coz BELNR have only 10 digits.Hi,
data temp(12).
concatenate '%' belnr '%' into temp.
Select AUGBL AUGDT into t_BSAD
from BSAD
where SGTXT like temp.
If belnr is having multiple values,just create a internal table as follows.
types : begin of ty,
belnr....
temp(12),
end of ty.
data itab_ type standard table of ty.
data wa type ty.
loop at itab into wa.
concatenate '%' wa-belnr '%' into wa-temp.
modify itab from wa index sy-tabix transporting temp.
endloop.
Change your select statement accordingly.
Kindly reward poits if it helps. -
Select statement for summing values in column?
How to write a select statement for sap standard table which contains data as given below
col1 col2
A 10
A 20
A 30
B 50
B 60
C 70
Need the output of select in internal table as given below
A 60
B 110
C 70
Regards,
RachelThanks for all the valuable input.
Below I have used sum in select statement(check case 2"),but i am not getting required o/p.
Kindly guide me.
case1 :
select aebeln aebelp bpackno bmenge
into corresponding fields of table itab
from ( eslh as a inner join esll as b
on bpackno = apackno )
where a~ebeln = 6000000100
and a~ebelp = 00010
and a~packno = '0000001025'
order by aebeln aebelp b~packno .
O/p for the above .
ebeln ebelp packno menge
6000000100 00010 0000001025 6.000
6000000100 00010 0000001025 5.000
6000000100 00010 0000001025 2.000
6000000100 00010 0000001025 1.000
6000000100 00010 0000001025 2.000
case2:
select aebeln aebelp bpackno sum( bmenge )
into corresponding fields of table itab
from ( eslh as a inner join esll as b
on bpackno = apackno )
where a~ebeln = 6000000100
and a~ebelp = 00010
and a~packno = '0000001025'
group by aebeln aebelp b~packno
order by aebeln aebelp b~packno .
6000000100 00010 0000001025 0.000
Edited by: Rachel on Nov 25, 2008 11:45 AM
Edited by: Rachel on Nov 25, 2008 11:46 AM -
Regarding select statement for this requirement
Hi................
good evening
here is a requirement.
i want to retrieve data from the following table.but how to join these table is my dought.
tables fields
t001w--werks " plant id
t001w--name1 " pl;ant name
t001w--regio " plant address
ekko--ebeln " purchase order
ekko-erdat : creation date
ekko-ernam "name of the person
ekpo-ebelp " item
ekpo-bstyp "purchase order type
eket-erdat " delivery date
mara-matnr " material number
these are the tables and fields.now we want to retrive data from these tables
how we have to code select statement.
selection-screen is
plant id
order type
delivery date
please provide select statement for this requirement.
thanks and regards.
k.swaminath reddy.Is this what you are looking for?
SQL> CREATE OR REPLACE FUNCTION f_team
2 RETURN VARCHAR2
3 IS
4 s_return VARCHAR2(500);
5 BEGIN
6 FOR i IN ( select team from t_team order by 1) LOOP
7 s_return := s_return || i.team || ', ';
8 END LOOP;
9
10 RETURN substr(s_return, 1, length(s_return) - 2);
11 END;
12 /
Function created.
SQL> SELECT f_team FROM dual;
F_TEAM
Australia, Bangladesh, England, India, Kenya, Pakistan, South Africa, UAE, USA, West Indies, Zimbabwe
SQL> -
Need Select statement for fetch the details
Hi
i want to fetch particular customer wise sales orderds and that sales order No and date of sales order was created.. and that sales order related PO No and Materials ..
for this.. how can i write an executable programm.. is it needed to define seperate internal tables or single internal table is enough ?
what is the select statement for fetching all these details..
any help will be appriciated
Thanks
Bbaucustmer master table is KNA1 knb1 knbk
sales data tables r VBAK VBAP VBEP
Material data MARA, MARAC, MARD
PO RELATED ekko ekpo eket
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:04 PM -
Select statement for retrieving infotype 1005 values w,r,t payscale
Hi All,
could you pls help me for the below requirement
"select statement for retrieving infotype 1005 values with respect to the pay scale level.
because pay scale level is having range of values in the infotype"
Thanks in advance
Prasad
Please try it yourself first.
Edited by: Suresh Datti on Aug 9, 2009 4:52 PMHi,
Code which you have written is correct when the R_DATE is having LOW and HIGH values, if the R_DATE is having only LOW value then this will be wrong, becuse if the R_DATE is having only LOW then OPTION value is not BT is should be EQ
Regards
Sudheer -
Hi,
What is the equivalent selection in BI7? (Following BW 3.5 How to...Set up BW Statistics)
I am trying to install BW statistics and all the good things that come with it for BI7. Following the instructions in a document that I was directed to on this site, in SBIW, I installed and replicated all the datasource in under TCT tree (Technical content)
The instruction is for versions prior to BI7 and I had to make modifications as I go.
Now, this instruction direct me to go to:
rsa1, Bi Content (left) and then InfoProviders by InfoAreas and select all InfoProviders for the InfoAreas BW Statistics and BW Metadata under the node Technical Content.
1.
In BI7, there is no BW Statistics and BW Metadata infoareas under Technical Content if I follow the directions strictly.
What is the equivalent of this in BI7?
2.
In the instructions, the author continues to collect these InfoAreas from under Technical Content:
BW Data Slice
BW Features characteristics
BW Metadata
BW Statistics
In BI7, do we need exactly these? Or, now different? Should I just transfer all the infoareas under Technical Content? What is the disadvantage of collecting a ALL?
ThanksThanks for the link and i believe it will come in handing.
Yet, it does not have the step by step installation information on page 46 of this link:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
Do you have the BI7 version of this link?
Also, ssame stewise info is on page 4 of this:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5401ab90-0201-0010-b394-99ffdb15235b
If you have the BI7 version of this link also, it will answer my question.
Thanks -
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Transaction code for vendor account statement for perticular duration
Transaction code for Accounts payable
statement for perticular date
duration...... (from date and to date)Hi,
You can use the following reports, there are quite a few other reports but the ones below can be used easily to tweak to your requirement using the many selection and display options available:
1. S_ALR_87012103 - List of Vendor Line Items
2. FBL1N
Cheers. -
. I have Adobe Actobat 7.0 Standard for quite a while, and I'm happy with it. I use it for mainly filings at the federal court. They require PDF. I use two computers in two different states for work. I realize my Adobe 7.1 is a few years old, but sometimes I have difficulty using it with the other days downloading a boarding pass, and e filing at the USDC. . There's a problem with Adobe Flash, media, etc. and other Adobe programs, (which I use for downloading boarding passes for airlines, etc.) so basically I have to delete these other Adobe programs, besides the Adobe Acrobat 7.0 Standard if I want to 7.0 Standard to work. I periodically download the updates, but there's still a problem. My question is: Can or should I purchase another program to update the present Adobe Acrobat 7.0 standard, or just buy a new program such as the Adobe 11? Am I mistakenly doing something wrong, such as when I download? I'm an old valued customer so I don't want to spend a lot of money since I am replacing my Dell XP for a new computer now, and my other computer is a Dell Vista.
I'd appreciate your valued advice.If you are getting a new computer (for a PC it would have Win 7 or 8), then you will need to purchase XI if you wish to continue using Acrobat. Acrobat 7 is not compatible with these systems (and probably the same for MAC systems), though sometimes workarounds are possible, though not easy to use. I guess the answer is to buy the new version. Try http://www.adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_mostpopular.html, click on the Buy for Acrobat, and then select the version you want.
-
How to consolidate the financial statements for 3 company codes, assigned t
Hi Friends,
How to consolidate the financial statements for 3 company codes, assigned to 3 different companies, 3 different fiscal years, 3 different controlling areas and all the 3 Company Codes assigned to same chart of accounts in the same client?
Can we need any ABAP program for this (or) Is it possible using Report Painter?
Please help me.
ThanksHi friend,
Is it a real-time situation or something you are visualising ?
For consolidation, you can use a group chart of accounts and select that in the operative chart of accounts for consolidation purposes. This would work provided the company codes use the same operative chart of accounts and fiscal year.
I hope the above would be helpful to you.
Regards, -
SQL*Loader-930: Error parsing insert statement for column
we upload data on daily basis in application throug apps user and these table are invloved
1. DEV_RA_INTERFACE_LINES_ALL(owner is a apps)
2.RA_INTERFACE_LINES_ALL(owner is a AR)
we do steps
1 delete record from DEV_RA_INTERFACE_LINES_ALL table
2 delete record from RA_INTERFACE_LINES_ALL table
3 load data using sql loader with apps user
4 insert in RA_INTERFACE_LINES_ALL table
we want to change user i mean these step do dataupload user not apps
we give the proper rights to dataupload like select,delete and insert rights on these table to dataupload user but when i going to load data throug sql loader we receive error
SQL*Loader-930: Error parsing insert statement for column APPS.DEV_RA_INTERFACE_
LINES_ALL.ORIG_SYSTEM_BILL_ADDRESS_ID.
ORA-00904: "F_ORIG_SYSTEM_BILL_ADDR_REF": invalid identifier
and if i insert data through apps then done.make sure that u have no speces left
between lines.
give the path of control file path correctly.
Maybe you are looking for
-
Update Profit Center Field in CO Line item tables
Hi, We are working on ECC6.0 NewGL with Real-time CO-FI integration for Cross Company Code and Cross Pofit Center. For those CO internal documents (like activity confirmation at production order) where there is no cross company code or cross profit c
-
How to test the sample adapter code on PI 7.1?
Hi, I would like to test the sample adapter on PI 7.1. I followed these explanations: /people/gowtham.kuchipudi2/blog/2006/01/04/testing-sample-adapter How-to deploy Sample Adapter in PI 7.1 but I still can't get things working. The com.sap.aii.adapt
-
RoboHelp for Word starts up Word 2010
Hi all, I have RoboHelp 7 installed for a long while. I have always been using RoboHelp HTML, and I use it with Word 2003 as the default Word version. This combination has been working very nicely. My O/S is Windows 7 Home Premium. But now I want to
-
Activity Type/price planning
Hi all, Can any one tell me how acitivty type price automatically update in KP26? I know if we maintain the long term planning, we can get activity prices automatically, but I don't know the procedure. Can any one help me? regs Ramesh B
-
[SOLVED] .AURINFO and makepkg --source
The documentation suggests that one use makepkg --source to build source packages for AUR, but also states that one should include a .AURINFO file. See Arch User Repository and Arch Packaging Standards I made a .AURINFO file by hand and placed it in