How to group this colum ?
Hi,
I have this request :
select b.nom, d.libelle, a.TOTAL_HEURES
from observatoire.fiche a, observatoire.agent b, observatoire.activite_faite c, observatoire.activites d
where equipe_id = 161
and a.agent_id = b.agent_id
and a.fiche_id = c.fiche_id
and c.activites_id = d.activites_id
group by b.nom, d.libelle, a.total_heures
order by b.nom
It gives me this result :
"NOM" "LIBELLE" "TOTAL_HEURES"
LEQUET Aménagement de berges et milieux naturels 8,5
LEQUET Nettoyage rivière et vallée 8
LEQUET Mobilier 8,5
LEQUET Nettoyage rivière et vallée 9
LEQUET Tonte 8
LEQUET Tonte 5,5
LEQUET Entretien matériel, véhicule ou magasin, livraison, devis 9
LEQUET Tonte 8,5
LEQUET Tonte 9
LEQUET Entretien de berges et milieux naturels 9
PARIS Tonte 7
TILLET Nettoyage rivière et vallée 9
TILLET Tonte 9
I would like that the column with the same "LIBELLE" and with the same "NOM" be grouped, for example :
LEQUET Tonte 8,5
LEQUET Tonte 9
Would give this :
LEQUET Tonte 17,5
I have tried but could not succeed.
Do you have a suggestion ?
Thank you for your kindness ! <<Christian
Do you mean a simply SUM over total_heures? Try change your SELECT to:
select b.nom, d.libelle, SUM(a.TOTAL_HEURES) ...
group by b.nom, d.libelle
order by b.nom
Similar Messages
-
How to group the colume in Enterprise link design studio
I want count a table record by group some columes,After checking all the transforms,I can't found the appropriate one,Please give me some advices,thanks.
hi
You have to create a plan to connect to the external message source, get the message and parse , and finally put it in the ADC data object (user created object). After this step, all your incoming messages will be in ADC data object. Only after getting the message into ADC object, you can use this object - you can create reports using this object.
I have a few questions
a) Can you identify your company. b) Have you taken the BAM training course c) These steps are given in training documents in lab 2-6 step by step.
Do let me know if you need any help, contact directly at [email protected] -
hi all,
how do i group this statement correctly... i'm getting an error when running the following.
SELECT empno, dept, DECODE(position, 'HR', DECODE(job_id, (SELECT job_id FROM jobs WHERE job_name = 'Intern' ),'Interns', position), position) dept
FROM employees
GROUP BY empno, dept, DECODE(position, 'HR', DECODE(job_id, (SELECT job_id FROM jobs WHERE job_name = 'Intern' ),'Interns', position), position)error is ORA-22818: subquery expressions not allowed here.
thanks.
allenOr maybe something like this (untested):
SELECT empno, dept1, dept2
FROM ( SELECT empno
, dept AS dept1
, DECODE
( position
, 'HR', DECODE(job_id, (SELECT job_id FROM jobs WHERE job_name = 'Intern' ),'Interns', position)
, position ) dept AS dept2
FROM employees )
GROUP BY empno, dept1, dept2although I still prefer Karthick's solution.
@Tajuddin,
error is ORA-22818: subquery expressions not allowed here.
I am suspecting your subquery may be returning more than one record. Why do you suspect that? It is not what the error message says at all. The restriction is easy to reproduce:
SQL> SELECT ( SELECT dummy FROM dual ) d
2 FROM dual;
D
X
1 row selected.
SQL> SELECT ( SELECT dummy FROM dual ) d
2 FROM dual
3 GROUP BY ( SELECT dummy FROM dual );
GROUP BY ( SELECT dummy FROM dual )
ERROR at line 3:
ORA-22818: subquery expressions not allowed here -
How to find colums in CLOB variable and get this colums value to update col
Question
How to find colums in CLOB variable and get this colums value to update colum of oracle database table
How my work will go
Step-1 - I am creating XML FIle which is based on code that we discused before-
Its developing xml file with data in <...inputelement> as u can see in my xml but in <..output> Element of xml its just have all column for exampe <itemoutput>
<FLD NM = "ABC"> 0 </FLD>
<FLD NM = "XYZ:> </FLD> --- for varchar2
</itemoutput>
In 1st stage i am just generating <..INPUT> with its colums and real value from database and <..output> elements will go zero value but with colums name.
Note. I create temp table will all COLUMN which u can see in both in <..ITEMINPUT> and <..ITEMOUTPUT>
Step2.. After Generaing my xml i want to convert my xml data into CLOB not in a file. so clob will go to the VENDOR
STEP3.
I will Recieved again xml data in CLOB from the vendo in <.OUTPUT> ELEMents
for example
I send this format
<itemoutput>
<FLD NM = "ABC"> 0 </FLD>
<FLD NM = "XYZ:> </FLD> --- for varchar2
</itemoutput>
And i will receive it
<itemoutput>
<FLD NM = "ABC VALUE"> 2 </FLD>
<FLD NM = "XYZ TYPE:> SUV</FLD> --- for varchar2
</itemoutput>
So will take this output valu from xml clob and will update my staging table .
Which have the same colum name as its look in xml clob.
Step- 4. I will take this value from staging table and update my original oracle database table. which i send you before.
But u leave this step becaue you dont know the staging table colum maping with original table.
I think now you understand
Please feed back
monrizhere is my xml..
I want to extract <..output> elements which enclosed with " " and its values from this xml file. please any body have any idea. please tell me
Thanks
<?xml version="1.0" ?>
- <RATABASECALC COPYRIGHT="COPYRIGHT 2001>
- <RATEREQUEST USEREFID="YES">
- <ANCHOR>
<DATABASENAME />
<DATABASEPW />
<DATABASESOURCE />
<DATABASEPRVDR />
<USERNAME />
<SEVERITYDES />
<CALLDES />
<INITACCDES />
<INITACCV />
<ITEMSEQDES />
<ITEMMATCHDES />
<CENTURYDES />
<DATEDES />
<FORMULADES />
<STRINGDES />
<VALIDATIONDES />
<STEPSDES />
<RETINFONUM />
<ADDLRETINFONUM />
<ANCHORNOMATCH />
<NOMATCHMSG />
<TRANUUID />
<LOGOPTION />
<MSGOPTION />
<USERLOGFN />
<NOITEMERROR />
<LOGFORMAT />
<LOGFN />
<STEPSFN />
<NUMNOMATCH>0</NUMNOMATCH>
<NUMERRORS>0</NUMERRORS>
</ANCHOR>
- <POLICIES>
- <POLICY>
<BUSINESSDES>N</BUSINESSDES>
<LEGALENTITYOWNER>CGI TRAINING AND DEMONSTRATION</LEGALENTITYOWNER>
<LEGALENTITYNAME>CGI TRAINING AND DEMONSTRATION</LEGALENTITYNAME>
<COMPEFFDATE>02/01/2000</COMPEFFDATE>
<RETRIEVALDATE>02/01/2000</RETRIEVALDATE>
<POLINPUTS />
- <POLOUTPUTS>
<FLD NM="POLICY CALCS DONE IND">Y</FLD>
<FLD NM="TOTAL DISCOUNTED POLICY PREM">2167.52</FLD>
<FLD NM="TOTAL POLICY PREMIUM">3180.0</FLD>
</POLOUTPUTS>
- <LOBS>
- <LOB>
<LEGALENTITYPRODGROUP>PERSONAL AUTOMOBILE</LEGALENTITYPRODGROUP>
- <LOBINPUTS>
<FLD NM="MULTI-CAR FACTOR">0</FLD>
<FLD NM="MULTI-CAR IND">Y</FLD>
</LOBINPUTS>
<LOBOUTPUTS />
- <REGIONS>
- <REGION>
<LEGALENTITYREGION>MAINE</LEGALENTITYREGION>
- <REGIONINPUTS>
<FLD NM="STATE PREMIUM AMOUNT">0</FLD>
</REGIONINPUTS>
- <REGIONOUTPUTS>
<FLD NM="TOTAL STATE PREMIUM">2356.0</FLD>
<FLD NM="TOTAL DISCOUNTED STATE PREM">2167.52</FLD>
<FLD NM="TOTAL STATE DISCOUNT AMOUNT">188.48</FLD>
</REGIONOUTPUTS>
- <REGIONERRORS>
<NUMLOGENTRIES>3</NUMLOGENTRIES>
<NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
</REGIONERRORS>
- <COVERAGES>
- <COVERAGE RBID="COVP1L1R1C1">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F1" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">145.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
- <COVERAGE RBID="COVP1L1R1C2">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F2" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">209.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
- <COVERAGE RBID="COVP1L1R1C3">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F3" />
<COVINPUTS />
<COVOUTPUTS />
<COVCONTROL />
</COVERAGE>
</COVERAGES>
- <ITEMS>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">100</FLD>
<FLD NM="COMP DEDUCTIBLE">FULL</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">15</FLD>
<FLD NM="TOWING INDICATOR">Y</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1997</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
<FLD NM="GOOD STUDENT IND">N</FLD>
<FLD NM="CLASS CODE">11</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">B</FLD>
<FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">A</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">0.84</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">1166.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">438</FLD>
<FLD NM="TOTAL COMP PREMIUM">218</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">475</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
<FLD NM="TOTAL TOWING PREMIUM">4</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C1" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">50</FLD>
<FLD NM="COMP DEDUCTIBLE">FULL</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">N</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">12</FLD>
<FLD NM="TOWING INDICATOR">N</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1997</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">N</FLD>
<FLD NM="GOOD STUDENT IND">N</FLD>
<FLD NM="CLASS CODE">12</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
<FLD NM="ANTI LOCK BRAKE IND">Y</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">0.88</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">1190.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">468</FLD>
<FLD NM="TOTAL COMP PREMIUM">194</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">497</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">4</FLD>
<FLD NM="TOTAL TOWING PREMIUM">0</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C2" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
- <ITEM>
<ITEMINPUTS />
<ITEMOUTPUTS />
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R1C3" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
</ITEMS>
- <FORMULAS>
- <FORMULA RBID="FMLAP1L1R1F1">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
- <FORMULA RBID="FMLAP1L1R1F2">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
- <FORMULA RBID="FMLAP1L1R1F3">
<FORMULANAME>PREMIUM DISCOUNT</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
</FORMULAS>
<REGIONCONTROL />
</REGION>
- <REGION>
<LEGALENTITYREGION>NEW HAMPSHIRE</LEGALENTITYREGION>
- <REGIONINPUTS>
<FLD NM="STATE PREMIUM AMOUNT">0</FLD>
</REGIONINPUTS>
- <REGIONOUTPUTS>
<FLD NM="TOTAL STATE PREMIUM">824.0</FLD>
<FLD NM="TOTAL DISCOUNTED STATE PREM">0</FLD>
<FLD NM="TOTAL STATE DISCOUNT AMOUNT">0</FLD>
</REGIONOUTPUTS>
- <REGIONERRORS>
<NUMLOGENTRIES>2</NUMLOGENTRIES>
<NUMRETURNLOGENTRIES>0</NUMRETURNLOGENTRIES>
</REGIONERRORS>
- <COVERAGES>
- <COVERAGE RBID="COVP1L1R2C1">
<COVFORMULAINDEX FORMREF="FMLAP1L1R1F4" />
<COVINPUTS />
- <COVOUTPUTS>
<FLD NM="DEDUCTIBLE BUYBACK">0.0</FLD>
</COVOUTPUTS>
<COVCONTROL />
</COVERAGE>
</COVERAGES>
- <ITEMS>
- <ITEM>
- <ITEMINPUTS>
<FLD NM="COLLISION DEDUCTIBLE">500</FLD>
<FLD NM="COMP DEDUCTIBLE">250</FLD>
<FLD NM="INEXPERIENCED OPERATOR IND">Y</FLD>
<FLD NM="LIABILITY LIMIT">100</FLD>
<FLD NM="SYMBOL">11</FLD>
<FLD NM="INEXPERIENCED OPER FACTOR">0</FLD>
<FLD NM="VEHICLE SYMBOL">0</FLD>
<FLD NM="MODEL YEAR">1996</FLD>
<FLD NM="COST NEW">0</FLD>
<FLD NM="DRIVER TRAINING INDICATOR">Y</FLD>
<FLD NM="GOOD STUDENT IND">Y</FLD>
<FLD NM="CLASS CODE">36</FLD>
<FLD NM="COLL RATE">0</FLD>
<FLD NM="TERRITORY">001</FLD>
<FLD NM="COMP RATE">0</FLD>
<FLD NM="PROTECTIVE DEVICE CODE">0</FLD>
<FLD NM="ANTI LOCK BRAKE IND">0</FLD>
<FLD NM="MED RATE">0</FLD>
<FLD NM="MEDICAL PAYMENTS LIMIT">1000</FLD>
<FLD NM="PASSIVE RESTRAINT CODE">0</FLD>
<FLD NM="UNINSURED MOTORISTS LIMIT">100</FLD>
</ITEMINPUTS>
- <ITEMOUTPUTS>
<FLD NM="CLASS FACTOR">1.11</FLD>
<FLD NM="TOTAL VEHICLE PREMIUM">824.0</FLD>
<FLD NM="TOTAL COLLISION PREMIUM">332</FLD>
<FLD NM="TOTAL COMP PREMIUM">123</FLD>
<FLD NM="TOTAL LIABILITY PREMIUM">334</FLD>
<FLD NM="TOTAL MEDICAL PREMIUM">8</FLD>
<FLD NM="TOTAL UM PREMIUM">27</FLD>
</ITEMOUTPUTS>
- <ITEMNOMATCHES>
<ITEMNUMNOMATCH>2</ITEMNUMNOMATCH>
<ITEMRETURNNOMATCH>0</ITEMRETURNNOMATCH>
</ITEMNOMATCHES>
- <ITEMCOVINDEXES>
<ITEMCOVINDEX COVREF="COVP1L1R2C1" />
</ITEMCOVINDEXES>
<ITEMCONTROL />
</ITEM>
</ITEMS>
- <FORMULAS>
- <FORMULA RBID="FMLAP1L1R1F4">
<FORMULANAME>RATING MASTER</FORMULANAME>
<FORMULARETRIEVALDATE>02/01/2000</FORMULARETRIEVALDATE>
<FORMULACOMPEFFDATE>02/01/2000</FORMULACOMPEFFDATE>
<FORMULANEWRENDES>N</FORMULANEWRENDES>
<FORMULAUSERATEDATE>Y</FORMULAUSERATEDATE>
<FORMULARATERETRIEVALDATE>02/01/2000</FORMULARATERETRIEVALDATE>
<FORMULARATECOMPEFFDATE>02/01/2000</FORMULARATECOMPEFFDATE>
</FORMULA>
</FORMULAS>
<REGIONCONTROL />
</REGION>
</REGIONS>
</LOB>
</LOBS>
- <RETINFOS>
<TOTALRI>0</TOTALRI>
</RETINFOS>
</POLICY>
</POLICIES>
</RATEREQUEST>
</RATABASECALC>
Above xml data - some <...OUTPUT> elements has some FLD elements. and i want to take those outputelemt's FLD Elements data and update my oracle tables.
Note: FLD = "Attribie" are the colums name of the tables
back to top -
KANK groups deletion how to do this
Hi Gurus,
for my company code, i have copied controlling area from 1000 controlling area and 1000 company code.
I want to delet the group seen in T code KANK.
Can you let me know how to do this?
Regards,
RishikeshHi
The assignments to the groups are gone (disolved) but the group itself still remains.
I need to delete the group itself.
can you suggest how to do it (with path eg go to "edit - choose x etc)
regards, -
How to approach this requirment
Business overview:
For every organisation account management will be the core functionality. The account management should include the following:
customer - company - vendor.
1. customer info
2. vendor info
3.organisation info
4.material info
5.purchase order info
6.sales order info
7.subsequent documents such as delivery doc,invoice doc n accounting doc info.
Reports:
1.purchase order line item wise report.
2.open purchase order.
3.sales order line item wise report.
4.open sales order report.
5.open invoice item wise.
Im new to ABAP, pl someone guide me how to approach this requirment. Which r the tables n fields i need to work with?
Thank you.Hi Ashwini,
I am giving you some of the important details of tables as per your requirement.But there could be more tables than i am providing.
Just a list of tables that come in handy.
Sales orders
Name Description Uses
LIKP Shipped Lines header
LIPS Shipped Lines detail
VBAK Order header Every order (unless archiving)
VBAP Table fields Every line item (unless archiving)
VBBE Open sales order line items Great file, but be careful.Contents don't reflect orders
that do not affect purchasing (go figure).
VBEP Schedule line item
VBFA Document flow Let's you move from order to shipping document to invoice.
VBUK Order status
VBUP Line item detail status
VBFK Invoicing header
VBFP Invoicing detail
Material Management
Name Description Uses
MARA Inventory Master
MARC Plant Data
MARD Current Inventory
MAKT Descriptions
MBEW Material Valuation
T179 Product Hierarchy
MVKE Sales data (materials)
MKPF Material document Status code 'R' in VBFA
Purchasing
Name Description Uses
EINA Purchasing inforecord by MATNR/LIFNR contains things like vendor material
number and access key for EINE
EINE Purchasing inforecord detail Contains minimum purchase, group, currency
EKPO Purchase orders
EKET Scheduled lines
EKES Vendor confirmed lines
IKPF Header- Physical Inventory Document
ISEG Physical Inventory Document Items
LFA1 Vendor Master (General section)
LFB1 Vendor Master (Company Code)
NRIV Number range intervals
RESB Reservation/dependent requirements
T161T Texts for Purchasing Document Types
Forecasting
Name Description Uses
MAPR
PROP
PROW
Classification
Name Description Uses
KSSK Material number to class
KLAS Class description
KSML Characteristic name
CABN/CABNT Characteristic name description
CAWN/CAWNT Characteristic name
AUSP Numeric values
CAUFV Service order header
AFPO Service order line Holds items that will create "reservations"
RESB SM Reservations Materials needed for line
Customer Data
KNA1 Customer Master
KNVV Sales information
KNVP Partners (ship-to, etc)
Since you are new to abap, its better you to know the system tables and other tables for configuring:
System tables
Name Description Uses
DD02T Table texts
DD03L Table fields Lists the fields in a table
DD04T Data element texts
USR02 Valid user names
Config tables (normally begin with "T")
Name Description Uses
T001 Client table
T002 Languages
T005 Region (Country)
TCURR Currency and exchange rates
TVAK Order type
TVSB Shipping condition
TVAGT Rejected reason for order line
Other tables
Name Description Uses
STXH Text header
STXL Text detail
Reward points if useful.
Thnakyou,
Regards. -
In this report i have marked one line..if this width < 30,i need to multiply by a number 0.3 and if the width >=30,it multiplies by 0.37...how to use this logic here..??? anyone can help??
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @SCCode nvarchar(30)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
--Rcpt from PRDN (Condition checked for Return component exclusion also)
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'FG Item Code',
T3.ItemName as 'FG Item Name',
T2.PlannedQty as 'FG Planned Qty',
T2.U_OD as 'OD',
T2.U_ID as 'ID',
T2.U_OD/25.4 as 'Inches',
(T2.U_OD-T2.U_ID)/2 as 'Width',
0 as 'FG Pending Qty',
0 as 'FG Receipt Qty',
'' as 'Issue Item Code',
'' as 'Issue Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
0 as 'Issue Item - Return Quantity',
'' as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2
UNION ALL
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'Item Code',
T3.ItemName as 'Item Name',
T2.PlannedQty as 'Planned Qty',
T2.U_OD as 'OD',
T2.U_ID as 'ID',
T2.U_OD/25.4 as 'Inches',
(T2.U_OD-T2.U_ID)/2 as 'Width',
(Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',
(Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
a.ItemCode as 'Issued Item Code',
a.Dscription as 'Issued Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
(Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
(ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription order by T2.DocNum descHi,
Try this:
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @SCCode nvarchar(30)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
--Rcpt from PRDN (Condition checked for Return component exclusion also)
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'FG Item Code',T3.ItemName as 'FG Item Name',T2.PlannedQty as 'FG Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) <30 then ((T2.U_OD-T2.U_ID)/2) *0.3 end, 0 as 'FG Pending Qty',0 as 'FG Receipt Qty','' as 'Issue Item Code','' as 'Issue Item Name',Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',0 as 'Issue Item - Return Quantity','' as 'Return Doc No',SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntryINNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCodeLEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntryWHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2UNION ALL SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'Item Code',T3.ItemName as 'Item Name',T2.PlannedQty as 'Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) >=30 then ((T2.U_OD-T2.U_ID)/2) *0.37 end, (Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',(Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
a.ItemCode as 'Issued Item Code',
a.Dscription as 'Issued Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
(Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry
where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
(ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,
T2.PlannedQty,T2.U_OD,
T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription
order by T2.DocNum desc
Thanks & Regards,
Nagarajan -
I've a report that has columns like
Item, item_desc, total_sales(qty*unit_cost), tran_date etc
101 apples 20 1-jan-2010
101 apples 50 1-jan-2010
102 oranges 30 2-jan-2010
some thing like this
I want total_sales of a particular item on a particular day like total_sales(20+30)=50 on 1-jan-2010
How to do it
when I use group by item I can see the total sales separately....
and how can I display total sales for a month...
How to do this
Please helpHi,
You need to create a total variable set to 0
<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', 0)?>
Inside the 'detail lines' loop (inner loop), accumulate the total. If you want you can put an if condition to calculate total for a particular day
<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar',xdoxslt:get_variable($_XDOCTX, 'RTotalVar') + Amount_ID10)?>
To display the total, use the following code:
<?xdoxslt:get_variable($_XDOCTX, 'RTotalVar')?> -
I want to delite all adresses in my iCloud. how to do this?
i want to deliteall addresses in my icloud. how to do this???
Go to iCloud.com on your computer, log into your iCloud account and open Contacts, click on the red ribbon at the top to display your groups, click on All Contacts, to the right click on any single contact to select it,click on the Actions (gear shaped) icon at the bottom and choose Select All, then press the Delete key on your keyboard.
Be careful when you do this. It will delete all contacts from your iCloud account, but it will also delete them from any devices that are syncing contacts with your iCloud account too. If you don't want to do that, go to Settings>iCloud, turn Contacts to Off and choose Keep on My iDevice when prompted before deleting them from icloud.com. -
How to achive this in a single iview
How can i create this iview/How to achive this.
In Portal I created a Role and 2 different worksets under the role to publish BW Reports (Grouped according to the worksets)
My requirment is when user Logins into his portal account and clicks the BW Reports Tab (Role) First screen he has to see
Currently it is my Workset1 of which are assigned to role
My requirment is to show them
The screen should be divided into 2 halfs(Columns) and the Left hands side column should display our INTRANET HOME PAGE and Other hald should display a BW Report developed on Daily data Loads in Graphical Version (Web Templete is already developed)
Please update me how to achive this
ThanksHi Thruna,
Thanks for the update....
few Queries
Create a page with 2 column layout.
Is it possible for me to create a page with 2 Columns and the Right hand column is divided in to parts
Open the page in edit mode and select Intranet Home Page iview, right click then select "Add iview to the page" with Delta.
If i Right click the iview and select assign to page...how can i make a setting to display that iview(Intranet Home page) on Left Hand side
Thanks in advance -
When uploading a cd onto itunes on my imac it has choosen to copy the original cd into 4 seperate cds and mix up the track order, particularly annoying as this is a mixed cd (Guy Gerber, fabric 64) . Any ideas why when everthing else copies perfectly and how to rectify this problem?
See Grouping tracks into albums.
tt2 -
My macbook keeps asking me to use an administrator and their password to continue but nobody seems to know who is the administrator for this computer...does anyone know how to avoid this this or figure out who the administrator is?
Lynne130,
to figure out which users have administrative privileges, open the Users & Groups pane of System Preferences; each user other than the Guest User will be shown with a description of either “Admin” or “Standard”. It’s typical for the first user created on a Mac to be an administrative user. -
How to populate this fields in ce_bank_accounts?
Hey there, first, i want to apologize for my bad english.
i'm working with Cash management and i'm using this API ce_bank_pub because the bank are internals. i have the load from banks and branch, and kinda the bank accounts, but i can´t find how to populate this fields, that are mandatory for my requeriment:
AUTORECON_AP_MATCHING_ORDER
AUTORECON_AR_MATCHING_ORDER
RECON_ENABLE_OI_FLAG
RECON_OI_FLOAT_STATUS
RECON_OI_CLEARED_STATUS
RECON_OI_MATCHING_CODE
AUTORECON_AP_MATCHING_ORDER2
this is my "flow of work", first, i load the data with SQL*Loader in a custom/personal table, after this, i have a cursor that select all the records of this table and do some validations, after this (and if all the records are ok) i use the API ce_bank_pub.
i don't know if that API support those fields, I've read the documentation but can not find what I require.
any help will be appreciate.
thanks a lot.
[SPANISH]
Estoy trabajando con una carga de bancos, sucursales, cuentas bancarias y usos de cuentas, hasta ahorita todo bien, solo tengo problemas al poblar los campos que se muestran en la parte de arriba en la tabla ce_bank_accounts, estoy utilizando el API ce_bank_pub ya que los bancos son internos.
mi procedimiento, o la manera que lo hago es ésta:
cargo los datos con SQL*Loader a una tabla intermedia/temporal por decirlo así, posteriormente un cursor selecciona los datos para realizar las validaciones y las reglas de negocio y si los datos son correctos utilizo el API, eso es en general para las 4 cosas, pero los campos de arriba no se como cargarlo, modificarlos o si hay alguna otra manera para agregarselos.
cualquier ayuda es apreciada.
Muchas gracias.Hi Miguel,
hope this helps ...
AUTORECON_AP_MATCHING_ORDER - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
AUTORECON_AR_MATCHING_ORDER - Order of matching statement lines to AR transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
AUTORECON_AP_MATCHING_ORDER2 - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX_OR_GROUP
For all the above three fields, navigate to Lookups from Cash Management responsibility and find the lookup type BATCH_OR_TRX, this will have 3 values, B for Batch, G for Group and T for Transaction ..... pass any one of the three value as per your requirement ..
RECON_OI_MATCHING_CODE - Open interface transactions matching code, T for matching by transaction number, D for matching by date and amount. Lookup type: OI_MATCHING_CRITERIA
For the above field, navigate to Lookups from Cash Management responsibility and find the lookup type OI_MATCHING_CRITERIA, this will have 2 values D for Date and Amount, T for Transaction Number .... Pass any one of the two values as per your requirement ...
RECON_ENABLE_OI_FLAG - Flag to indicate whether to allow reconciliation of statement lines to open interface transactions, Y or N
As per your requirement indicate Y or N ....
RECON_OI_FLOAT_STATUS - Code to specify the float status for open interface transactions
RECON_OI_CLEARED_STATUS - Code to specify cleared status for open interface transactions
I am not sure about the above two ...i.e. the values that needs to be passed ...
Regards,
Ivruksha -
Reporting Services offers limited support for using AlwaysOn Availability Groups with report server databases. The report server databases can be configured in AG to be part of a replica; however Reporting Services will not automatically use a different
replica for the report server databases when a failover occurs. How to overcome this issue? is there any workaround for that..
RahulHi.
With the AlwaysOn listener you should have a single DNS name to connect to regardless of which cluster node is active. Are you using the listener service? If not, please refer to the link below.
http://msdn.microsoft.com/en-us/library/hh213417.aspx#AGlisteners -
Why do all the programs open when the mini is turned on, and how to avoid this?
why do all the programs open when the mini is turned on, and how to avoid this?
Open System Preferences > Users & Groups then select the Login Items tab.
Remove all apps listed there.
And check /Library/StartupItems
Open a Finder window. From the Finder menu bar click Go > Go to Folder
Type or copy paste the following:
/Library/StartupItems
Click Go then move all items from the StartupItems folder to the Trash.
Maybe you are looking for
-
Copy iTunes from win 7 pro to new Mac Pro?
Have all my work on my iPhone 5s. Do nothing but manually syncing on lates iTunes. What to copy iTunes to new Mac Pro so I can use my iPhone on either computer. Laptop at work and desktop at home. All store bought music on C drive in iTunes as it sho
-
Financial Template Reports (Balance Sheet) - Auto appearance of running profit figure
Dear Experts, I am working on SAP 9 Business One. I have prepared a Customized Balance Sheet through the Financial Report Templates for presentation purposes. But when I run the balance sheet using the Financial Template Report, the balance sheet doe
-
Hi I'm running iPhoto 6 on a 10.4.11 white macbook. I've run out of memory (or is it RAM) space on the harddrive so I had to move my photos onto an external harddrive. Now when I try to play movies I made in iPhoto they stay static. I've also tried
-
How to create material using BAPI_material_savedata.
hi, i try to create the material by using a bapi BAPI_MATERIAL_SAVEDATA , every thing i s going good material is created but only the MFRPN (manufacrurer part number ) is not updated. thanks in advance.
-
I don't get detailed metadata in bridge CS3
As shown in Help viewer>workspace>recovery and undo,>work with the history palette,>set Edit History Log Options, if I go to Photoshop Preferences>general>History Log>Edit Log items>detailed, I should be getting my history palette edits in Bridge. I