Query on OT Calculation
Our customer wishes the overtime hours to be computed in the following manner:
1. Accumulate all the approved extra hours worked by the employee during the calendar month.
2. Accumulate all the LOP hours for the employee for the calendar month.
3. Compute A = (Extra hours - LOP hours) for the employee at the end of the calendar month.
4. If A is positive, take A as OT hours for the month; If A is negative, take A as LOP hours for the month; If A is zero, do nothing
Each time the employee goes on LOP or works extra hours, it is rounded off to the nearest 30 mins (e.g. LOP or extra hours of 75 mins or above but less than 90 mins will be treated as 90 mins ).
5. Once the OT hrs are determined in the above manner, apply the OT rate to rate and compute the OT amount.
My query is as below:
How do we handle this requirement in SAP? Should it be done thru Time Evaluation in TM Schema or through Payroll Run in Payroll schema? I request our experts to help me
-Shambvi
Hi
See a the standared Schema TM00 will not going to handle this. So you need to make it Z and then you need to do the some PCR config to achiev this,
1. You have to maintain the employee Attendance in IT2011 on daily basis.
2. Schema TM00 will take care of the abcentees as the record is not maintained in IT2011 for the day.
3. To get those LOP Hrs you need to create one PCR for that.
4. For getting the extra hrs for OT you need to config the time WT.
5. To capture the OT hrs you need to config your OT WT in table V_T510S where M stands for OT.
Best of Luck.
Or else
You can configure the Comp. off quota and through that u can resolve your issue..
Regards
Swapnil
Edited by: Swapnil1983 on Oct 5, 2011 11:43 AM
Similar Messages
-
Problem with the query of Sharepoint Calculated Fields
Hello,
I am developing an application in sharepoint 2013 foundation. but i have problems with a list, when executing a caml query on a calculated field. I try the solution of this blog
http://sptalks.wordpress.com/2013/03/25/query-on-calculated-field-problem
but i got no result
attentive to any comments
thanksHello,
This is my CAML Query
<View>
<ViewFields>
<FieldRef Name="ID" />
<FieldRef Name="PermMask" />
<FieldRef Name="FSObjType" />
<FieldRef Name="Nombre" AutoHyperLink="TRUE" />
<FieldRef Name="Apellidos" AutoHyperLink="TRUE" />
<FieldRef Name="Cargo" /><FieldRef Name="Edad" />
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Created" />
</ViewFields>
<Query>
<GroupBy Collapse="TRUE" GroupLimit="30">
<FieldRef Name="Compa_x00f1_ia" />
<FieldRef Name="Edad" />
</GroupBy>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
<Where>
<Contains>
<FieldRef Name="Ano" LookupId="FALSE" />
<Value Type="Text">2014</Value>
</Contains>
</Where>
</Query>
</View> -
Inner Query relating to calculated field in main query
I have a query that has calculating fields in it.
What I am trying to do is Create another inner SELECT query similar to the one above but using the FP_Qty_Required calculated field in the main query?
Is this even possible?
Thanks in advance
AaronSorry. I did that because it looked a mess when I pasted it in.
SELECT P.ItemNumber, P.DeliveryWeek, D.StartDate AS WC_Date, S.SumOfSchedule_Qty, P.Planned_Production_Qty, P.Actual_Production_Qty, D.StartDate,
CASE WHEN S.SumofPartPallet < 0 THEN 'PART PALLET' ELSE '' END AS PartPallet, S.FirstOfIntouchRef, S.Pallet_Qty,
S.FirstOfTool_Number,
CAST(CASE WHEN S.SumOfSchedule_Qty > 0 THEN (S.SumOfSchedule_Qty - 1.0) / S.Pallet_Qty ELSE 0.00 END AS DECIMAL(18,
2)) AS DecNoOfPallets,
CEILING(CAST(CASE WHEN S.SumOfSchedule_Qty > 0 THEN (S.SumOfSchedule_Qty - 1.0) / S.Pallet_Qty ELSE 0.00 END
AS DECIMAL(18, 2))) AS QtyOfFullPallets,
CASE WHEN s.sumofpartpallet < 0 THEN s.sumofschedule_qty ELSE CEILING(CAST(CASE WHEN S.SumOfSchedule_Qty >
0 THEN (S.SumOfSchedule_Qty - 1.0)
/ S.Pallet_Qty ELSE 0.00 END AS DECIMAL(18, 2))) * s.pallet_qty END AS FP_Qty_Required,
(SELECT SUM(SumOfSchedule_Qty) AS Expr1
FROM dbo.SumOfSchedDelivery
AS s2
WHERE (ItemNumber = S.ItemNumber)
AND (DeliveryWeek <= S.DeliveryWeek)) AS Running_Sum,
FROM dbo.Production AS P INNER JOIN
dbo.SumOfSchedDelivery AS S ON P.ItemNumber = S.ItemNumber AND P.DeliveryWeek = S.DeliveryWeek INNER JOIN
barcoding.dbo.DeliveryWeeks AS D ON P.DeliveryWeek = D.DeliveryWeek INNER JOIN
dbo.TotalRequiredByItem AS T ON S.ItemNumber = T.ItemNumber
The above works. What I want to do next is after the Running_Sum to add another sub query similar to this:
(SELECT SUM(FP_Qty_Required) AS Expr2
FROM ???
WHERE (PD.ItemNumber = ItemNumber)
AND (PD.DeliveryWeek >= DeliveryWeek)) AS Running_FullPallet
FP_Qty_Required is a calculated field in the main query. -
Query for MAP Calculation - Price Control ind V and S
SAP Guru's
Query regarding MAP Calculation Logic
Scenario:
*I have one material xyz
1. It is split valuated material,
2. Two valuation types with diff price control indicators
3. Batch Management is also activated on this material.*
Follwoing is the Material Master Accounting1 View :
Vauation Type Price Control Total Value Qty MAP Batch
ZA1 V 610835.00 37 16509.05(V) 01
ZB1 S 0 1 20000.00(S) 02
but when we are running MM03 w/o Valuation Type Accounting 1 View
is showing MAP as 16074.60 i.e. 610835.00/38
Diff. Reports Output------>
MB5L - List of Stock Values: Balances --> Output
ValArea Total Stock Total Value
A101 1 0
A101 37 610835.00
Net--> 38 610835.00
MB52 - Display Warehouse Stocks
Check Box - Display Batch Stocks
Condition1: When Display Batch Stocks is selected on main screen of MB52
Mat. Palnt Sloc Unrestricted Stck in Transit Total Value
xyz A101 0010 0 30 482238.00
XYZ A101 0010 7 0 115563.00
xyz A101 0010 1 0 0
This is not correct result as Total Values is 597801.00 only
Condition2: When Display Batch Stocks is not selected on main screen of MB52
Mat. Palnt Sloc Unrestricted Stck in Transit Total Value
xyz A101 0010 0 30 482238.00
XYZ A101 0010 8 0 128597.00
This is correct result as Total Values is 610835 .00 only
So my query on above issue is :
1. How System is including 1 Qty of Std Price Control for MAP calculation?
As per my understanding MAP is only for Price Control V indicator Materials Stock
2. Whats the difference between these two report output from MM03 Accounting
view?
Thankshi Animesh,
For Split Valuated Material at header level Price control is always "V" i.e. Moving average price reagrdless of the Price control you have given for different valuation types.
Due to this you are getting these kind of results. Please visit the following link for more information
http:///saphelp/EN/8f/d1de34e4cb2300e10000009b38f83b/frameset.htm
Check it and revert back.
Regards,
Jay
Edited by: SAP_MM on Dec 4, 2008 10:19 AM -
Query problem in calculating some problems
Hi gurus,
Can any one send me or tell me How do we calculat MAPE(Mean absolute percentage error) for DP query cube?
2,Calculating Ratio for APODp query cube
3.Estimate?
I will be very thank full if anyone please let me know.
Thanks a Lot
Regards,
Rajthanks
-
Query for Auto Calculation based on input of 2 Fields
Hi,
I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.
For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.
I have a UDF (Bunching) where the value is 10, 15 or 20.
Based on the Bunching the result should be given in another UDF (Noofsleeves).
(Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)
The Order will be having multiple items where the Bunching can differ for each item.
Is it also possible to remove the calculated noofSleeves from Inventory.
I am using 2007A SP01 PL05Hi ,
You may try this: Apply this fms on other udf and auto refresh on the udf mentioned in the query (in your case Bunching).
SELECT $[RDR1.Quantity.number] / $[RDR1.U_UDF.number]
You may check these too.
cALCULATION OF udf ON UNIT PRICE
FMS
Thanks,
joseph
Edited by: Joseph Antony on Jul 8, 2010 12:31 PM -
ABAP Query - ALV Grid Calculation
Can anybody tell me whether in ABAP Query when you execute the Query in SQ01 its shows the report in ALV Grid format. In ALV Grid format there are some standard calculation are available like
TOtal
Mean value
Minmum
Maximum
Count
The above calculation can be done for each column.
My Query is it possible to put our own simple calculation
through some coding for overall summation fields instead of this std. calculation.
Example : Unrestricted moved Qty Summation divided by INspection lot qty summation * 100
The output of this calculation is called First pass yield.
This calculation i done for each line item by creating a Additional field with ABAP coding.The overall meanvalue calcualtion of this addtional fields column is not suits the customer expectation.They want the calculation to be done by the system like what i had explained in the example.Hi,
Here is a code for a single grid.
In the screen layout,make a custom container (Icon with C ) and name it in Capital letters as CONTAINER.The code below in bold letters is what exactly you want.I ve given a small example on how to use ALV:
REPORT SAMPLE.
DATA: alv type ref to cl_gui_alv_GRID,
cont type ref to cl_gui_custom_container,
itab_spfli type table of spfli.
START-OF-SELECTION.
select * from spfli into table itab_spfli.
call screen 100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
seT PF-STATUS 'GUI'.
SET TITLEBAR 'xxx'.
if cont is initial.
CREATE OBJECT cont
EXPORTING
CONTAINER_NAME = 'CONTAINER'.
CREATE OBJECT ALV
EXPORTING
I_PARENT = CONT.
CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'SPFLI'
CHANGING
IT_OUTTAB = itab_spfli
Now for your requirement,you can create two custom containers in the screen layout and two different alv grid instances.ie:
DATA: alv1 type ref to cl_gui_alv_GRID,
cont1 type ref to cl_gui_custom_container
alv2 type ref to cl_gui_alv_GRID,
cont2 type ref to cl_gui_custom_container.
To select data from first grid,you can use events on double_click and fetch information and then display it in the second grid.
<b>SOME MATERIAL REGARDING ALV:</b>
www.abap4.it/download/ALV.pdf <b>(very useful)</b>
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
<b>-->download the PDF from following link.</b>
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
<b>SAMPLE PROGRAMS IN ALV:</b>http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid
<b>DEMO PROGRAMS IN ALV:</b>BCALV*
Regards,
Beejal
**Reward if this helps -
APD - writing query result "rank calculation" to file or DSO
Hello,
I am trying to take a query result set where I am calculating a key figure as Rank and run it through an APD to write to a DSO.
This is a top 5 query for a dashboard. I keep getting an MDX failure on the query.
Any ideas?
My ultimate goal is to set up a process to take TopN query results and get them into a target that can be used in a Universe.
Thanks,
ChrisHi,
You want to store the data of query in to dso?Y
You can write a code in to routine for calulated key figure.
I also face the same problem but i solved using routine.
try this.
Regards,
Ganesh -
Query: Making pct. calculations on cumulated rows.
Hi Experts
I have a problem in a query. See the query below. The problem is that column 8 shows the same result as column 7 What I find strange is that column 6 is just right - it shows the YTD-deviation, which I would like to show in pct in culumn 8.
Does anybody know how I can make the %Dev on the YTD numbers in column 8?
Rows:
- Calendar month2 (monthnumbers: "1", "2"..."12")
Columns (Units sold):
1. Actual Month: current calendar year, billed quantity
2. Actual Month LY:current calendar year -1, billed quantity
3. Actual Year To Date: current calendar year, billed quantity (cumulated)
4. Actual Year To Date LY: current calendar year -1, billed quantity (cumulated)
5. Dev Month: Actual Month - Actual Month LY
6. Dev Year To Date: Actual Year To Date - Actual Year To Date LY<b>(OK)</b>
7. %Dev Month: Actual Month % Actual Month LY
8. %Dev Year To Date: Actual Year To Date % Actual Year To Date LY<b>(NOT OK)</b>
Kind regards and thanks in advance,
TorbenTorben,
The cumulation for the KF is done only in the front end and hence the cumulated value is not available to the OLAp processor and hence you cannot use the cumulated value in another formula.
This basically means that even if you use a cumulated figure in another formula you will still get the calculation on the basic value..
for example :
char|Basic Value|CUmulated Value|Cumulated value *2
A|1|1|2
A|2|3|4
A|3|6|6
If you notice row two it is taking the base value into 2 and not the cumulated value..
The only option for the same is to use a macro if the query is in excel or use the table modifier to change the displayed value..
Arun
Hope it helps... -
Query for tax calculation.
Hi All
I want to know if it's possible to do calculation using the unit price field in Purchase Order.
This is what I want to test
I insert unit price then select the Taxable UDF option (Yes) then the Total(LC) Field ( Standard B1 field must display the amount plus 14% vat and when I select Not taxable it must not apply the 14 % vat.
The reason why i'm doing this is the client is not a vat vendor ( they dont have to report for tax) so this is just a workaround that i have to expense the whole amount.
And how to use variables when you want to write a query... like (unit price x 0.14)
Please any suggestions are welcome.....
Thanks
Bongani DlaminiHi Gordon
"However, the problem start here: how will you use this query result?"
The calculated amount must appear in the line total field as this field is used for document totaling.
" Do you want the document total relate to your results?"
The document total must display the total amount inclusive of VAT , the VAT field must not include any info
Thanks
Bongani -
Error with MDX query -- measure not calculating properly
Hi all,
I have a calculation in my dataset [Currentsalesperiod]. Basically it gives me a set of all the sales periods, and than it takes the last value. However, when I use this calculation in my dataset, it only shows me the rows with the sales period 6.
I have a feeling that the currentmember basically takes my whole output as a set and than calculated the sales period. When I use this in my nonempty on rows it only shows data for sales period = 6.
How can I solve this?
WITH
SET [CurrentSalesPeriod]
AS
TAIL(
NonEmpty(
[Point of sale].[Management period].[Management period],
{[Measures].[Sales amount]}
YTD([Date invoice].[Bonus calendar - Week].[Bonus week of year].&[2014]&[52])
* [Point of sale].[Client id].CurrentMember
),1
SELECT
NonEmpty(
([Point of sale].[Client id].[Client id]
*[CurrentSalesperiod]
,[Measures].[Total YTD Sales]
on rows,
[Measures].[Total YTD Sales]
on Columns
FROM
[RETAIL cube]Hi Y,
I am not sure your calculation is doing what you want. As I read it, the set is simply the first non empty Management period that has a value for YTD. The result from your query is a list of all Client Ids, for that Management period, irrespective of Date
Invoice. Is that what you want?
Richard -
Query from Interst calculation
Hi,
In Tcode -OBV1, Account symbols are 0001 is Int. recieved and 0002 is Int. Paid, but i also created 0003 for Int. recv affliated
While i am creating for 0003, system showing Bus Trans. 3000 is not defined.
How can i assign this 0003 in Posting specifications
Rgds
sunficoHi,
In OBV1 i am crearting the Bus. Trans. getting error
"Bus Trans 3000 is not defined"
Rgds
sunfico -
Query key figures calculation issue
Dear Sap Gurus,
I would like to calculate the sum of one key figure on the month m-3 m-2 and m-1
I have created 3 restricted key figures filtered by month m-3, m-2 and m-1
i have created a key figures one which one I sum these 3 key figures but the result per month is not egal to the summation but to the value per month
on the example below
one this field is what i have D- Sum Other Requirements
one this field is what i would like to have Sum Other Requirement Past
Thanks for your answer
Calendar Year/Month janv-07 FEB 2007 mars-07
D- Other Requirements month-6 69,888 PC
D- Other Requirements month-5 281,385 PC
D- Other Requirements month-4 19,854 PC
D- Sum Other Requirements 69,888 PC 281,385 PC 19,854 PC
Sum Other Requirement Past 69,888 PC 351,273 PC 371,127 PCHi,
Create one RKF based on your key figure,
go t property of RKF and mark constant selection.
now in this field you can see the sum of key figure field.
and you can use it for formula.
Hope it help you.
Regards
Suneet -
Calculation based on sub query
Is it possible to base a calculation on a sub query whereby both the calculation sheet and sub query sheet reside on same discoverer workbook?
This is possible in MS Excel whereby information from one tab can be used in another tab. I am using Discoverer 3.1.44Hi
I'm afraid that Discoverer's use of sub queries is restricted to only using a sub query as a means of further controlling the data that is pulled back.
It is not possible to use data from a sub query in a calculation, only in a condition. It also makes no difference which version of Discoverer you have because this mode of operation remains the same no matter what version you have (even 10g!!)
Hope this helps
Regards
Michael -
Can we show comments in adhoc query?
Hello All,
Can we put comments in Adhoc query?
I have a comment icon in infotype 9903.
I need to fetch that particular comments and show in a query output. It is not a field.
Can we do this? If yes, then please let me know how?
Cheers,
Darshna.I did it sometime back. A bit complicated process.
Create an infoobject, manually enter the values "keyfig1" and "keyfig2".
Include this infoobject in the filters and restrict it using a "ready for input" variable.
Now create two formula variables.
Write a customer exit such that when you select "keyfig1", first formula variable's value should be set to 1 and other one's to 0.
Then in the query create two calculated key figures, multiply both with the formula variable. Also supress column (all active value == 0).
Then it will show the key figure which you have selected.
Pravender
Maybe you are looking for
-
How do I give a "gift card" but throw the internet directly to another apple ID?
My friend's b-day is today, and I'd like to give him some credits to spend on the mac app store or on the app store... There are any way that I can give him some money by my apple ID to be credit in his apple ID? Thank you!
-
Incoming Email not Being Received
Hello, I have confirgured my phone to send and receive emails from a server based in China. My settings are as follows: Incoming: Port 110 No SSL My user name password and POP3 Server are correct as I confirmed the same settings on my Outlook. Outgo
-
How the **** do I use the Dumpster tool???
Dear knowledgeable souls! I have recently downloaded the Dumpster tool, but have no idea how to make it work, I have done the google thang and found no help... can anyone explain? how to simply analyse a quicktime file with this tool, I open it and i
-
.cil files will no longer import to clip gallery
I have always been able to download MS clip art, change the extension to .cil and it would load into my clip gallery with no problem. Suddenly, it has stopped doing so. I've clicked on the files, tried the import screen, etc., and it appears that i
-
IOS 5.0.1 Update - Phone Won't Work (Urgent)
I just updated my iPhone 4S to iOS 5.0.1. iTunes recommended that I should do this. Anyway over 800 megabytes later, and installing iOS 5.0.1 on my iPhone 4S, it asks me to connect it to iTunes, however once I do it displays a message saying "iTunes