How to include case stmt in group by clause
Hi i have a question,
How do i include a case statement in the group by clause?
For example:
Select
(case when x.ctry is null then y.ctry else x.ctry end) as coo,
sum (x.in_amt)
from
tbl1 x,
tbl2 y
where
x.id = y.id
group by
(case when x.ctry is null then y.ctry else x.ctry end)
Assume, I have got millions of records in both the tables, then my guess is, the above query might take huge time to complete.
Any alternate method to do this?
cd/ wrote:
To remove the expression from the GROUP BY clause. I didn't advocate any performance improvements, did I?No you didn't. And your advice can indeed remove the expression from the GROUP BY clause. But I'm still puzzled as to why that would be a goal in itself.
Regards,
Rob.
Similar Messages
-
How to use CASE stmt in Where clause
Hi,
How to use CASE stmt in WHERE clause?. I need the code. Please send me as early as possible..........Hi,
1004977 wrote:
Hi,
How to use CASE stmt in WHERE clause?. There's no difference between how a CASE expression is used in a WHERE clause, and how it is used in any other clause. CASE ... END always returns a single scalar value, and it can be used almost anywere a single scalar expression (such as a column, a literal, a single-row function, a + operation, ...) can be used.
CASE expressions aren't needed in WHERE clauses very much. The reason CASE expressions are so useful is that they allow you to do IF-THEN-ELSE logic anywhere in SQL. The WHERE clause already allows you to do IF-THEN-ELSE logic, usually in a more convenient way.
I need the code.So do the peple who want t help you. Post a query where you'd like to use a CASE expression in the WHERE clause. Post CREATE TABLE and INSERT statements for any tables used unless they are commonly available, such as scott.emp). Also, post the results you want from that sample data, and explain how you get those resuts from that data.
See the forum FAQ {message:id=9360002}
Please send me as early as possible..........As mentioned bfore, that's rude. It's also self-defeating. Nobody will refuse to help you because you don't appear pushy enough, but some people will refuse to help you if you appear too pushy. -
How to use order by within Group by clause
Hi All,
I need a help as to how should i use the Order by clause so that the data should be in order with respect to one column, and at the same time whole data is grouped by some other column...like
Select RaceNo,Venue,FP,BP from Race group by RaceNo
Here I want to order by FP in ascending order for each group. When i am using it , whole order is changing.
Can anybody suggest me how to use order by clause that would apply to each group of data.
Thanks .order by clause should be used at the last in any query.......but in group by clause u can't use use that becoz u group according to column then no ordering is needed there......if u want to filter something then u can use having clause and later if u need to arrange then u can use order by clause.........
i hope this eg.l gives u some clarification....
e.g
select deptno,count(empno)
from dept
group by deptno
having count(empno) > 10
order by deptno -
How to display column specified in group by clause only once?
I've a result coming out of a sql query that uses group by clause as follows:
2008-07-25 19" LCD Screen 5
2008-07-25 HP Printer 4
2008-08-01 Hanging Files 11
2008-08-01 Stapler 3
2008-08-15 19" LCD Screen 5
2008-08-15 Hanging Files 14
What should I do in the query to display the result set as follows:
2008-07-25 19" LCD Screen 5
HP Printer 4
2008-08-01 Hanging Files 11
Stapler 3
2008-08-15 19" LCD Screen 5
Hanging Files 14Hi,
That's a display issue, and display issues are best handled by the front end.
What is your frone end?
If it's SQL*Plus, you can use the BREAK command.
For example:
BREAK ON deptno NODUPLICATES
SELECT deptno
, ename
FROM scott.emp
ORDER BY deptno
, ename
;Output:
` DEPTNO ENAME
10 CLARK
KING
MILLER
20 ADAMS
FORD
JONES
SCOTT
SMITH
30 ALLEN
BLAKE
JAMES
MARTIN
TURNER
WARDNote that deptno is never NULL: KING and MILLER have deptno=10; but it doesn't show in the display, because it's the same as the deptno on the previous row.
NODUPLICATES is actually the default, so you could just say
BREAK ON deptnoThe BREAK command remains in force until you end the session (or un-do it, e.g. with "CLEAR BREAKS")
Remember to issue the BREAK command at least once in the session before running the query.
To get the same results in SQL, use the analytic ROW_NUMBER function. -
Case statement with group by clause
SELECT STP, CASE WHEN Alternate IS NULL THEN 3 ELSE 4 END as Ind,
CASE WHEN Alternate IS NULL THEN 'New Address' ELSE 'New Location' END as Description , Count(*) Rec_Cnt
FROM t_Ids
group by STP, CASE WHEN Alternate IS NULL THEN 3 ELSE 4 END, CASE WHEN Alternate IS NULL THEN 'New Address' ELSE 'New Location'
ORDER BY 1,2,3
I need a query something like this. Does anyone has any idea on this???You're missing the END on the GROUP BY Case statement, but otherwise this looks fine.
What problem are you having?
Also, please post DDL
Thanks
Carl -
How to include all the child OU groups of a master OU group in LDAP authentication
Dear All,
I am using Apex 4.2 on windows server 2012 on internet explorer with database 11g R2 all 64 bit.
we are using Microsoft Active Directory Authentication in our domain.
I have created two protals, Staff Portal and Student Portal
I have two groups, Staff and Students. these two groups coming under HCT group.
I want to configure LDAP authentication for these groups, so that student cannot login to staff portal and vice versa.
I had created on authentication schema in apex.
inititally I configured as below
for example I have a group ETC, inside ETC I have CSS in active directory,
DN String=cn=%LDAP_USER%,dc=hct,dc=org
Use Exact distinguish name=YES
LDAP Username edit function=
return apex_escape.ldap_dn (
p_string => :USERNAME,
p_escape_non_ascii => false ) || ',ou=users,ou=css,ou=etc,ou=staff,ou=hct' ;
Username Escaping=NO ESCAPING
and it is working,
now I have another group under ETC, which is ESS. how to include ESS also? I mean how to include all the child groups of a master group?
because I will then only include the STAFF ou and the rest of the ou which coming under staff will come automatically.
please refer to this thread for more details.
Re: Re: Different LDAP authentication for Student and Staff Active directory groups
Thank you.Powershell (or vbscript if you want to be old school).
You can trigger a powershell script which will remove the offending user(s) easily enough with out resorting to a TOLDAP pass. Nearly any script type thing would work but powershell is preferred. It can be triggered separately from the TO AD stuff and will take multiple objects to run in one pass if you can construct the command line (or create a text file and feed it in).
Otherwise, TOLDAP is the way to write to AD...
Peter -
I have a table which is defined like this.
unique_number NOT NULL VARCHAR2(64),
input_unique_number VARCHAR2(64),
source_system VARCHAR2(40),
end_system VARCHAR2(40),
type VARCHAR2(32),
date_time_sent TIMESTAMP(6),
transaction_name VARCHAR2(60)
type will have input, output and failed
For every input message a unique_number is generated it will have source_sytem value populated but not end_sytem value
For every output message a unique_number is generated plus it will have input_unique_number same as that of input message.
For every output message source_system and end_system values are populated.
I am trying to create a report which will give input, output and failed count for each end site, but output is getting the blank ids grouped for the input_messages
select
count(case type when 'input' then Unique_id end) as I,
count(case type when 'output' then Unique_id end) as O,
count(case type when 'failed' then Unique_id end ) as F,
transaction_name,
end_system
from message_table
where to_char(date_time_sent,'DD-MON-YY HH24:MI:SS') between '18-MAY-11 09%' and '19-MAY-11 11%'
and source_system='&Source_system'
group by transaction_name, end_system
ORDER BY end_system;
I got the following output
I O F TRANSACTION_Name END_SYSTEM
0 11 0 DistProdQualityEvent EANCM5051256614152
22 0 11 DistProdQualityEvent EANCM
0 1 0 DistInventoryReport EANCM5051351029368
1 0 0 DistInventoryReport EANCM
But I trying for output something like this
I O F TRANSACTION_Name END_SYSTEM
22 11 11 DistProdQualityEvent EANCM5051256614152
1 1 0 DistInventoryReport EANCM5051351029368
Can you please let me know is such an output is possible or notHi,
Perhaps this is what you want:
select count(case type when 'input' then Unique_id end) as I,
count(case type when 'output' then Unique_id end) as O,
count(case type when 'failed' then Unique_id end) as F,
transaction_name,
MAX (end_system) AS max_end_system -- Changed
from message_table
where date_time_sent between TO_DATE ( '18-MAY-2011 09' -- Compare DATEs, not strings
, 'DD-MON-YYYY HH24'
and TO_DATE ( '19-MAY-2011 11%'
, 'DD-MON-YYYY HH24'
and source_system = '&Source_system'
group by transaction_name -- Without end_system -- Changed
ORDER BY max_end_system -- Changed
;If you include end_system in the GROUP BY clause, then rows with end_system='EANCM5051256614152' will not be grouped with rows with end_system='EANCM'.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data. Why should the output say 'EANCM5051256614152' and not ''EANCM'?
Always say which version of Oracle you're using.
Edited by: Frank Kulash on Jun 3, 2011 8:49 AM -
Output not sorted when using group by clause
Recently we migrated our application from Forms5 to Forms10g and database from 7.3.2 to 10gR2.
More than 400 applications using sql stmt with "group by" clause and without "order by".
In Earlier version of oracle 7.3.2 "group by" clause in SQL stmt sorts the output by order of the column in the "group by"
stmt, where new version of oracle 10g (10.2.0.1.0 - 64bit Production) doesnt behave like older version.
eg select div_cd,dept_cd,count(*) from class group by div_cd,dept_cd
Output of the above query in Oracle7
DIV_CD DEPT_CD COUNT(*)
0 1 120
0 9 131
1 4 938
1 6 1
4 1 1490
5 2 59
6 6 848
6 9 295
8 1 45
9 5 19
Output of same query in Oracle10g
DIV_CD DEPT_CD COUNT(*)
0 6 120
0 9 131
4 1 1490
6 9 295
8 1 45
9 5 19
1 4 938
1 6 1
5 2 59
6 6 848
My question is
a) Does the oracle behave in that manner?.
b) if so, Any patch set available for this?
c) if no patch set how to resolve this issue.
if i use "order by" clause
along with group by then i can get the output how i want.
BUt problem is more than 400 applications (forms) using above method.
Identify Forms/Reports and rectifing is a tedious job.
Anyone can give me a good solution to solve the above issueGroup By does not, and never has guaranteed order. Just because it happened that way on the past does not mean it will continue to do so.
In the past, the algorithm used for Group By invoked a sort. It was convenient for the system to simply dump the output in that resulting order. These days, Group By could also be accomplished using a hash algorithm. Walking through the hash can easily result in a completely different ordering, as you have seen.
Your problem is that the assumptions made previously are now invalid. Oracle is still working correctly. No patch, but you might be able to work around it by crippling your database and using the COMPATIBLE parameter (although the official lower limit is 9.2.0) -
Newbie Dynamic Group by clause
Example
create table test( awhite numeric(6,0)
, DMonth numeric(2,0)
, Goalnumber numeric(2,0)
, Objnumber numeric(2,0));
insert into test(awhite,DMonth,Goalnumber,Objnumber)
values(5,6,1,1);
insert into test(awhite,DMonth,Goalnumber,Objnumber)
values(8,6,1,2);
insert into test(awhite,DMonth,Goalnumber,Objnumber)
values(12,6,2,1);
insert into test(awhite,DMonth,Goalnumber,Objnumber)
values(16,10,2,1);
insert into test(awhite,DMonth,Goalnumber,Objnumber)
values(4,10,2,1);
===========================
I need this to be ONE query with a parameter
Select SUM(Awhite) SWhite
,DMonth
,CASE WHEN &groupbyobj<2 THEN
to_number('99')
ELSE
Goalnumber
END Goalnumber
,CASE WHEN &groupbyobj<3 THEN
to_number('99')
ELSE
Objnumber
END Objnumber
FROM Test
GROUP BY Goalnumber,Objnumber,DMonth
============================
So when the groupbyobj=3, I want the output to look like
SWHITE DMONTH GOALNUMBER OBJNUMBER
5 6 1 1
8 6 1 2
12 6 2 1
20 10 2 1
==============================
So when the groupbyobj=2, I want it grouped by GOALNUMBER
SWHITE DMONTH GOALNUMBER OBJNUMBER
13 6 1 99
12 6 2 99
20 10 2 99
So when the groupbyobj=1, I want it grouped by DMonth
SWHITE DMONTH GOALNUMBER OBJNUMBER
25 6 99 99
20 10 99 99
I ADDED the above "99" to the output above. I could not get my query to output that.
QUESTION- How can I create A DYNAMIC Group by clause based on the parameter
(Groupbyobj) Selected?
TIA
Steve42I noticed I got the numbers 1 until 3 just the other way round, so here is a new version.
SQL> var P_GROUPING_SET number
SQL> exec :P_GROUPING_SET := 1
PL/SQL-procedure is geslaagd.
SQL> select sum(awhite) swhite
2 , dmonth
3 , nvl(goalnumber,99) goalnumber
4 , nvl(objnumber,99) objnumber
5 from test
6 group by dmonth
7 , rollup(goalnumber,objnumber)
8 having case grouping_id(goalnumber,objnumber)
9 when 0 then 3
10 when 1 then 2
11 when 3 then 1
12 end = :P_GROUPING_SET
13 /
SWHITE DMONTH GOALNUMBER OBJNUMBER
25 6 99 99
20 10 99 99
2 rijen zijn geselecteerd.
SQL> exec :P_GROUPING_SET := 2
PL/SQL-procedure is geslaagd.
SQL> select sum(awhite) swhite
2 , dmonth
3 , nvl(goalnumber,99) goalnumber
4 , nvl(objnumber,99) objnumber
5 from test
6 group by dmonth
7 , rollup(goalnumber,objnumber)
8 having case grouping_id(goalnumber,objnumber)
9 when 0 then 3
10 when 1 then 2
11 when 3 then 1
12 end = :P_GROUPING_SET
13 /
SWHITE DMONTH GOALNUMBER OBJNUMBER
13 6 1 99
12 6 2 99
20 10 2 99
3 rijen zijn geselecteerd.
SQL> exec :P_GROUPING_SET := 3
PL/SQL-procedure is geslaagd.
SQL> select sum(awhite) swhite
2 , dmonth
3 , nvl(goalnumber,99) goalnumber
4 , nvl(objnumber,99) objnumber
5 from test
6 group by dmonth
7 , rollup(goalnumber,objnumber)
8 having case grouping_id(goalnumber,objnumber)
9 when 0 then 3
10 when 1 then 2
11 when 3 then 1
12 end = :P_GROUPING_SET
13 /
SWHITE DMONTH GOALNUMBER OBJNUMBER
5 6 1 1
8 6 1 2
12 6 2 1
20 10 2 1
4 rijen zijn geselecteerd. -
How to include OSTC.rate in this query
How to include OSTC.rate in this query,Im using it for crystal report.
DECLARE @sVAT NVARCHAR(max)
DECLARE @sCess NVARCHAR(max)
DECLARE @sCST NVARCHAR(max)
DECLARE @nDocentry INT
SET @sVAT='1' SET @sCess='7' SET @sCST ='4'
SELECT DocEntry
,DocDate,VehicleNo,Driver,NumAtCard
,Building,Block,Street,City,District,State,Country
,Series,DocNum
,BTinNo,BCstNo,BCeRegNo,BPanNo,BCeRange,BCeComRate,BCeDivision,BEccNo
,Type
,CardName,[Delivery Addr]
,ECCNo,CERange,CERegNo,CEDivis,CEComRate
,PAN,CST,STN
,[Deliver At]
,LineNum
,Dscription,HSNumber,Quantity,Rate,LineTotal,Discount,Vat [VAT],Cess [Cess],Total,GTotal
,TotalExpns
,MfgName
,MFGBuilding,MFGBlock,MFGStreet,MFGDistrict,MFGCity
,MCERegNo,MCERange,MCEDivis,MCEComRate,MPAN,MCST,MSTN
,SupName
,SUPBuilding,SUPBlock,SUPStreet,SUPDistrict,SUPCity
,SCERegNo,SCERange,SCEDivis,SCEComRate,SPAN,SCST,SSTN
, (select substring((select upper(name)+',' from OUBR where isnull(U_SeriesGrp,'')<>'' order by Code FOR XML PATH ('')),1,LEN((select upper(name)+',' from OUBR order by Code FOR XML PATH ('')))-1))[Branches]
FROM
SELECT
/*OBTN.DistNumber*/
INV1.DocEntry
,OINV.DocDate,OINV.U_VehicleNo VehicleNo,OINV.U_Driver Driver,OINV.NumAtCard
,CAST(OLCT.Building AS VARCHAR(255))Building,OLCT.Block,OLCT.Street,OLCT.City,OLCT.County+' - '+OLCT.ZipCode[District],OCST.Name State,OCRY.Name Country
, NNM1.SeriesName [Series], OINV.DocNum
,OLCT.TinNo [BTinNo],OLCT.CstNo [BCstNo],OLCT.CeRegNo [BCeRegNo],OLCT.PanNo [BPanNo],OLCT.CeRange [BCeRange]
,OLCT.CeComRate [BCeComRate],OLCT.CeDivision [BCeDivision],OLCT.EccNo [BEccNo]
,OBTN.U_InvType Type
,OINV.CardName,OINV.Address2[Delivery Addr]
,CE_CRD7.ECCNo,CE_CRD7.CERegNo,CE_CRD7.CERange,CE_CRD7.CEDivis,CE_CRD7.CEComRate
,CRD7.TaxId0[PAN],CRD7.TaxId1[CST],CRD7.TaxId11 [STN]
,OINV.U_Address [Deliver At]
,INV1.LineNum,INV1.ItemCode
,INV1.Dscription,OITM.SWW [HSNumber]
,INV1.Quantity,INV1.PriceBefDi Price,INV1.LineTotal,INV1.Price Rate,(INV1.PriceBefDi-INV1.Price)*INV1.Quantity Discount
,INV4.Vat
,INV4.Cess
,INV1.LineTotal+INV1.VatSum Total
,OINV.DocTotal GTotal
,OINV.TotalExpns
,OBTN.U_MfgName MfgName
,convert(nvarchar(250),MFG_CRD1.Building) MFGBuilding,MFG_CRD1.Block MFGBlock,MFG_CRD1.Street MFGStreet,MFG_CRD1.City MFGCity,MFG_CRD1.ZipCode[MFGDistrict]
,OBTN.U_MCERegNo MCERegNo,OBTN.U_MCERange MCERange,OBTN.U_MCEDivis MCEDivis,OBTN.U_MCEComRate MCEComRate
,OBTN.U_MPAN MPAN,OBTN.U_MCST MCST,OBTN.U_MSTN MSTN
,OBTN.U_SupName SupName
,convert(nvarchar(250),SUP_CRD1.Building) SUPBuilding,SUP_CRD1.Block SUPBlock,SUP_CRD1.Street SUPStreet,SUP_CRD1.City SUPCity,SUP_CRD1.ZipCode[SUPDistrict]
,OBTN.U_SCERegNo SCERegNo,OBTN.U_SCERange SCERange,OBTN.U_SCEDivis SCEDivis,OBTN.U_SCEComRate SCEComRate
,OBTN.U_SPAN SPAN,OBTN.U_SCST SCST,OBTN.U_SSTN SSTN
FROM
OINV
INNER JOIN INV1 ON OINV.DocEntry=INV1.DocEntry
INNER JOIN OITM ON INV1.ItemCode=OITM.ItemCode
INNER JOIN
select
INV4.DocEntry,INV4.LineNum
,CASE WHEN INV4.staType IN (@sVAT,@sCST) THEN sum(INV4.TaxSum) ELSE 0 END Vat
,CASE WHEN INV4.staType=@sCess THEN sum(INV4.TaxSum) ELSE 0 END Cess
from
INV4
where
INV4.DocEntry={?DocKey@} and INV4.RelateType=1
group by INV4.DocEntry,INV4.LineNum,INV4.staType
)INV4 ON INV1.DocEntry=INV4.DocEntry AND INV1.LineNum=INV4.LineNum
INNER JOIN OLCT ON INV1.LocCode=OLCT.Code
INNER JOIN OCST ON OLCT.State=OCST.Code
INNER JOIN OCRY ON OLCT.Country=OCRY.Code and OCST.Country=OCRY.Code
INNER JOIN INV12 ON OINV.DocEntry=INV12.DocEntry
INNER JOIN OITL ON INV1.BaseType=OITL.ApplyType AND INV1.BaseEntry=OITL.ApplyEntry AND INV1.BaseLine=OITL.ApplyLine
INNER JOIN ITL1 ON OITL.LogEntry=ITL1.LogEntry
INNER JOIN OBTN ON ITL1.MdAbsEntry=OBTN.AbsEntry and ITL1.SysNumber=OBTN.SysNumber and ITL1.ItemCode=OBTN.ItemCode
LEFT JOIN OCRD MFG_OCRD ON MFG_OCRD.CardCode=OBTN.U_MfgCode
LEFT JOIN CRD1 MFG_CRD1 ON MFG_OCRD.CardCode=MFG_CRD1.CardCode AND MFG_OCRD.BillToDef=MFG_CRD1.Address and MFG_CRD1.AdresType='B'
LEFT JOIN OCRD SUP_OCRD ON SUP_OCRD.CardCode=OBTN.U_SupCode
LEFT JOIN CRD1 SUP_CRD1 ON SUP_OCRD.CardCode=SUP_CRD1.CardCode AND SUP_OCRD.BillToDef=SUP_CRD1.Address and SUP_CRD1.AdresType='B'
LEFT JOIN NNM1 ON OINV.Series=NNM1.Series
LEFT JOIN CRD7 ON OINV.CardCode=CRD7.CardCode AND CRD7.Address='' AND CRD7.AddrType='S' --Tax Details
LEFT JOIN CRD7 CE_CRD7 ON OINV.CardCode=CE_CRD7.CardCode AND OINV.ShipToCode=CE_CRD7.Address AND CE_CRD7.AddrType='S' -- Central Excise Details
WHERE
INV1.DocEntry={?DocKey@}
)INVOICE
GROUP BY
DocEntry
,DocDate,VehicleNo,Driver,NumAtCard
,Building,Block,Street,City,District,State,Country
,Series,DocNum
,BTinNo,BCstNo,BCeRegNo,BPanNo,BCeRange,BCeComRate,BCeDivision,BEccNo
,Type
,CardName,[Delivery Addr]
,ECCNo,CERange,CERegNo,CEDivis,CEComRate
,PAN,CST,STN
,[Deliver At]
,LineNum
,Dscription,HSNumber,Quantity,Rate,LineTotal,Discount,Vat,Cess,Total,GTotal
,TotalExpns
,MfgName
,MFGBuilding,MFGBlock,MFGStreet,MFGDistrict,MFGCity
,MCERegNo,MCERange,MCEDivis,MCEComRate,MPAN,MCST,MSTN
,SupName
,SUPBuilding,SUPBlock,SUPStreet,SUPDistrict,SUPCity
,SCERegNo,SCERange,SCEDivis,SCEComRate,SPAN,SCST,SSTNYou're double posting ( how to change join condition in this query ) , stop doing that, since you'll only be distracting and diverting by doing so.
Take the time to read the SQL and PL/SQL FAQ @ https://forums.oracle.com/forums/ann.jspa?annID=1535, since you're not even mentioning a database version, while 9i {noformat} != {noformat} 10g {noformat} != {noformat}11g...
Have your DBA trace/tkprof the query, and so on, if you cannot do that yourself.
And then provide the feedback the volunteers, including Ace (Directors)' s need ( and you were very lucky, from that point of view, I think, from looking at both your posts ;) ) -
How to include one view into another view
Hi SDN's,
Could any please tell me,How to include one view into another view.
In my requirment.I want to create a 'Z' view for an interface .In that view i have to take,
1) Ship-to-email adrr by
LIKP-KUNNR -> KNA1-ADRNR
KNA1-ADRNR -> ADR6-ADDRESNUMBER.
2) E-mail addr of person who created the document.i.e
LIKP-ERNAM -> USR21-BNAME.
USR21-ADDRESNUMBER -> ADR6-ADDRESNUMBER
USR21-PERSNUMBER -> ADR6-PERSNUMBER.
In both the case we have to pass ADDRESSNUMBER to ADR6 table.
If we pass these condition it fails,B'Coz at a time it passes Two ADDRESSNUMBER and a PERSNUMBER.
So i created two which fetches only the email addr of person who created the document.and another view fetches Ship-to-email addr.
Now i want to include the second view into first view . Is it possible?or please
tell me someother way to get these email addresses in a single view.hi
as per my knowledge, nested views are not possible. However, while creating a new view, selection method will not giv u option to select the already created view(S) except the tables..i think so.
regards,
shamim -
How can we change the purchasing group which it is maintained in R/3?
Hello All.
In case of MM, purchasing group is assigned to material master.
It means purchasing group is maintained based on material code.
But SRM has different maintenance level.
As you know that purchasing group has the responsibility based on material group (Product category).
So we should change the purchasing group from R/3, when end user create shopping cart.
How can we change the purchasing group which it is maintained in material master?
Thank you,
Best regards,
SH.Hello So Hee,
I am not a technical guy.
But for your requirement i am building a logic.
I am not sure whether it will work.
You need to check with your ABAPER.
It is as below:
When the SC is approved and the other configuration is correct ,
PR is created in ECC by the virtue of BAPI.
You want that the pur grp should be populated on the base of matl code and not on matl grp.
Hence in SC you will not fill up pur grp.
In the programme for BBPSC01 i.e. SC creation you will add modification that it will call a custom FM.
This custom FM will get the matl code from SC and will find the value of pur grp from R/3 MM01i.e. matl master(you may get in MARA).
Now in the BAPI you need to incorporate this additional value of yr pur grp field.
So the desired pur grp as per yr R/3 matl master will be populated in yr R/3 PR.
Again: this is all hypothesis.
That's all I can help you.
BR
Dinesh
<b>Reward if helps</b> -
How to include WS-Security Header in the WSDL
hi
how to include WS-Security Header which have username and password as
i had seen the below link it deals with just hello world which is not using any Services(DBAdapter) is it possible to use DBAdapter as the steps present in the below link how to include WS-Security Header which have username and password
http://blogs.oracle.com/reynolds/2005/09/invoking_bpel_from_an_html_for.htmlAs Amir suggested, you may provide in the URL but I wouldn't suggest it though. You don't want to hard code the user ID and password within in the WSDL because it is a bad practice especially the user ID and password may be different in different systems and every time you change the password, you have to regenarate your WSDL.
May be you thought through this but just in case if you didn't
KK -
How to include other web page in servlet response?
Is there any way how to include the contents from some other web page in my own response? For example, I wish to printout some text and below that to put the complete contents of let's say Google's page, so something like:
include("www.google.com");
...So far I found that I can either redirect to that page and l fully lose the control or include the contents of the other jsp or servlet that I made in the same project. I know I can just send the request to that outside page and read the response and print it out on my page, but the problem is when there is a JavaScript and I can't get the rendered contents but just that script. Also, I will not be able to see the images in that case, so I prefer to give the command to web browser to render and show it for me.
Thanks a lot for any help!I already tried with streams but then just original source is written, so it means that if it is calling some scripts I will get JavaScript code instead of executed result. I thought I must somehow make the browser to process the page and just display the output because it knows how to deal with scripts.
-
Lightroom 3- How do I batch process a group of photos with the same preset?
Using Lightroom 3/Mac. Attempting to apply a preset to a group of photos. I read the forum already but what I read didn't make sense to me. Sorry. Also wondering if anyone else is plagued by Lightroom's tendency to take over the monitor. Whenever I want to switch to another application, I end up having to "Hide Lightroom" to get it to move. Any thoughts?
Thanks.
Russ
Altadena, CAahreff wrote:
Whenever I want to switch to another application, I end up having to "Hide Lightroom" to get it to move. Any thoughts?
If you are on Windows, you can use this autohotkey script to minimize (#n) and restore (#b) Lightroom (# means win-start key):
=================================
Get unique window identifier of Lightroom's main app window.
Initial motivation: Make sure Lightroom will be the recipient of emitted keystrokes.
So far, for titles, we have:
{Catalog} - Adobe Photoshop Lightroom - {Module}
Lightroom
Lightroom (x%)
###1 Not sure how to handle case if a dialog box is open, plugin or otherwise.
ahk_class is AgWinMainFrame
GetLightroomWindowID()
lr_win_id := 0
Process, Exist, lightroom.exe
lr_pid := ErrorLevel
if lr_pid {
WinGet, id, list, ahk_pid %lr_pid%
} else {
WinGet, id, list,,, Program Manager
Loop, %id%
this_id := id%A_Index%
WinGetClass, this_class, ahk_id %this_id%
WinGetTitle, this_title, ahk_id %this_id%
if (this_class = "AgWinMainFrame") {
; MsgBox Got Lr Frame type
} else {
; MsgBox Class: %this_class% Title: %this_title%
continue
if InStr( this_title, "Lightroom" ) {
if (lr_win_id = 0) {
lr_win_id := this_id
} else { ; redundent
lr_win_id := 0
break
return lr_win_id
#n:: ; minimize from full-screen
id := GetLightroomWindowID()
if id {
WinMinimize ahk_id %id%
} else {
MsgBox Unable to minimize Lightroom window.
return
#b:: ; maximize to full-screen
id := GetLightroomWindowID()
if id {
WinActivate ahk_id %id%
} else {
MsgBox Unable to restore Lightroom window.
return
^tab:: ; Supports Keyword Consolidator (lrplugin).
Send {Shift Up}{Tab}{Shift Down}{Tab}{Shift Up}{End}
return
===============================================
R
Maybe you are looking for
-
DataSource FI_AR_4
Hi, Based on SAP Note 551044, we always need to first initialize the delta for FI_GL_4. My question is, if I need to extract data based on FI_AR_4 ONLY, do I still need to init FI_GL_4 first? or I can initialize FI_AR_4 directly without considering G
-
I'm running Numbers 3.0.1 on Mavericks, and each time I open it, it tells me there is an update available, yet when I click through to the store, it doesn't appear. Other than paying another £13.99 (no thanks!) I can't work out what to do. I'm having
-
Where can I get Interactive training for Illustrator?
Where can I get Interactive training for Illustrator? Thanks for your help!
-
ESS WebDynpro Bank Information
Hi, When we run ESS Bank Information WebDynpro we are getting following error... An exception that could not be caught occurred., error key: RFC_ERROR_SYSTEM_FAILURE com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: An exception
-
My 2 processors run at very different temperatures- 20-30 degrees (F) difference. One runs up near 180, the other around 150. Do I have a problem?