Segregate the values which are not in Hierarchy ............
Hi All,
Please help me in building the following query:
Parent Child
==== ===
10 20
20 30
30 40
50 60
70 80
etc..... In the above data let us assue there is only one grand parent say 10 and the values 50,60,70,80 etc are not attached to grand parent 10.So i need to display the values which are forgotten to attach to the Top Node 10 i.e, here 50,60,70,80 etc. If my query helps in retreving these values then i can attach them back to the hierarchy.
Thanks in advance.
regards,
kalyan
SQL>WITH t AS
2 (SELECT 10 AS par, 20 AS chi FROM DUAL UNION ALL
3 SELECT 20, 30 FROM DUAL UNION ALL
4 SELECT 30, 40 FROM DUAL UNION ALL
5 SELECT 50, 60 FROM DUAL UNION ALL
6 SELECT 70, 80 FROM DUAL)
7 SELECT *
8 FROM t
9 WHERE chi NOT IN(SELECT chi
10 FROM t
11 CONNECT BY PRIOR chi = par
12 START WITH par = 10);
PAR CHI
50 60
70 80hth, Urs
Similar Messages
-
Parameter field should pick the values which are there in the value table
Hi Experts,
I have a requ. where in a parameter field should pick only the values which are there in the value table for that particular field and should not allow the User to put in any other value.
The value table is created in the program manually.
EX:If the value table contains two sales organization VE03 and VE65 then the field shouldn´t allow anyother value other then those two.
Thanks and Regards,
ArunTry using a listbox.
report zrich_0001.
type-pools: vrm.
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
parameters: p_vkorg(4) type c as listbox visible length 20.
at selection-screen output.
name = 'P_VKORG'.
xvrm_values-key = 'VE03'.
xvrm_values-text = 'VE03'..
append xvrm_values to ivrm_values.
xvrm_values-key = 'VE65'.
xvrm_values-text = 'VE65'..
append xvrm_values to ivrm_values.
call function 'VRM_SET_VALUES'
exporting
id = name
values = ivrm_values.
at selection-screen.
if p_vkorg is initial.
message e001(00) with 'Please enter a sales org'.
endif.
Regards,
RIch Heilman -
How exclude multiple values which are not in sequence ( range )
Hi Abapers,
My Requiremnt is to exclude multiple values which are not in sequence in selection screen.
I want to restrict some values .
please provide sample code.
thanks & regards,
Hari priyaSELECT-OPTIONS : s_matnr FOR mara-matnr.
INITILIZATION.
s_matnr-sign = 'E'. " E means Excluding.
s_matnr-option = 'EQ'.
s_matnr-low = '1000'.
append s_matnr.
s_matnr-sign = 'E'.
s_matnr-option = 'EQ'.
s_matnr-low = '1500'.
append s_matnr.
s_matnr-sign = 'E'.
s_matnr-option = 'BT'.
s_matnr-low = '2000'.
s_matnr-high = '3000'.
append s_matnr.
START_OF_SELECTION.
SELECT * FROM MARA INTO TABLE itab WHERE mara IN s_matnr.
the above s_matnr has values 1000,1500, 2000 - 3000.
so the above code fetches all the values excluding 1000,1500 and between 2000 and 3000.
Regards
Bala Krishna -
How to find out the values which are assigned in authority group
Hi to all
Please tell me where can I find out the values which are assigned in authority object according to roles.
for ex :
Changed Customer: Account Authorization F_KNA1_BED
Changed Customer: Account Authorization T-DR50175601
Activity 01, 02, 03, 08 ACTVT
Authorization Group 5100 BRGRU
F_KNA1_BED is the authority object , assigned to one user.
He can access the authorization group 5100. I want to check that value in my program.
How ?
Where it is stored.
Please help me....
Regards
Anubhav GuptaHi Anubhav,
Please use this FM "SUSR_USER_AUTH_FOR_OBJ_GET" and pass the object name in it . You would get the values for that particular object.
Thanks
Nitin Sachdeva -
Not to display the document which are not due at the time of making the pay
Hi,
My user dont want to display the document which are not in due at the time of making the payment through F-53.
For example:
Vendor Code: 1001 has the open item as below:
Due Date - 29.09.2009 Amount 50000
Due Date - 30.09.2009 Amount 10000
Due Date - 15.10.2009 Amount 40000 (due date is in future)
Now my user want to make the payment for the above vendor through T-Code: F-53 / F-58, while clicking the process Open item the syste, shows all the document (which inclues the future due date document).
My user dont want to display the document which is in future due date because by wrongly he should not make the payment for the future due dated document.
Kindly provide me the solution how to disable the document which are not in due.
Regards
JSHi,
You can try the following -
Execute transaction code O7F4, and maintain the field FAEDT. Then execute F-53 and check if the option to enter net due date appears in the additional selection or not.
Please revert.
Thanks and Regards,
Anit -
How to remove the tasks which are not manually recoverable?
How to remove the tasks which are not manually recoverable?
I tried performing manual recovery for the BPEL processes but there are few tasks which cant be manually recoverable..
Could you please tell me how to remove those tasks and also tell me which information in the console is the task_id in the database?This article explains how to cleanup bpel process instances, you can find task instance id by searching for data in payload using api.
Managing a BPEL Production Environment
http://www.oracle.com/technology/pub/articles/bpel_cookbook/blanvalet.html
Cheers,
Rad -
How can I find the profiles which are not in a role
Hi all,
how can I find all profiles which are not used in a role. Its important for a security check.Hi Stefan,
you do one thing use the transaction SUIM
SUIM>>Profile>>By Roles
give all the role name and execute you will get roles with profiles
and extract to excel sheet
to get only profiles
suim>>profile>>by profile name or text give * and execute
and extract in excel sheet no compate profile coloumns get the profiles which does not there in any roles
hope ds helps
thanks
kishore -
Any script to cancel the PO which are not taken receipt from the back end?
Hi,
We need to cancel the PO Shipments which are not taken receipts to reverse the encumbrnace budegatory amount. is there any script i can use so that i can cancel all the PO's which are not taken receipts or we need to manually cancel the each shipment by navigating in to the PO summary window using the Tools > Control option.
Please let me know your views..ASAP
Note: We are using the 11.5.10.2 version with encumbrance budgetary funds checking for PO's.
Regards,
Kevin
Edited by: user10960960 on May 6, 2009 3:17 AMThere is no documented,proven and supported way of doing such thing using scripts. Best to do it from front end; use dataloader for large volumes, and data loader in forms playback mode for larger volumes.
-
How remove the values which are entered in filter attributes of VO
Hi,
On top of one VO we are performing search using bind variables.
To refine the search we have added filterable="true".
Now when we perform seach and then we have filtered using one column we got result and we proceeded.
When we come to this screen again when i perform search with the bindvariable and click on search then the previously applied filter is also getting applied
becuase the value in that filter is still there.
So How can i remove the value which is entered in filter attribute of the VO programatically.
Please help me.
Regards
Gayazwould this help you:
http://adfscopes.blogspot.com/2011/03/programatically-clearing-filter.html -
List of materials from the excel which are not posted
I have written bdc,
that ware house storage locations should not be allowed.
All the storage locations in the table T320 are ware house storage locations.
so i have written
if not it_data1 is initial.
SELECT * into table iT_320 FROM T320
for all entries in it_data1
where WERKS = it_data1-werks and
LGORT = it_data1-lgort.
endif.
LOOP AT IT_DATA1 .
read table iT_320 INTO wa_320 with key werks = it_data1-werks
lgort = it_data1-lgort.
IF sy-subrc = 0 .
delete it_data1 index sy-tabix.
ENDIF.
endloop.
So its working fine till then.
but i wanted a list of materials from the excel wch are not posted,so tht the user is aware tht some items are not consumed.
How to display that list in bdc.
Please give the code for that.MY EXCEL DATA IS IN IT_DATA1.
LOOP AT IT_DATA1 .
read table iT_320 INTO wa_320 with key werks = it_data1-werks
lgort = it_data1-lgort.
IF sy-subrc = 0 .
delete it_data1 index sy-tabix.
ENDIF.
endloop.
LOOP AT IT_DATA1 .
MOVE-CORRESPONDING IT_DATA1 TO IT_DATA_h.
Collect it_data_h.
ENDLOOP.
Clear it_data_h.
clear : it_data1.
THEN MY BDC IS LIKE THIS.
LOOP AT IT_DATA_H .
perform bdc_dynpro using 'SAPMM07M' '0400'.
perform bdc_field using 'BDC_CURSOR'
'RM07M-WERKS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MKPF-BLDAT' LV_DATE .
perform bdc_field using 'MKPF-BUDAT' LV_DATE.
perform bdc_field using 'RM07M-BWARTWA' '261'.
perform bdc_field using 'RM07M-WERKS' IT_DATA_H-WERKS.
perform bdc_dynpro using 'SAPMM07M' '0421'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-WERKS(03)'.
CLEAR : FLAG1, W_FLAG.
LOOP AT IT_DATA1 WHERE aufnr = it_data_H-aufnr.
W_FLAG = 1.
CONCATENATE 'MSEG-MATNR' '(' W_FLAG ')' INTO W_MATNR_C.
perform bdc_field using W_MATNR_C
IT_DATA1-MATNR.
CLEAR : QTY.
QTY = IT_DATA1-ERFMG.
SHIFT QTY LEFT DELETING LEADING SPACE.
END LOOP.
NOW HOW TO COMPARE THE MATERIALS IN EXCEL AND BDC POSTED.
PLEASE PROVIDE THE CODE FOR THAT AND HOW TO DISPLAY. -
Finding the numbers which are not consecutive in an order....
Hi,
The solution i found was using the minus set operation:
SQL> create table test as
2 mplestselect 1 a from dual
3 union all
4 select 3 a from dual;
Table created
SQL>
SQL> select level
2 from dual
3 connect by level<=10
4 minus
5 select a from test
6 /
LEVEL
2
4
5
6
7
8
9
10
8 rows selectedQuestions:
1) Is there any other solution...(i'm convinced there is even simpler....)
2) Trying in the above sql stmt not to create the table test... i tried the following :
but the error appearerd...
with sample as
(select level
from dual
connect by level<=10),
x as
(select 1 a from dual
union all
select 2 a from dual
union all
select 7 a from dual)
select level from sample
minus
select a from x
ORA-01788:required connect by expression in this query blockHow could i edit the query without creating the "test" table...????
Thank you,
SimHi, Sim,
sgalaxy wrote:
Questions:
1) Is there any other solution...(i'm convinced there is even simpler....)Not that I know of (assuming I understand the problem).
2) Trying in the above sql stmt not to create the table test... i tried the following :
but the error appearerd...
with sample as
(select level
from dual
connect by level<=10),
x as
(select 1 a from dual
union all
select 2 a from dual
union all
select 7 a from dual)
select level from sample
minus
select a from x
ORA-01788:required connect by expression in this query blockHow could i edit the query without creating the "test" table...????Don't name your columns the same as pseudo-columns (like LEVEL), built-in functions, reserved words, etc.
Use a column alias, like this:
with sample as
(select level AS level_num -- Alias defined
from dual
connect by level<=10),
x as
(select 1 a from dual
union all
select 2 a from dual
union all
select 7 a from dual)
select level_num from sample -- Alias referenced
minus
select a from x -
Obtain count of values, including the values that are not in the table
I have values: 1,2,3,7,8,9
and my table contain value 3,7,8,3
I need get result of select
-value- -count-
-1- -0-
-2- -0-
-3- -2-
-7- -1-
-8- -1-
-9- -0-
I tried
select value, count(value) from table where value in ('1','2','3','7','8','9') group by value
but I get only
-value- -count-
-3- -2-
-7- -1-
-8- -1-
Thank you for helpThank you for help but this is not functional if values are text (varchar).Have you mentioned that ? In your example post you have mentioned only numeric values. Why don't you try yourself, When you have an working (? Oops, there is no version mentioned by OP, So may not be working) example ?
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> SELECT job,COUNT(job)
2 FROM emp
3 GROUP BY job;
JOB COUNT(JOB)
CLERK 4
SALESMAN 4
PRESIDENT 1
MANAGER 3
ANALYST 2
SQL> SELECT column_value,COUNT(job)
2 FROM emp e, TABLE(sys.odciVARCHAR2list('CLERK','PROGRAMMER','SALESMAN'
3 ,'SALESMAN','DBA','PRESIDENT','MANAGER'
4 ,'Architect','ANALYST')) t
5 WHERE e.job(+)=t.column_value
6 GROUP BY column_value
7 ORDER BY 1;
COLUMN_VALUE
COUNT(JOB)
ANALYST
2
Architect
0
CLERK
4
COLUMN_VALUE
COUNT(JOB)
DBA
0
MANAGER
3
PRESIDENT
1
COLUMN_VALUE
COUNT(JOB)
PROGRAMMER
0
SALESMAN
8 -
How to Get Resource value which are referred in code behind file using IResourceProvider
Hi Everyone,
Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider. I created a CustomResourceProvider project using ResourceProviderFactory and able to get the resource values from DB which
are used in aspx page.
But i'm not able to get the values which are referring from code behind file.
Ex: Label1.Text = Resources.Common.Car; // This is still coming from resx file.
Can any one please let me know how to get the value from DB instead of resx file which are referred in cs file.
Appreciate your help.
The below code uses the ResourceProviderFactory which calls this method and gets it from DB. Please let me know if you need any more info.
public class DBResourceProviderFactory : ResourceProviderFactory
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
return new DBResourceProvider(classKey);
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
// we should always get a path from the runtime
string classKey = virtualPath;
if (!string.IsNullOrEmpty(virtualPath))
virtualPath = virtualPath.Remove(0, 1);
classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);
return new DBResourceProvider(classKey);
Regards, Ravi Neelam.Hi Ravi Neelam.
>>Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider.
Based on this message, your issue related to web application, questions related to Asp.Net should be posted in
Asp.Net forum.
Please reopen a new thread in that forum. You will get more efficient response.
Regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Fetching data which are not common
Hi Gurus,
I got an strange requirement it is to fetch data from 2 internal table from the same field name but the values should not be same.can any one tell me some logic for this? eg: fetch matnr from mara and mard into an internal table but the final result in the internal table should be values which are not common in both the tables.
Ragards,
Ravihow can mara and mard will differe in entries. if there is a entry in MARD there should be an entry in MARA since it is master table. so in this case you can do some thing like this.
first get the data from both the tables..
loop at it_mara.
read table it_mard.
if sy-subrc ne 0.
"find the material which is not there in MARD and only in MARA
"append the matnr to another table
endif.
endloop.
may be you have taken a wrong example to describe. -
How to find aggregates which are not used.
Hi ,
There are lot of aggregates in my system , so i should deactivate the aggregates which are not used from long back. so how to find out all those , can u plz guide me ,You can also check the usage column of the aggregates. If usage value is high then the aggregate is used very frequently.
If there is no value at the last used then the aggreagete is not used at all.
Hope it helps
Regards
Sadeesh
Maybe you are looking for
-
How do you reset your password if you dont know the current password
Does anyone know how to reset your password if you do not know the current password
-
Is it possible to connect 5th Gen Ipod Touch to HDTV to view HD content from Ipod Touch?
Can this be done? What cables would be needed? Thank You!
-
How do I delete a massive amount of emails?
How do I delete a large amount of email?
-
i work with some sender SOAP adapter in my xi project. After installing SP19 all Communication channell gets error when i send message: the error (in adapter monitoring) is following : 2006-12-15 15:29:01 Error Returning to application. Exception: co
-
Create Control Cycle(LPK1)
Hello Experts, Can anybody let me know Is there an Standard SAP Program to load 'Control Cycles(LPK1) into SAP? Thanks for the help.