OTL Employee Rotation Plan Query

Hello,
I need help on below Select Statement.
We have created OTL Work plan as below :
Work week starts on Sunday.
Example:
Su M Tu W Th F Sa
(1) REGDY - Tu W Th
(2) OFFDY - Su M F
(3) RESTDY - Sa
i need to fetch above information from backend i have created below query for same.
But it is not working as excepted. Can you please help me on this?
                                                SELECT 
                                              FLOOR ((standard_start / 100))+ (MOD (standard_start, 100) / 60) hrs_start,
                                              FLOOR ((standard_stop / 100))+ (MOD (standard_stop, 100) / 60) hrs_stop,
                                              hws.week_day,
                                              hs.NAME,
                                              hrs.start_date+hws.seq_no---1
                                             FROM hxt.hxt_rotation_plans hrp,
                                                          hxt.hxt_add_assign_info_f haai,
                                                          per_all_assignments_f paa,
                                                          hxt.hxt_rotation_schedules hrs,
                                                          hxt.hxt_weekly_work_schedules hwws,
                                                          hxt.hxt_work_shifts hws,
                                                          hxt.hxt_shifts hs
                                             WHERE haai.rotation_plan = hrp.ID(+)
                                               AND haai.assignment_id = paa.assignment_id
                                                 AND paa.person_id = p_resource_id
                                                 AND paa.assignment_type = 'E'
                                                AND  p_submission_date  BETWEEN haai.effective_start_date AND haai.effective_end_date
                                                AND  p_submission_date  BETWEEN paa.effective_start_date AND paa.effective_end_date
                                                 AND hrp.ID = hrs.rtp_id(+)
                                                AND hrs.tws_id = hwws.ID(+)
                                                AND hwws.ID = hws.tws_id(+)
                                                AND hws.sht_id = hs.ID(+)
                                               AND hs.NAME like '%Off%Day'
                                               AND hs.NAME like '%Rest%Day'
                                                 order by 5;
Thanks

Pls Help

