Alternative For Select Queries
H All,
Is there a way to extract sales doc. number of corresponding billing doc. number with out using select query in a report?
Ravi,
Is there a way to extract sales doc. number of corresponding billing doc. number with out using select query in a report?
I want to take shower without getting Wet?
Try with BAPI_SALESORDER_GETDETAILBOS,and see the details from BAPISDFLOW structure.
Amit.
Similar Messages
-
Alternative for select count('x') or count(*)
Hi Gurus,
I need to use select count(*) multiple times in a SP before and after deletion of rows from multiple tables. As this is an expensive method, do we have some alternative for Count(*), like selecting something from a system table or view instead?Hi
You can know the number of rows affected by the DELETE statement in PL/SQL (if you are using PL/SQL) using sql%rowcount. So you don't really need to count the rows again after the delete took place...
If you are deleting the same rows as selected by the second count condition (older than a particular date), in fact you only need to count rows once for each table.
Luis -
Dynamic select / function module for select queries
Hello experts,
Is there any function module to build dynamic select queries and also to build standard select queries .
Thanks,
krishnakumarWhat are you meaning by 'to build' ???
BR, JAcek
Message was edited by: Jacek Slowikowski -
Alternative for Hierarchical Queries
Hi all,
Is there any other way to implement the Hierachical Query in Oracle. Let us assume the following example of the Scott.emp Table. The output of the table must be in a Hierarchical manner as follows :
ORG_CHART EMPNO MGR JOB
KING 7839 PRESIDENT
JONES 7566 7839 MANAGER
SCOTT 7788 7566 ANALYST
ADAMS 7876 7788 CLERK
FORD 7902 7566 ANALYST
SMITH 7369 7902 CLERK
BLAKE 7698 7839 MANAGER
ALLEN 7499 7698 SALESMAN
WARD 7521 7698 SALESMAN
MARTIN 7654 7698 SALESMAN
TURNER 7844 7698 SALESMAN
JAMES 7900 7698 CLERK
CLARK 7782 7839 MANAGER
MILLER 7934 7782 CLERK
The above structure can be achieved using the following implementation by using the clauses namely CONNECT BY PRIOR, LEVEL and START WITH :
SELECT LPAD(' ',2*(LEVEL-1)) || ename org_chart,
empno, mgr, job
FROM emp
START WITH job = 'PRESIDENT'
CONNECT BY PRIOR empno = mgr;
The above query works fine without any issues.
But is there any other way to implement the above logic without using the above hierarchical query clauses.
Please help me on the above.
Thanks in advance.
Regards
RajThanks.
Why I require this implementation is we have an software which runs both on Oracle and SQL Server, we accomplish the same very easily in Oracle by using the Hierarchical Queries already available in Oracle. But there is no such predefined keywords to implement in SQL server. That is the purpose of the above.
When we can achieve the same in a alternative way in Oracle, the same I feel can be implemented in SQL server.
Raj
Not without dropping into PLSQL, but this is not easy, and why bother, if your query works OK? -
Workaround for select queries on table that is being modified by trigger?
Hi,
suppose I have a table orderitems, to store which products a customer has ordered. Orderitems has a referential key to the product table.
Furthermore, there's a relationship between products. If you order some products, you'll get some other product for free. For example, if you order product A, you get B for free.
So in the 'before insert' trigger of orderitem, I check if I'm inserting an A, and if so, insert a B as well.
So far, so good. But now I want to check if a B is not already present in the order, for there may be only one B in each order.
So in the 'before insert' trigger of orderitem, I want to query orderitem to see if there's already a B present.
Oracle does not allow me to do this (table that's being modified may not be queried). How can I workaround this problem?
I definitely need to do this in a trigger, since I don't want to rely on the applications for handling this. It should be transparantly handled by the db.
Ideas?
Greetings,
IvoHere solution for Mutating Error:
create or replace package state_pkg
as
type ridArray is table of rowid index by binary_integer;
newRows ridArray;
empty ridArray;
end
create or replace trigger parent_bi
before insert or update on parent
begin
state_pkg.newRows := state_pkg.empty;
end
create or replace trigger parent_aifer
after insert or update of status on parent for each row
begin
state_pkg.newRows( state_pkg.newRows.count+1 ) := :new.rowid;
end
create or replace trigger parent_ai
after insert or update of status on parent
begin
for i in 1 .. state_pkg.newRows.count loop
insert into log_table
select theKey, status, effDate
from parent where rowid = state_pkg.newRows(i);
end loop;
end
Hope it will help you.
Riaz -
ALTERNATIVE FOR 'SELECT TOP STATEMENT
HI FRIENDS
IF ANY ONE KNOWS HOW TO CONVERT THE SQL STATEMENT GIVEN BELOW PLEASE HELP ME
SELECT TOP 1 CardID FROM EasyRechargeMaster WHERE CardGroup = EasyRecharge.CardGroup
THANKS & REGARDSCheck this query. It should give you desired results....Are you sure about that? Does TOP 1 mean "whatever happens to be the first row fetched"?
-
Alternative for selecting ISF file in FM12 Webhelp publishing
Hi
I am currently evaluating TCS5/ FM12 as an upgrade from TCS4/ FM11.
In TCS 4, I could create an ISF file that contains my FM-RH style mapping and use that file in FM to publish the WebHelp. Now in FM12, I don't see the option to assign the ISF file. Instead, I need to start all over, first pull up the CSS file that contains the custom styles I added in RH, and then create a STS file which stores my style mapping.
Is there any other way out? I have about 70+ styles, mapping and testing them again would be a crazy task!
Thanks in advance.
SreekanthSreekanth,
Perhaps you can create a custom HTML template [AFAIK, that's essentially what the RH master page is - I don't know if you can export this from RH, as I don' use it much] and use the option to import an HTML template:
Addendum: see Adobe FrameMaker 12 * Using HTML page templates -
Single Selection Prompt for all queries
Hi All,
I have 5 queries in my workbook.
Each query uses some variable which is not used in the other queries.
So, i get 5 prompts when i run the query.
This looks very awkward and also my system almost hangs while showing for each prompt.
Is there any way of showing all the variables in a single prompt?
Thanks,
Arun KKHi,
I found this answer on a message board:
http://sap.ittoolbox.com/groups/technical-functional/sap-bw/assigning-same-variable-values-for-queries-in-workbook-711943
There are two answers to your question, depending on whether or not all of the dates are the same info object (i.e., have the same technical name).
Case 1: All info objects have the same technical name.
Use the "refresh all" option:
Run "SAPBEX.XLA!SAPBEXrefresh", True 'true = refresh all
BW will use the input from the first set of refresh screen variables for all others. IF each query have exactly the same refresh screen, you will not see another refresh variable screen. If not, then BW will stop between queries to ask for more input, only if required.
So, the trick would be to define the first query that refreshes in such a way that its variable screen covers everything needed.
Case 2: Not all info objects have the same technical name.
Use the "Save and reuse variable values" option. You will find this in the query Properties dialog box on the second tab ("Interaction"). Put a check there for all queries except the first one.
Set up the workbook so that the first query refreshes by itself
Run "SAPBEX.XLA!SAPBEXrefresh", False 'False = refresh one only
Then, after the first query has refreshed, locate the date(s) the user selected and copy those to the ranges for all other date values. If your installation is BW 3.x, the code below should do the trick.
It is slightly ineffecient because it will refresh the first query twice. But, the second refresh will be fast because the results will still be in cache. And, the code to keep it from refreshing the first query twice is not something you really want to mess with.
Alternatively, instead of using the SAPBEXrefresh, True at the end, you could put in 13 different SAPBEXrefresh, False statements, identifying the other 13 query worksheets individually.
Run "SAPBEX.xla!SAPBEXrefresh", False, _
Sheets("firstQueryToRefresh").Range("a cell in the query")
'locate dates user selected for "0CALMONTH"
For i = numFilter + 3 To 4 Step -1
If Range("GS" & i) = "0CALMONTH" Then
myType = Range("GC" & i)
myInterval = Range("GD" & i)
intfirstMonth ("GE" & i)
extfirstMonth = Range("GF" & i)
intlastMonth = Range("GG" & i)
extlastMonth = Range("GH" & i)
Exit For
End If
Next i
For i = 4 To numFilters + 3
If Range("GS" & i) = "YCODOCMNT" Or _
Range("GS" & i) = "YCOSHPMNT" Or _
Range("GS" & i) = "0CALMONTH" Or _
Range("GS" & i) = "YCOACCMT" Then
Range("GC" & i) = myType
Range("GD" & i) = myInterval
Range("GE" & i) = intfirstMonth
Range("GF" & i) = extfirstMonth
Range("GG" & i) = intlastMonth
Range("GH" & i) = extlastMonth
End If
Next i
Sheets("SAPBEXqueries").Visible = xlSheetVeryHidden
Sheets("firstQueryToRefresh").Select
Application.ScreenUpdating = True
Run "SAPBEX.xla!SAPBEXrefresh", False
End Sub
maybe this will help a bit.
regards,
Raymond Baggen
Uphantis bv -
Need Different Selection screen for different Queries in a Workbook
Hi,
I have created a workbook with Multiple tabs in BI 7.0. Each Tab has different Queries and each query has different Selection screens (Variable Selections).
When i open the workbook and refresh it, the selection screen is appearing only for one query. All the queries are refreshed by this single selection screen, though each query has different Variable selections. What i need is a seperate selection screen i.e seperate Variable selection appearing for each queries, when i refresh each one of them.
Is it possible to do this? If anybody has tried this, help me in solving this issue. Thanks for ur time.
Regards,
MuraliMurali,
If you un-check the 'Display Duplicate Variables Only Once' this WILL solve your problem.
When you Refresh, you should be presented with a single variable selection dialog box, but it should contain an area for each Query (DataProvider) that is embedded in the Workbook.
This is the case if the queries are all on the same tab, or on different tabs.
However, if you have multiple tabs each with a query on it, each query must have it's own DataProvider. If all queries are based on the same DataProvider, it will not work as the Workbook only 'sees' one Query for which it needs variable input.
If you REALLY want multiple variable selection dialog boxes, then maybe the best way to do this is to have the queries in separate Workbooks.
If you don't want the User to have to open 5 queries manually, you could use a Macro in each Workbook that runs on opening, to open the next Workbook in the sequence.
I hope this makes sense!
Regards
Steve -
Multiple select queries for JDBC sender
I am working on JDBc to IDOC scenario.
I need to process two select queries in PI where output of 1st query becomes the input of second.
Now i need to map the output of second to IDOC through XSL mapping also i need to use BPM to process(without using the stored procedure) the scenario.
In my JDBC communication channel i have option for only one select query and second query should fetch the data through BPM.
In BPM i have used the following sequence mentioned below:
Start --> Receive step ( receives all the header lines) --> Transformation (to split the header messages to single message) --> Block Start( To processEachRecord) --> Send Syn (to map the request message i,e. output of first query with Response i,e. structure of the second query) --> Send Asyn (to send the output of second query to XSLT mapping) -->Block End --> stop
Output of XSLT mapping is the input for IDOC
Now i need to understand how to process the second query?>> I need to process two select queries in PI where output of 1st query becomes the input of second
Use SQL Nested Queries.
Example:
SELECT Model FROM Product WHERE ManufacturerID IN (SELECT ManufacturerID FROM Manufacturer
WHERE Manufacturer = 'Dell')
Here first table is Manufacturer .. we do select query in manufacturer to return data and pass it to the first table Product.
>> Now i need to understand how to process the second query?
You dont need at all. In your sender jdbc channel, write sql statement nested query and you will get only output of the second table. you map the second table output to the idoc.
Note: Dont know why do you need BPM for this case..
Jdbc sender adapter help links
http://help.sap.com/saphelp_srm40/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Check this thread for update statement in jdbc cc
Re: sender jdbc adapter -
Alternative for field exit on select-option
Good afternoon,
I know that field exit doesn't work for select-option (SAP Note 29377, point 11) but i want to know if it exists an alternative (I use SAP 4.6, and an update to ECC6 is expected next month).
The field exit would be the best option because we must add exit in many transaction (approximately 100) in little time.
Thanks for your answers,
Best regards,
Anne.Hi
A) Are there any way for debbuging field exit?
The trick to debug the field-exit is to download the data to a file on application server;
B) How run the field exits on field no editable?
It can't do it, because a field-exit is triggered as soon as a value of the field is changed.
D) Is used the field exit on version >= 4.6C
SAP doesn't support the field-exit from realese 4.7: the field-exit still works on the realese 4.7 and, I suppose, 5 and 6.00: but it doesn't work for enjoy transactions.
Anyway I believe it's better to replace the field-exit with a new solution from realese 4.7
Max -
Alternative for VRF Source Select
We have "VRF Source Select" configuration alternative to Policy based Route-map in the Router Interfaces .Can anyone tell me if we have any alternative for "VRF Soure Select" . Unfortunately Cisco 7200 VXR NPE-G1 Routers doesn't this feature at all. NPE-G1 supports only VRF Forwading and VRF Site-maps!!!
Regards
SrikantI can't think of an alternative but 12.0(28)S, which is planned to be on CCO at the end of April, will support the NPE-G1. This should solve the issue.
Hope this helps, -
How to put Mandatory option for selection screen fields in ABAP Queries
Hi Experts
Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
Manually I had written code in the At Selection Screen option in infoset to display error message if that field is blank.
But I need to display the selection fields with the tick mark (obligatory mark).
How to do this?
Appropriate answers will be awardedHi
For parameter option
parameters : p_kunnr type kna1-kunnr obligatory.
For select option
select-options: s_date for vbak-erdat obligatory.
Plz rewards points ,
Regards ,
Ganesh. -
There are no queries in the log for selected measure group
I configured SSAS 2008 R2 Server to dump every 5th query to olapquerlog table in a new logging database. Data is coming to the log table fine. I have been running it from last two weeks. I have about 175 queries against the cube which i
want to aggregate. When i run the usage based aggregation wizard, ssas never finds any query for all measure group. i see a warning below that, "There are no queries in the log for selected measure group".
Can anyone tell me why?
Aneel IsmailyID and Database Name look same when i open code from cube;
<ID>Spend
Analytics DW</ID>
<Name>Spend
Analytics DW</Name>
this is how data looks like in sql table;
MSOLAP_Database
MSOLAP_ObjectPath
MSOLAP_User
StartTime
Duration
1
SpendAnalyticsDW
NT1101112\BICORP.SpendAnalytics.Spend Analytics DW.Account Ledger
ROCKTENN\!sharepoint2010
6/22/2011
718
2
SpendAnalyticsDW
NT1101112\BICORP.SpendAnalytics.Spend Analytics DW.Account Payable 1
ROCKTENN\SDouglas
6/20/2011
359
Note: I have removed actual dataset from the table, because of its length.Aneel Ismaily -
WAD - input locking for selected rows in planning querie!?
hello guys,
i need some ideas - in which way i can lock data entry functionality in IP query for selected rows? some rows in the query have an indicator S (sum) and some I (input). so i have a chance for selection, which rows are input rows and which rows are sum (dsiplay) rows.
but all rows are input ready in sap standard querydefiniton and i need some ideas how i could implement an row specific inputfunctionality.
example
ITEM KEYFIGURE
line 1 Input input ready
line 2 Input input ready
line 3 Sline display only/ no input
line 4 Input input ready
dataslices are no option, because i need to change the "Sline-rows" data via planning functions.
i need ideas for web, not excel.
thx for your ideas!
Edited by: David Jahn on May 4, 2010 2:03 PMHi David,
of course, it is possible to use two structures in BI-IP, e.g. one containing the key figures (may be restricted) and another one used in the rows where one uses only characteristic values. But then the number of lines in the row structure is static. It is possible to drill-down other characteristics as ususal.
One idea is to use you characteristic containing the 'S value' as a navigation attribute and to create a row structure containing two lines, one with the restriction # and one with S and the corresponding setting for input readyness (maybe a cell definition for input readyness is needed here). Then drill-down by the base characteristic of the navigation attribute. What is not so nice then that one will get a group change: drill-down characteristic by the row structure; but the system generated characteristic relationship for navigation attributes makes the non existing combinations not input ready.
Regards,
Gregor
Maybe you are looking for
-
Iphoto '08 can't drag pics into folders, they disappear
When I try to drag pictures from events into any folders or to add to albums it disappears from my events until I click out and back in. Why is this happening? I have one photo that I want to add to my ibook before publishing and I can't.
-
FindClass can't find a class. need HELP.
In my C++ code, JavaVMOption options[2]; JavaVMInitArgs vmArgs; options[0].optionString=(char*)"-Djava.class.path=/javahome/V1.3/lib/dt.jar:/javahome/V1.3/lib/tools.jar:/javahome/V1.3/jre/lib/rt.jar:/javahome/V1.3/jre/lib/i18n.jar:/myapps/lib/myLib.j
-
Make screen (physically) brighter
hi, i have noticed that my toshiba satellite (2007) screen is very dim compared to say an apple compouter or macbook.. i have already increased brightness all the way through the settings, and increased brightness & gamma through the chip settings, b
-
Hi, I need advice here. I created databases on our x3 full rac environment. DB version is 11204. I did a exachk, and it shows this warning: The database machine provides extremely high redo generation rates that may make you consider increasing the
-
IMovie, iDVD storage space issues
I have transferred many clips from my cam-corder to iMac. I am now nearly exhausted for storage space. Am open to any suggestions for strategies that will recapture additional storage capacity on this machine. I thought of simply dumping the relev