How to modify standerd query in sap...(/SAPQUERY/AM07)
hi all,
i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
pls guide me how to insert additional colum in that standard report or query.
pls guide me
thanks and regards,
sai
Hello Srini,
First of all first identify the actual Exit name .
Now go to Exit and enter the
Loop at screen.
If your conidition satisfies.
screen-input = ' ' .
modify screen.
Endif.
Endloop.
Thanks,
Chidanand
Similar Messages
-
How to modify this query to get the desired output format
I hv written a Query to display all the parent table names and their primary key columns(relevant to this foreign key of the child table).The query is given below...
SELECT DISTINCT(TABLE_NAME) AS PARENT_TABLE,COLUMN_NAME AS PARENT_COLUMN
FROM ALL_CONS_COLUMNS
WHERE CONSTRAINT_NAME IN (SELECT AC.R_CONSTRAINT_NAME
FROM ALL_CONSTRAINTS AC
WHERE AC.TABLE_NAME=TABLE_NAME
AND AC.TABLE_NAME='&TABLE'
AND AC.R_CONSTRAINT_NAME IS NOT NULL);
This query will display all the parent tables and their primary key columns.Now my problem is that how to modify this query to also display the foreign key column name of the child table.
I want the query result in the following format.The query should display the following columns.1)child table's name,2)child table's foreign key column name,3)the corresponding parent table's name,4)the parent table's primary key column name(which is the foreign key in the child table).
For Example I want the output as follows...
TAKE THE CASE OF SCOTT.EMP(AS INPUT TO YOUR QUERY)
CHILD_TABLE CHILD_COLUMN PARENT_TABLE PARENT_COLUMN
EMP DEPTNO DEPT DEPTNO
In this result I hv used alias name for the columns.The query should display this only for the foreign keys in the child table.In the query which I sent to you earlier will give the parent table and the parent column names,But I also want to append the child table and child column names there.
any help on how to tackle would be appreciated.Try this query
SELECT c.table_name child_table,
c.column_name child_column,
p.table_name parent_table,
p.column_name parent_column
FROM user_constraints a,user_constraints b,user_cons_columns c,
user_cons_columns p
WHERE a.r_constraint_name=b.constraint_name and
a.constraint_name=c.constraint_name and
b.constraint_name=p.constraint_name and
c.position=p.position
ORDER BY c.constraint_name,c.position
Anwar -
How to modify the query to get max id record
Hi All,
How to modify below query to get proper result.The query is returning some records are duplicated.I need only one record to display from duplicate based on max assetid.
Here is my query:
SELECT *
FROM (
SELECT a.uppertitle, a.composer, a.esongid,
MAX (asset_new.assetid) AS assetid,asset_new.ownerid
FROM (SELECT DISTINCT NVL (esong.title, '~') AS uppertitle,
INITCAP (NVL (esong.composer, '~')
) AS composer,
esong.esongid
FROM esong, esongcountry_us eus
WHERE 1 = 1
AND eus.esongid = esong.esongid
AND eus.isocountrycode IN ('US')
AND esong.title LIKE 'LIVE TO TELL%'
AND ROWNUM < 390) a,
songwebrecording,
recordingasset_new,
asset_new
WHERE a.esongid = songwebrecording.esongid(+)
AND songwebrecording.recordingid = recordingasset_new.recordingid(+)
AND recordingasset_new.assetid = asset_new.assetid(+)
GROUP BY a.uppertitle, a.composer, a.esongid,asset_new.ownerid)
WHERE ROWNUM <= 390
ORDER BY uppertitle
result:
upperlittle composer esongid assetid onwerid
1. LIVE TO TELL Gelb, Howe 480340000 null null
2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 null null
3. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
4. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3038107 null
5. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
I need the result like this :
upperlittle composer esongid assetid onwerid
1. LIVE TO TELL Gelb, Howe 480340000 null null
2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
3. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
Please help me on this regard. oracle version is 9i
Regards,
Rajasekharcan you please format your code with
-
How to modify standerd abap query (SQ01) ...
hi all,
i am having one abap standard query, i have to modify that one and i have to include another colum which needs the requirment.
07 Depreciation /SAPQUERY/AM07 ADA FIAA - DEPRECIATION
the above i mentioned is the query, how ever i tryed this standared to copy but i am not able to connect infoset and all stuff.
pls guide me how to insert additional colum in that standard report or query.
pls guide me
thanks and regards,
sais shiva,
my query is that one only.
i am having one formula depreciation = ( previous year / aquesition value ) * 100
this formula i have to insert.
how can i proced.
pls guid me.
thankx and regards,
sai -
How to modify search query based on new FE
Hi,
As per a requirement, in All Accounts search (advanced search section), I had to replace 5 checkboxes (e.g. Role1, Role2, Role3, Role4, Role5) by a single dropdown (codelist) name= "Account_Roles" containing same values (Role1, Role2, Role3, Role4, Role5). I created Customer's XBO and declared field of the codelist type, name= "Account_Roles". So, the XBO now has below 6 fields :
Role1, Role2, Role3, Role4, Role5 (type = Indicator)
Account_Roles (type = codelist)
Existing search on All Accounts worked on the 5 checboxes and fetched those accounts for which the values matched.
E.g.
If in search parameters, I check Role1 & Role2, and for Account1, these values are stored as "true", then Account1 will be shown in the result list.
Now the search UI doesn't have the checkboxes, but codelist ('Account_Roles') which can have value 'Role1'/'Role2'/'Role3'/'Role4'/'Role5' or combinations are also possible like 'Role1' OR 'Role2', etc..
My question here is -
Will the old search query that worked on indicator fields earlier, handle the new FE "Account_Roles" automatically ?
If not, then will modification be required to existing search query ?
If modification is required, what steps I need to follow to handle this new field instead of checkboxes.
I need exact steps to modify a search query, as I tried several things in the PDI but was not able to confirm if this requirement can be implemented by modifying search query or it is not feasible from PDI perspective.
Appreciate all your inputs.
Thanks,
Sachin.Hi,
you can create a link between the vendor objects itself, means link 0vendor with 0ven_compc and 0ven_purorg. This should give you a list of all vendors multiplied with the comp codes multiplied with the purch. org. May be here it is possible to create another link between a attribute (eg. comp_code of 0ven_purorg with comp_code of 0ven_compc). In case it is not possible you need to add this link information somehow. Another option might be to create 2 queries. One on a infoset of 0vendor and 0ven_purorg and another one on 0vendor and 0ven_compc.
regards
Siggi -
How to Modify this Query to make it loop through Certain defined intervals
hI ALL,
I have a TABLE1 with one Column as ColumnA which will always have values either Value1,Value2,Value3.
TABLE1:
ColumnA CreationDateandTime
Value1 8:56
Value1 8:51
Value3 8:49
Value1 8:47
Value2 8:45
Value3 8:30
I am using the below query to retrieve the count of how many Value1's,Value2's and Value3's exist in the ColumnA for the Given point of Time by using a 'where' condition to get the count between specified Time.
SELECT
COUNT (case when A.ColumnA ='Value1' THEN 0 ELSE NULL END) Value1,
COUNT (case when A.ColumnA ='Value2' THEN 0 ELSE NULL END) Value2,
COUNT (case when A.ColumnA ='Value3' THEN 0 ELSE NULL END) Value3
from TABLE1 A
WHERE A.CASECREATIONDATEANDTIME
between '19-JUL-2006 8:00:00 pM' and '19-JUL-2006 9:00:00 PM' .
Result::
Value1 value2 Value3
3 2 1
Right now i am Manually changing the TimeLimits for every 1hour to find the Count of Values at that particular perioud of Time, I would like to know how can i Loop it so that I will get it for every one hour and also i want to Add a Dummy Column before the Value1 as my First Column which should show me the Lower Time Limit....
Expected Result should be some thing like this..(for some imaginary existance of values for the ColumnA Field)
LowerTimeLimit Value1 value2 Value3
8:00P.M 3 2 1
9:00 P.M 1 4 5
10:00P.M 0 0 0 (Since the Time is only 9:30 by now)
NOte;; It should not go into an Infinite Loop as i would be risking My job.
Thanks in Advance,
vJCertain Time Limit say 4:00PM . How do i restrict that...
Hope this will help you....
SQL> select * from tbl;
V DT
value1 8:41 AM
value1 8:45 AM
value2 8:46 AM
value1 8:46 AM
value2 8:49 AM
value2 8:50 AM
value3 8:50 AM
value3 9:05 AM
value1 9:35 AM
value3 9:45 AM
value2 10:33 AM
value2 9:33 AM
value3 10:45 AM
value1 01:01 PM
value1 01:15 PM
value2 01:59 PM
value3 04:12 PM
value1 04:52 PM
18 rows selected.
SQL> select to_char(trunc(to_Date(dt,'HH:MI AM'),'HH')+interval '1' hour,
2 'HH:MI AM') Hours,
3 sum(decode(v,'value1',1,0)) value1,
4 sum(decode(v,'value2',1,0)) value2,
5 sum(decode(v,'value3',1,0)) value3 from tbl
6 where to_char(to_date(dt,'HH:MI AM'),'HH24')<16
7 group by to_char(trunc(to_Date(dt,'HH:MI AM'),'HH')+
8 interval '1' hour,'HH:MI AM')
9 /
HOURS VALUE1 VALUE2 VALUE3
02:00 PM 2 1 0
09:00 AM 3 3 1
10:00 AM 1 1 2
11:00 AM 0 1 1
"though hours are not sorted..." -
Hi All,
I need to modify the SQL for retrieving assets from assets tab and assets in merchandising in 10.1.2. I found the class for SQLQuery builder, but I want to change the SQL.
Could you anyone please how to solve this.
Thanks & Regards,
BalaHi All,
I need to modify the SQL for retrieving assets from assets tab and assets in merchandising in 10.1.2. I found the class for SQLQuery builder, but I want to change the SQL.
Could you anyone please how to solve this.
Thanks & Regards,
Bala -
How to modify the query to get the output in a single row
Hi All,
Below is the query i have written it works fine
select DISTINCT right(left(CTACCT,13),4) AS LocationNum,
tODS_GLBalance.FiscalYearId AS FiscalYearId,
tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
--tods_GLMetadata.Metric,
Case when
tods_GLMetadata.Metric = 'Gross Margin'
Then SUM(Balance)
Else 0
END AS GrossMargin,
Case when
tods_GLMetadata.Metric = 'Occupancy'
Then SUM(Balance)
Else 0
END AS Occupancy,
Case when
tods_GLMetadata.Metric = 'Payroll Dollars'
Then SUM(Balance)
Else 0
END AS Payroll,
Case when
tods_GLMetadata.Metric = 'CF Sales'
Then SUM(Balance)
Else 0
END AS OperatingSales,
Case when
tods_GLMetadata.Metric = 'Operations'
Then SUM(Balance)
Else 0
END AS OperatingExpenses
-- 0 as payroll
from ods.[JJill].[tODS_GLBalance]
inner join ods.Staging.tODS_INF_GLPCT ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
inner join ods.JJill.tods_GLMetadata ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
where
(tODS_GLBalance.FiscalYearId = 2012) and
(tODS_GLBalance.FiscalMonthOfYearId = 2) and
(right(left(CTACCT,13),4)= 3020)
group by
right(left(CTACCT,13),4),
tODS_GLBalance.FiscalYearId,
tODS_GLBalance.FiscalMonthOfYearId,
tods_GLMetadata.Metric
This is the sample output,
LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
3020 2012 2 -112477.00 0.00 0.00 0.00 0.00
3020 2012 2 0.00 0.00 0.00 -158288.94 0.00
3020 2012 2 0.00 0.00 0.00 0.00 5625.44
3020 2012 2 0.00 0.00 24185.79 0.00 0.00
3020 2012 2 0.00 31075.53 0.00 0.00 0.00
But, i am expecting the output to be something like this
LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
3020 2012 2 -112477.00 31075.53 24185.79 -158288.94 5625.44
Can someone please help me with changing my query to get the desired output?
Please let me know if you have any questions.
ThanksTry this:
SELECT DISTINCT
RIGHT(LEFT(CTACCT,13),4) AS LocationNum, tODS_GLBalance.FiscalYearId AS FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
SUM(CASE WHEN tods_GLMetadata.Metric = 'Gross Margin' THEN Balance ELSE 0 END ) AS GrossMargin,
SUM(CASE WHEN tods_GLMetadata.Metric = 'Occupancy' THEN Balance ELSE 0 END ) AS Occupancy,
SUM(CASE WHEN tods_GLMetadata.Metric = 'Payroll Dollars' THEN Balance ELSE 0 END ) AS Payroll,
SUM(CASE WHEN tods_GLMetadata.Metric = 'CF Sales' THEN Balance ELSE 0 END ) AS OperatingSales,
SUM(CASE WHEN tods_GLMetadata.Metric = 'Operations' THEN Balance ELSE 0 END ) AS OperatingExpenses
FROM ods.[JJill].[tODS_GLBalance]
INNER JOIN ods.Staging.tODS_INF_GLPCT
ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
INNER JOIN ods.JJill.tods_GLMetadata
ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
WHERE tODS_GLBalance.FiscalYearId = 2012
AND tODS_GLBalance.FiscalMonthOfYearId = 2
AND RIGHT(LEFT(CTACCT,13),4) = 3020
GROUP BY right(left(CTACCT,13),4), tODS_GLBalance.FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId, tods_GLMetadata.Metric -
How restore the deleted Query in SAP BI
Hi Experts,
I deleted one Bex query unexpectedly, in that i haa lot of definations, Now i want restore the that query is there any possibulity to restore deleted query
Thanks,
ChandraHi Chandra
Request your BASIS team to restore the system from its last backup. Suppose. you have deleted the query at around 2 PM, then ask basis guys to restore the system upto a time before 2 PM, lets say 1:30 PM.
Regards
Anindya -
How to create a query view in sap bw?
can any one please tell me how to create a query view in sap bw 3.5?
Hi,
you can do this by using Bex analyzer and WAD ..
gop through this link ..
http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
hope this helps you ..
Reagrds,
shikha -
How to write a SQL query in SAP B1 2007 B with input parameters?
How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?
The syntax like
SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
Thanks,
Gordon -
We are interested to know how/where to check query runtimes for any Query in SAP BW?
We are interested to know how/where to check query runtimes for any Query in SAP BW?
Is there any table or program to get the query run time details per query for a particular day.Hello Sravan,
Bex statics tables would be 'RSDDSTATHEADER','RSDDSTATINFO' & 'RSDDSTATEVDATA'. all these can found in one view 'RSDDSTAT_OLAP'.
above can give historical statistic.
For current Query statics : T-code RSRT, and select debug mode select display statistics and then execute.
Once you get the output press F3(one step back), there you can see statics of the query for that particular execution.
Thanks,
Mallikarjuna -
How to search roles by Query in SAP BW?
how to search roles by Query in SAP BW?
Use SUIM with option roles with Auth object and put S_RS_COMP or S_RS_COMP1 here u can put the query for which u want role.
-
How to find Tables behind a Custom Query in SAP
Hi Gurus,
Can anyone please help me find tables behind a custom query in SAP.
Regards
AsHi
Check the name of the programm assigned to transaction, it should be like this:
AQZZ<user group>=======<query name>======
or
AQIC<user group>=======<query name>======
It depends of the query area is global or cross-client
So run SQ01, select the quey area, select the quey group and so your query: now you can see the infoset and then you see it by SQ02 transaction
Max -
How to insert a query into a NEW workbook ?
Hi Friends,
Could some one tell me how to insert a query into a new workbook? i am trying to run query in NW2004S BEx Query Designer, which always open the query on web when executed. i want to run the query in NW2004S BEx Query Designer and want it to open the result in Excell.
If i am not wrong then to do the same, i need to embed the query into workbook. Correct me if i am wrong. If i am right then plzz tell me the steps to insert the query into workbook.
Ur help will be rewarded in terms of points.
Thanks,Hello,
If you open the BEx Query Designer from the desktop, you cannot execute the query directly to the BEx Analyzer for an Excel view. You can only execute it directly to the Web. This is true for the SAP BW 3.x version as well as the SAP NetWeaver 2004s version.
If you open the BEx Query Designer from within BEx Analyzer, once you select (or create) your query, you will have a green check mark icon that will then allow you to deploy the query directly to the BEx Analyzer for the Excel view.
However, this would only make sense if you are creating or modifying the query. If not, you would simply open BEx Analyzer and use the Open Query option in this tool to see your query in an Excel format, as has been previously suggested by the other respondents to this posting.
Regards,
Katie Beavers
SAP NetWeaver Product Management
Maybe you are looking for
-
How to change the batteries on a palm m125 without having to do a hard reset
Some palm m125's are defective meaning that when one changes the AAA batteries one is presented with a no way out question on whether yes to hard reset or no to not hard reset, yes it's true that what i mean by no way means that even a soft reset wil
-
Can I do this: Use wireless network as WAN and create my own LAN.
I travel quite a bit and many hotels now do not have wired in-room networks. So I'm looking for a way to use the wireless network as a wide area network and create a local network in-room behind a router/firewall, preferably with a private SSID.. I'v
-
On all iOS devices we have CalDav accounts setup to sync calenders from our server. However, you also get those accounts in the "Reminders" app. Is there a way to remove on the reminders portion, but leave the calenders? Thanks!
-
Import/Export SMS to/from iPhone have be must in Itunes
Import/Export SMS to/from iPhone have be must in Itunes
-
Some sent messages show up as numbers....
Some of my sent messages show up as names, others just show up as numbers. My phone was activated and my contacts transferred by a Verizon employee at a local store. Anyone have any idea as to why this is happening and how I can fix it.??? Thanks.!