Similar Messages

  • Mass update the OTL rotation plan for employees

    Hi All,
    I am trying to find a way to mass update the rotation plan for employees .I could not find any API or easy way to do it.
    Do we have any easy way to do it.
    Thanks

    If you cannot find an API, why don't you try one of the data-load tools.
    http://www.dataload.com/
    Cheers,
    Vignesh

  • OTL: Changing the rotation plan name

    Hi All,
    Is there any impact for changing the names of rotation plans, work plans, and shifts, noting that the rotation plan is assigned already for many assignments?
    thanks,

    Hi All,
    Is there any impact for changing the names of rotation plans, work plans, and shifts, noting that the rotation plan is assigned already for many assignments?
    thanks,

  • Not getting 'actual data' in the planning query

    Hi all,
    I am debug other's query. This cube stores 'actual' and 'plan' data and I loaded 'actual' and can see it in the cube. But I cannot see 'actual data' when I run the planning query.
    I checked all restrictions in the KFs and CHARs and fliters in the query. There are only 'value type 10', 'fiscal year variant Z1', and 'currency CAD' restricted and actual data does contain those values in all line items.
    Can someone point it out what it could be the issue? Thank you.
    R.

    Hi,
    if you enter some data (plan data) you cannot see it again. Is that correct?
    are you using the same query to enter and to see plan data?
    Because if you are entering data in an aggregate level and you are executing your query over the infocube you will not see the data from the yellow request. If you execute query over the aggregate you should be able to see all data in the cube (yellow and green requests).
    Also check if your query is defined as per note 1136163.
    I hope this helps.
    Lucimar

  • Help with Planning Query - 0CALMONTH not showing up

    Hi, I have a simple planning query where I am trying to allow users to input or change an Amount by Material/Month.  The User inputs a Version and a Date Range to maintain.  The selected dates should show up going across the screen even if there is no existing data.  These Variables are in the Query Filter along with a few other characteristic Filters.  So in my query I have 0MATERIAL in the Rows and I have 0CALMONTH and my Key Figure.  Under advanced for the characteristic 0CALMONTH it is set as Master Data.
    When I run the query for some reason the 0CALMONTHS do not show up going across.  If I run the query and put in one value then the 12 months show up.  Seems like a bug.  I have another similar query where this works.  Can anyone take a look at the screen shots and help me figure this out?
    [Query Def Screen 1|http://i35.tinypic.com/1h8con.png]
    [Query Def Screen 2|http://i36.tinypic.com/1f781c.png]
    [0MATERIAL Def|http://i36.tinypic.com/xefq8i.png]
    [0CALMONTH Def|http://i35.tinypic.com/ej8qpv.png]
    Thanks!
    Edited by: Kenneth Murray on Nov 5, 2009 3:12 PM

    Dear  Kenneth,
    I think its a bug.  If we post the value without the drilldown on 0CALMONTh then its open for the input, and after that if we drill down it with 0CALMONTH for same selection, it opens for input.  but for new selection of month it not opens.
    Have you solved the problem?
    Regards,
    V B Udani

  • Daily Production Plan query changes

    Dear Experts,
    I was tried  to do a daily production plan query,  but i need to add one more feild in the below query, (ie) In sale order Document, Row level feild of Quantity ( RDR1,Quantity) should be in that query,
    SELECT T0.[ItemCode],T1.[ItemName], T0.[PlannedQty] as 'Planned Qty', T0.[DocNum] as 'Doc No', T0.[PostDate], T0.[OriginNum] as 'Sale Order No', T0.[CardCode], T0.[CmpltQty] as 'Completed Qty' FROM OWOR T0 join OITM T1 on T0.Itemcode = t1.ItemCode WHERE T0.[PostDate] >='[%0]' and T0.[PostDate] <='[%1]'
    Plz help me.
    Thanks and Regards,
    Manikandan

    Hello Manikandan,
    You can add the sales order into the production order, but you should now: there is no connection defined between sales order lines and production order, only the item code can be used as reference to sales order lines
    I mean:
    *if you have the same item in sales order lines in different position the query always multiplies the result. *
    So you can join the sales order header for Origin Number and DocNum, and sales order lines by Itemcode
    SELECT
         T0.[ItemCode],T1.[ItemName], T0.[PlannedQty] as 'Planned Qty', T0.[DocNum] as 'Doc No', T0.[PostDate],
         T0.[OriginNum] as 'Sale Order No', T0.[CardCode], T0.[CmpltQty] as 'Completed Qty',
         T3.[Quantity] [Sales order Qty], T3.LineNum [Sales order Postion]
    FROM
         OWOR T0 join OITM T1 on T0.Itemcode = t1.ItemCode     
         left outer join ORDR T2 on T0.[OriginNum] = T2.[DocNum]
         left outer join RDR1 T3 on T2.[DocEntry] = T3.[DocEntry] and T3.[ItemCode] = T0.[ItemCode]
    WHERE T0.[PostDate] >='[%0]' and T0.[PostDate] <='[%1]'
    Regards
    J.

  • Issue creating planning query on cube partitioned by fiscal period

    I have a cube that is partitioned by fiscal period (0FISCPER).  This requires that there is a constant value for fiscal year variant (0FISCVARNT).  When I try to create an agg level on this cube 0FISCVARNT is automatically pulled into the agg level.  However, because 0FISCVARNT is set to a constant value it is not available in query designer to add into a planning query...as such, I cannot create a planning query on this cube.
    I can repartition the cube (i.e. remove the partitioning), but does anyone know of any other work arounds?
    Thanks.

    We resolved this.

  • Planning query donu2019t show current data

    Hello,
    I have an input ready query over an aggregation level of a real time cube. Whenever the yellow request is closed and a new request is opened, the input ready query does not show the old data. And sometimes it shows incorrect data. We found that the issue is with the Cache.
    In RSRT when opening the input ready query in debug mode with "Do not use cache setting", the query returns correct data. But the surprise thing is that, the input ready query has Cache setting as inactive (0) in RSRT. So we had to generate the Delta buffer query <infoprovider>/!!1<infoprovider> in RSRT where <infoprovider> is the name of the real time cube.
    This solved our problem and the query brought in correct data. But again when I close the second request, the input ready query again shows me no data or shows me wrong data. So again we need to generate the delta buffer query in RSRT <infoprovider>/!!1<infoprovider>.
    This is very annoying when considering the fact that you have to generate the delta buffer query every time the request is closed. This could be a overhead in maintenance and will not go well with people.
    Does anybody have any solutions for solving this issue. Is there any setting by which we can turn off cache altogether or delete cache when a request is closed etc? or worst conditions how to automate the generation of delta buffer queries every time the request is closed?
    Any help is really appreciated.
    Regards,
    Anand

    please check the below;
    Delta buffer query in RSRT for BI-IP ("<infoprovider>/!!1<infoprovider>)
    Planning query donu2019t show the current data
    Edited by: Hymavathi Yanamadala on Sep 9, 2009 5:47 AM

  • No auth error while executing BI integrated planning Query

    Hi to all,
    I have created integrated planning Query in Bex Query designer.
    But while executing BI integrated planning query in portal, its giving errror.
    1.     No authorization for query "IP"
    2.     You are not authorized to edit this aggregation level CUBE_IP
    3.     Cannot load query u201CIPu201D (data provider u201CDP_1u201D: No authorization for requested service)
    Can any one tell me the solution for that.
    Regards
    Pavneet Rana

    Hi.
    For to check the authorization errors, you have to use the transaction  ST01 (System Trace) The Steps are:
    ST01 -->  Trace ON  --> In Trace Components, active "Authorization Check" --> Execute the query with the user --> Trace Off > Analysis> In User Name, put the user that execute the query --> F8
    You can see the authorization errors  in Dark Green.
    Regards !!!

  • Help with Planning Query

    I have a planning query with Material in the Rows, 0CALMONTH and Amount in the Columns.
    For a query selection the user puts in only version and month Date range say 04/2009 - 03/2010.  What I would like to happen is initially present the user with 3 empty rows where they input the Material and the different amounts going across for the selected 12 months.  Initially there is no planning data and all my efforts fail I think because I do not have any available values for material to plan against.  Is this possible?
    I have another similar query, but I have fixed values on the left.
    Can anyone help with this?

    Hi thanks for your patience.
    I am trying to get a planning query with 3 empty rows to start.  The User inputs the Month Range.  In each row I would like and empty field for Material input and empty key figure fields for each of the months in the range.  I have a similar query already, but instead of starting with no Materials I have fixed materials and it works fine.  It's just a problem when I'm starting out with no materials.   Any ideas?   Thanks for your help.
              Month 1 Month 2 Month 3,
    Material, Amount, Amount, Amount, ...
    Material, Amount, Amount, Amount, ...
    Material, Amount, Amount, Amount, ...

  • How to get second maximum salary from employee table(sql query)

    how to get second maximum salary from employee table(sql query)

    dude there is no matter of structure .........that user already said its from employee table ...............its basic table in sql and there is no need to specify the table structure
    .........i think u got my point I think you are the one who didn't understand Sarma's point.
    Give a man a fish and you feed him once. Teach a man how to fish and you feed him a life long.
    >
    and the query is
    select max(sal) from emp where sal<(select max(sal)
    from emp);
    this will give the 2nd max salary from the emp tableBtw: You solution is bad, because it needs to scan and sort the table emp twice. And a better solution has been given already.
    Message was edited by:
    Sven W. - reordered statements

  • Characteristic selected in Dropdown box does not influence planning query

    Dear all,
    We have a problem filling all the characteristics in a planning query to make it possible to plan, inside a BEx Layout.
    We are using Dropdown boxes to restrict the characteristics in the query so it can be able to plan. Only when we put the characteristic in the lines of the query it is able to being able to plan on the required conditions. This results in a query with many characteristics in the lines and therefore unattractive to the users. We believe that it should be possible to restrict the characteristics in the query by drop-down box. Can you explain us how to achieve this restriction in the planning query.
    Kind Regards,
    Mazzz

    Hi Mazzz,
    you have to insert a dropdown menu, link it to one dataprovider (maybe the same of the query) ad set some simple paramiters in dropdown (chose characteristic end so on..)
    hope this helps
    Michele

  • How to save the data in Planning query in Analyser?

    HI all,
    I am new in Integrated Planning I have made a planning query and I am inputting data in the query, right clicking to excel sheet and saving it saved data into cube but if I want a save button specific to query not specific to workbook how can I make it as generic, as when I run the query in analyser the button should be displayed in the Planning query on clicking it the data gets saved to cube.
    Abhijit.

    Hi Abhi,
    Hope this will be helpful to you.
    http://help.sap.com/saphelp_nw70/helpdata/en/43/a033e0f56e21b5e10000000a1553f6/frameset.htm
    Thanking You,
    Sappie

  • Shifts, Work Plan, Rotation Plan - Projects integration in otl

    Hi,
    My client implementing OTL with projects, I need few informations.
    1. Work shcedule can be generated for projects integration or it is only applicable for payroll integration. If possible with projects please let me know the steps to configure it.
    2.What i understand from shift, work plan, rotan plan , holiday calender has to be attached to earning policy then assign to assignment. Earning policy can be created only when elements are there Am i right?
    3.The scheduling Can we do it in payroll and projects based integration?
    Client is expecting to autogenerate the timecards after it has been scheduled. I hope autogeneration with projects can be done only we have project resource management licene.(My client doest have one)
    Appreciate your help.
    Stalin G

    Define Earning Policy
    OTL Application Developer> Policies>Earning
    Assign it to the employee using the following path
    OTL Application Developer>Assignment Time Information
    Thanks,
    Srujan

  • Explain Plan query

    I just changed the hint to pick different indexes inside the same SQL and they have significant different performance. SQL1 is much faster than SQL2 and the explain plain is very different. I found that there is some values like :Q1003, :Q1004 and :Q1005 under Object Code in the explain plan of SQL1. May I know how to interpret this?
    Thanks.
    Edited by: 843672 on Mar 11, 2011 3:42 AM

    Welcome to the forum.
    Before you even think of posting another 'question', first read:
    http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
    and secondly, when it comes to tuning requests, read:
    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting
    and there's also a FAQ and a SQL and PL/SQL FAQ....
    http://forums.oracle.com/forums/ann.jspa?annID=1535

Maybe you are looking for