Time Management case study

Hi Gurus,
Any body has case study of time management. Please mail at [email protected]
Thanks in Advance.
Nawaz

Evan first do you a Project structure in place ?
There would be charge codes or WBS  elements created for each Project .(PS team would do it for you )
The PS team would create the WBS  codes and create teh features like if its billable Project /Non Billable project etc which would alos have the respective cost centers .
Now for these project you can premit what type of Attendance types can be used //in the configuration .
The employee goes to CAT2 selects the WBS code appilcable or the project code and enter the hours .
Similary if there are more than one projetc worked ..Approriate WBS element would be choosed and hours booked against .
1)PS team creates the appropiate WBS codes or project codes for your projects
2)If needed you can allow the attendacne that can be recorded for this attendance types .
3)To enter time employee would need a data entry Profile created (CAC1 transaction code )
4)employee goes to the transaction CAT2 ->selects the approrpiate data entry profile
5)Employee selects the WBS CODE /project code enters the time agains each day .
6)goes for CAT4 approval if workflow in place .
7)CAT6 background to transfer to infotypes (2001/2002
now all the records would be stored in CATSDB table
If you need config details let me know
Regards
Santosh

Similar Messages

  • Time management Special cases

    Hi everyone....
    I just have some special cases in Time Management:
    1-i want to count the absence days in different way as follows: if the start date and the end date of the
    absence (of annual leave type only) is exactly before and after holiday, then the holiday should be included
    in the count too, for example:
    the employee took an annual leave from 30-05 to 01-06 and we defined 31-05 as a holiday, then this absence
    should be three days not only two.
    so can this be done without using schema.
    2-our customer have many projects to work in, and the attendance should be recorded manually, the case is
    that when the attendance of the employee recorded it should have something like comment to be able to know
    what project the employee attended, i handled this by using InfoType 2002 and made attendance types, one
    for each project, but this means that when some project closes or when a new project assigned to the company
    this means that they should come back to me as a support, so doese anyone have an extra idea.
    3-the last thing i want is to have some standard report that can use the time statement i made like pt60,
    to be available for admins to use anytime as pt60 uses it only in time evaluation, and if anyone have some
    good links or books for making time statements please send.
    Regards;
    Evan

    Question no.1...
    It will be standard behaviuor of the system that it will deduct the sadwich holidays. Please check the calendar days in 2001. if its not so then let me know.
    Question no.2....
    Ask the ABAPER to Apend the structure of IT2001 and give the text box there. Through this you will be able to enter the text against each holiday for all leave types. If so then make it mandatory field otherwise remain as optional.
    Question no.3....
    You have two options.
    1. Make a ABAPED report for view purpose.
    2. Give them the authorization to view the cluster table report. Run t-code se38 and check this report RPCLSTB2. It will contain all data regarding time management of employee.

  • Query on Time Management Status

    Dear Team,
    Scenario:
    We have some employees wherein the time evaluation will be evaluated for the status of 9 in Planned Working Time Infotype. After a period of time, these employees will be sent for education and no leaves are entitled. In this case, the time management status will be changed to 0. No time evaluation.
    The accrued leaves will still be available for the employee while going to this education for example 20 days.
    We have customized a rule, which will carry forward the last year balance to the current year balance on every 1st of the year.
    In the above case, if an employee completes his education and returns back in the middle of the year other than the 1st day of the year, in this case, the carry forward of leave is not taking place.
    My assumptions:
    I would like to know an operation which would query the Previous Day Time Management Status and Current Day Time Management Status. If I can able to do this, if it is YES, the last old previous balance to be carried forward....
    Please let me know if any other alternative method.
    Thanks and Regards
    Team Member.
    Edited by: Patlolla Mallikarjun on Apr 26, 2010 8:35 PM

    Hello Mallikarjun,
    If you are planning on controlling thru a rule in schema, you can approach this way. Whenever an EE returns from education, change IT0007 time mgmt status to 9 along with additional time indicator say 'ED'. You can query the additional time indicator status in a rule thru the operation 'OUTWPATIND'. Hope this helps your requirement.
    Best Regards,
    Sunny

  • Organization structure for Case study .... need yr advice

    Hi …I am in process of preparing an org structure for one of the company.
    The company operations is like ….
    The company has four factories in different locations and have 3 Regional distribution centers (RDC) across india. Each distribution center has 5 branches (Sales Offices), in this way they 15 Sales offices across India.
    Most of the materials are procured by factories independently while some materials are centrally procured. Factories produce Finish goods and they are either sale to customer directly ( big regular customers) , or transferred to RDC to cater the requirements of other MID size customers and the other possibility to transfer it to Branches for Retail customers. RDCs also transfer FG to Branches.
    All factories , RDC and branches have warehouse facility , however branches have limited warehouse facility as the customers supported by them are very few and generally deliveries are made directly from RDC / Factory.
    They also have one R&D department in another location to develop new products and material is generally transferred from factories to R&D department.They also have one project division at the same (R&D) location which handles commissioning of new plants and procurement of capital goods.
    Raw Material , Semi finish and FG are transferred between factories and FG material is also transferred between RDCs.
    The group also has another Company which produces another line of products. RDCs and Branches of first company also work for second company (which means same RDC can store FG produced by both companies) and also Branches can also have FG material of both companies. Second company doesn’t have any specific R&D or capital division and R&D and capital of first company also work for second company.
    Inter company transfer between both companies is a regular practice.
    > Proposed Org structure
    Company – Group Company
    Company Code – First company and Second company
    Factory Configurations
    For first company
    4 Factories will be 4 plants
    Factories Structure (Storage locations / warehouses and storage type)
    Since factories have different type of material ( like FG , Raw material , WIP ) therefore I am confused what option I should select 
    1) 3 storage location ( for each plant) and one warehouse, 1 storage type
    2) 1 storage  location and three warehouses (I think this is not possible in SAP , not sure ?? )
    3) 1 storage location , 1 warehouse and 3 storage types
    RDC structure
    RDCs have full fledged warehouse facility and therefore thinking of making them also as Plant. Every RDC will have 6 Storage locations , 1 for First company RDC itself, 5 for associated branches and I feel each “RDC storage locations” should be a associated to a separate warehouse also.
    ( Since both companies produce different set of products therefore they will have different material and hence thinking of handling products of both companies in same plant and same storage location and warehouse , may be two storage type/area can be defined to differentiate material of both companies.)
    Branches: Will be storage locations under RDC …..
    While making branches as Storage location …. I have another question about valuation , since material from Plant and RDC is being transferred to Branches and  from there it is distributed to customers therefore the valuation of FG at BRANCH and RDC should be different as transportation cost , packing , unpacking etc cost should get added at Branch level.
    Therefore in case I make branch as Storage location , I will miss the valuation part while if I make them as Plant then there will be lot of documents get generated for each movement. Hence not sure for what option I should go.
    R&D:
    Since R& D department is involved in testing in New Product development and generally material is required to be scrapped after testing therefore thinking of making it as Plant with one storage location and may be here I don’t need any warehouse (WM) here.
    Project Division
    Project division may also be a separate plant with one storage location and NO WAREHOUSE is required to linked with it.
    Purchase Organizations
    4 purchase organizations for each plant respectively and 1 centralized purchase Org for central procurement.
    Your all valuable inputs are welcome .... looking foward to have a best possible configuration for above mentioned case study.
    Regards

    Phew... long long question
    The rule I generally follow is that the org structure should map reality.
    Company code - where Balance Sheet and Profit and Loss are prepared at the end of the year. If an entity does not do this, it is not a company code.
    Plant
    1) Each manufacturing facility is a plant (could be in 1 location or separate).
    2) Each separate location is a plant (even if it only stores goods). May be an overkill, but helps when legal requirements change or the location is upgraded.
    So in your case, RDC will be a plant (may be more than 1 if necessary). R&D should be a separate plant without warehouse management
    Storage location
    The only rule I follow is that there should not be any overlap of storage locations. So physically, any area of say 1 square foot should belong to one and only one storage location. Otherwise there is a lot of confusion during physical inventory. So logical locations are a no-no.
    I usually use a lot of storage locations.
    Don't have a warehouse spanning multiple plants (even though it is allowed).
    Purchasing organizations
    Have one for each location of purchase. If there is a team sitting in each plant procuring for only that plant, have it as a separate purchasing org (not strictly necessary, but makes authorization simple). For central purchasing, a central purchasing org should do nicely...
    Hope this helps,
    Lakshman

  • DBM - Time Management - CATS Transfer to CO

    Hello DBM Gurus,
    we are trying to set up Time Management  in our DBM implementation (6.04).
    the DBM transactions work and create timestamps in CATS as expected but, we seem to have a problem with the integration between CATS an CO. The entries in cats do not create CO transactions in the internal order of DBM order (no entries created in table CATSCO).
    We have followed all the instructions we could find. this is still not enough.
    Are there any specific steps rellevant to this problem (transfer from CATS to CO) that we might have missed?
    Do you know any Cookbook or helpful help on this issue?
    thanks in advance,
    Daniel Gamss

    You can refer this link for details process of interface data from HR and CO,PS,MM ...
    [http://www.****************/showthread.php?t=11938]
    Normally after book in timesheet from CAT2 ->Data will be save in CATSDB table,
    after approves data will exist in CATSCO , CATSPS, CATSMM and then we use CAT5 to interface data from HR to PS, CAT7 to interface frm HR to CO ...
    For you case no data exist in CATSCO ->check data already approves or not

  • Case study: "Large?" labview programs flooded with different VIT's

    Case study: "Large?" labview programs flooded
    with different VIT's
    Type of application:
    Computer with loads of individual hardware connected or other software (either
    onsite (different buses) or offsite (Satelite/GSM/GPRS/radio etc.).
    Hardware
    description: little data "RPM" but communications to all devices are intact.
    More "RPM" when many VITs are involved.
    Size: 1000+
    VITS in memory (goal). Total software has been tested and simulated with 400.
    I'm posting
    this post after reading this thread (and actually I cant sleep and am bored as
    hell).
    Note: I do
    not use LVOOP (but sure post OOP examples, am starting to learn more and more
    by the day.)
    Things I
    will discuss are:
    Case 1: Memory usage using a plugin
    architecture
    CASE 2: memory usage using VITs (!)
    CASE 3: updating datastructures:
    CASE 4: shutdown of the whole system
    CASE 5: stability & heath monitoring
    CASE 6: Inifiles
    CASE 7: When the hardware is getting crappy
    Total
    application overview:
    We have a
    main application. This main application is mainly empty as hell, and only holds
    a plugin functionality (to register and administer plugins) and holds an
    architecture that holds the following items:
    Queue state
    machine for main application error handling
    Queue state
    machine for status messages
    Queue state
    machine for updating virtual variables
    Event state
    machine for GUI
    Some other
    stuff
    Other
    global functionality is:
    User
    logins, user configurations and unique access levels
    Different
    nice tools like the good old BootP and other juicy stuff
    Supervision
    of variables (like the NI tag engine, but here we have our own datastructures)
    Generation
    of virtual variables (so that the user can configure easy mathematical
    functions and combining existing tags)
    Licensing
    of plugins (hell we free-lance programmers need some money to don't we?)
    Handles
    all communication between plugins themselves, or directly to a plugin or vice
    versus.
    And now we don't
    talk about that (or marketing) the main application .
    Message Edited by Corny on 01-20-2010 08:52 AM

    CASE 3: updating datastructures:
     As we do NOT use clusters here (that would
    just be consuming) we only use an 1D array of data that needs to be updated in
    different functional globals. If the the number of VITS exceeds so that the
    updating of this datastructures becomes the bottleneck, this would cause
    delays. And since in this example we use 250 serial interfaces (lol) we do not
    want to disrupt that by any delays. When this happends, does anyone know a good
    solution to transfer data?
    A thought:
    perhaps sending it down to the plugin and let the plugin handle it, this should
    save some time, but then again if more VITs are added again this would become a
    bottleneck and the queue would fill up after a while unable to process it fast
    enough. Any opinions?
    CASE 4: shutdown of the whole system
    Lets say we
    want to close it all down, but the VITs need perhaps to do some shutdown
    procedure towards the hardware, that can be heavy.
    If we ask
    them to shutdown all together we can use an natofier or userevent to do this
    job. Well, what happends next is that the CPU will jump to the roof, and well
    that can only cause dataloss and trouble. The solution here was to let the
    plugin shut them all down one by one, when one has been shutdown, begin at the
    next. Pro; CPU will not jump to the moon. Con's: shutdown is going to take a
    while. Be ready with a cup of coffee.
    Also we
    want the main application not to exit before we exit. The solution above solved
    this as the plugin knows when all have been shut down, and can then shut itself
    down. When all plugins are shutdown - the application ends.
    Another
    solution is to use rendovous (arg cant spell it) and only shut the system down
    when all rendezvous have met.
    CASE 5: stability & heath monitoring
    This IS
    using a lot of memory. How to get it down. And has anyone experienced any
    difficulties with labview using A LOT of memory? I want to know if something
    gets corrupt. The VITs send out error information in case, but what if
    something weird happens, how can I surveillance all the VIT's in memory to know
    one is malfunctioning in an effective way/code (as backup
    solution  so the application knows
    something is wrong?
    CASE 6: Inifiles
    Well, we
    all like them. Even if XML is perhaps more fahionally. Now Ive runned some
    tests on large inifiles. And the labview Inifile functions use ages to parsing
    all this information. Perhaps an own file structure in binary format or
    something would be better? (and rather create an configuration program)?
    CASE 7: When the hardware is getting crappy:
    Now what if
    the system is hitting the limit and gradually exceeds the hardware req. of the
    software. What to do then (thinking mostly of memory usage)? Needing to install
    it on more servers or something and splitting configurations? Is that the best
    way to solve this? Any opinions?
    Wow.  Time for a coffee cup. Impressive if someone
    actually read all of this. My goal is to reach the 1000 VIT mark.. someday.. so
    any opinions, and just ask if something unclear or other stuff, Im open for all
    stuff, since I see the software will hit a memory barrier someday if I want to
    reach that 1000 mark hehe

  • Create a Time Management Custom Function in PE04

    Hi Experts
                  Pls give the steps to create a custom function in Time Management using PE04,
    whta is purpose of using infotype in PE04 , what are the input parametr and output paramaete . What are the intrnal table available in custom function . How we can test the custom function .
    Thansk and regards
    Renjith MP

    No idea on how to set.
    But in our case, we have a requirement for calculation of GOSI for our Bahrani Employees. Hence did the same using by creating a FUNCTION ZGOSI.
    We have not given any input or output parameters.
    Used a Z program for payroll driver RPCALCX0 -- ZSH_GOSI_CALC and the calculations are taken from this program and output is displayed in the RT table- Wage types.
    For more information, check with functions of infotype like P0014, P0015, you will get some idea on the same.
    Before giving the above, need to mention the parameter list for control.
    Mostly the input parameters are given as Objects like in our Payroll Process, there is WPBP table and output parameters the results to be displayed using object RT.
    Analyze more on the same and you will come to know.
    Good luck.
    Regards
    Team Member.

  • Infotype 0007:Time management status

    Hi Experts,
    In Infotype 0007 , in the time management status field i have maintained the value as " Time Evaluation of planned times".
    What does this mean ? ....
    Does it mean that absences and attendences are not necessary to create. Kindly help me how the evaluation takes places
    in this scenario.
    Thanks in Advance,
    Balaji

    Hi,
    This is SAP explanation:
    Indicator 0 or BLANK:
    The employee's actual times are not recorded, and his/her time data is not accounted using the time evalulation program.
    Indicator 1:
    The employee's actual times are recorded and he/she participates in time evaluation.
    Example:
    The employee's actual times are recorded at a time recording terminal.
    The employee's actual times are recorded in the Attendances infotype (2002).
    Indicator 2:
    Employees' actual times are recorded and they take part in plant data collection. Their time data is accounted using the time evaluation program.
    Example:
    Employees' actual times are recorded using PDC systems.
    Employees' actual times are recorded in the Attendances infotype (2002).
    Indicator 8:
    This indicator is intended for external employees. The employee's actual times are not recorded, attendances are recorded in the Attendances infotype (2002), and time data is accounted in time evaluation.
    Indicator 9:
    You can use indicator 9 for employees for whom only exceptions to the work schedule are recorded. In this case, the employees' actual times are not recorded, but they do participate in time evaluation.
    Cheers

  • Time Management Status

    Hi Experts,
    Im relatively new to this fourm, and also to Time Management Module.
    We are implementing Negative Time Management for our client.
    Have a clarification with Time Management Status.
    I have suggested '0' to be defaulted as it is going to be Negative time management.
    Just for my understanding would like to know the difference between the time management status 0, 7 & 9.
    Also we have LWOP and Holiday Wages in place.
    your expert answers awaited...
    Cheers,
    Sri...

    Indicator 0 or BLANK:
    The employee's actual times are not recorded, and his/her time data is not accounted using the time evalulation program.
    Indicator 1:
    The employee's actual times are recorded and he/she participates in time evaluation.
    Example:
    The employee's actual times are recorded at a time recording terminal.
    The employee's actual times are recorded in the Attendances infotype (2002).
    Indicator 2:
    Employees' actual times are recorded and they take part in plant data collection. Their time data is accounted using the time evaluation program.
    Example:
    Employees' actual times are recorded using PDC systems.
    Employees' actual times are recorded in the Attendances infotype (2002).
    Indicator 8:
    This indicator is intended for external employees. The employee's actual times are not recorded, attendances are recorded in the Attendances infotype (2002), and time data is accounted in time evaluation.
    Indicator 9:
    You can use indicator 9 for employees for whom only exceptions to the work schedule are recorded. In this case, the employees' actual times are not recorded, but they do participate in time evaluation.
    I hope it helps you!!!
    CheerS!!

  • Time management status  doubt

    Hi Friends,
    what is the difference between time management status 0 and 9. when we can use 0 and 9.
    Thanks in advance
    Venkat

    Hi,
    Time management status  0  means - Employee's actual times are not recorded, and his/her time data is not accounted using the time evalulation program. here the time wgetypes are formed by payroll.
    Time management status  9  means - Employees for whom only exceptions to the work schedule are recorded. In this case, the employees' actual times are not recorded, but they do participate in time evaluation.ie (.Evaluation of planned times.)
    Hope this will help
    Manoj.

  • Time Management Status 7 without Payroll Integration.

    Dear All,
    when do we go about Time Management Status - 7 - without Payroll Integration.
    In this case how the process goes on SAP. what do we do in this status. do we record employees attendances in 2002 IT
    actually what happens.
    Regards
    kvn

    Hi KVN,
    You are using time management status 7 which means that no integration to payroll.Now as far as ur Quotas are considered then please use RPTQTA00 which is just a program and RPTIME00 or PT60 which will run time evaluation and if u want your Quotas to generate in time evaluation then just change V_556A_B in this table to increase so with time evaluation and no generation for Quotas to be with time evaluation.
    The client may ask sometimes for few Quotas to be prorated on a daily basis and so on in that case go with TE Quota generation
    else RPTQTA00 is ok.So see ur business and use either of it
    Let me know if u have any further Questions.
    Thanks
    Swati

  • [ask] ucm security model case study

    hi fellow stellent users,
    i have a question to ask about
    this case study, that im trying to solve.
    the case study is,
    suppose a corporate named acme
    then i create security groups (public, internal, sensitive, secret),
    semantically a clearance level.
    then i create hierarchical accounts based on acme's divisions:
    acme/finance
    acme/acct
    acme/marketing
    then i create this virtual folders (primarily used in webdav integration)
    /finance: account: acme/finance
    /acct: account: acme/acct
    /marketing: account: acme/marketing
    this seems ok, so all users in the finance dept
    can only view/access/edit the /finance folder (and its contents)
    but there are new requirements:
    -suppose finance users want to create subfolder in the /finance
    eg: /finance/shared
    but they want to share this folder so that it can be accessible to
    acct and marketing users.
    so how can i do this ?
    i already tried creating new account acme/finance/shared
    assign that to the /finance/shared folder,
    and adding that account to all users that need to access that folder
    but, there seems a problem,
    when i browse ucm with Windows Explorer (webdav) with a marketing user id.
    i cant see the /finance/shared folder.
    maybe because the parent /finance folder is hidden/not permissible to them (marketing guys).
    but then, what is the workaround for this problem? can a user
    create a folder that can be shared to other accounts ? with a parent
    folder that is not shared.
    what's the best practice in ucm to accomplish this scenario,
    especially for working in windows/webdav environment.
    is there any changes that i must make to my current security model ??
    thanks,
    your answers will be very appreciated. :)

    Sapan, Yes I understand that and I have read it also. The problem is we would rather take care of the ROLES within UCM, such that subadmins should be allowed to create roles etc with UCM who have no access to LDAP. Basically we would like to give access of role creation to a subadmin rather then set it up in LDAP, but at the same time we would like users to get authenticated via LDAP, because we want to use Single Sign On.
    So basically the solution that I am looking for is following:
    1) Users get Authenticated ONLY via LDAP. No group mappings or filtering needs to be done (Use Group Filtering/Use Full Group Names in LDAP provider are NOT checked)
    2) Setup user's roles/groups within UCM by a Sub Admin.
    Basically what I would like to do is that we can have several websites in our UCM and each website can have Subadmins who can give/remove permission for users that reside in UCM (External/Internal anyone). Moreover I would like to give subadmins only rights to there OWN Website and they should not be allowed to do any administration work for other websites that they are not sub admin for. Also, none of the users/subadmins can see any search results from any other website data that they do not have permission for.
    This is a little complex requirement, first I do not know if UCM is capable of this, second I am a newbie with UCM, I have worked with Documentum in the past, so any suggestion is very welcome. Thanks!

  • Regarding Time management in HR

    Hi Experts,
                     I am new to HR-Abap, Can any body give brief idea about time management in hr in Techincal point of view .
    Thanks and regards,
    Sravanthi.

    Hi
    In time related infotypes records are multiple  for a single pernr
    say for example LEAVES
    within a time  for PERNR you will find different types of leaves
    go and see the infotypes data practically PA2001 and PA2005, r etc
    see the sample report on time related data
    REPORT zh_absence_quota
           NO STANDARD PAGE HEADING
           MESSAGE-ID zh_msg
           LINE-SIZE 169
           LINE-COUNT 60(1).
                   T A B L E S  D E C L A R A T I O N S
    TABLES:    pernr,    " Logical PNP
               t001p,    " Personnel Subarea
               t529u,    " Employment Status
               t500p,    " Personnel Area
               t501,     " Employee Group
               t503k,    " Employee Subgroup
               t549a,    " Payroll Area
               t554s,    " Absence Type
               t554t,    " Absence Type Texts
               t556a,    " Quota Type
               t527x,    " Orgn. Unit
               t556b,    " Quota Type Text
               pa0003.   " Payroll Status
    INFOTYPES:
               0000,   " Actions
               0001,   " Organizational Assignment
               2006,   " Absence Quota
               2001.   " Absences
                   T Y P E S  D E C L A R A T I O N S
    Employee Absence Structure
    TYPES: BEGIN OF s_2001,
             pernr TYPE persno,       " Personal Number
             awart TYPE awart,        " Absence Type
             subty TYPE subty,        " Sub Type
             endda TYPE endda,        " End date
             begda TYPE begda,        " Begin date
             abrtg TYPE abrtg,        " Absence days
             ename TYPE emnam,        " employee Name
             atext TYPE abwtxt,       " Absence Type Text
           END OF s_2001.
    Employee Absence Quota Structure
    TYPES: BEGIN OF s_2006,
             pernr TYPE persno,       " Personal Number
             ktart TYPE abwko,        " Absence Quota Type
             year(4) TYPE n,          " Year
             subty TYPE subty,        " Sub Type
             endda TYPE endda,        " End date
             begda TYPE begda,        " Begin date
             anzhl TYPE ptm_quonum,   " Absence Entitlement days
             ename TYPE emnam,        " employee Name
             ktext TYPE kotxt,        " Absence Type Text
             kverb TYPE kverb,        " Deduction Quota days
             anzhb TYPE ptm_quonum,   " Balance days
           END OF s_2006.
    Combined Employee Absence and Quota Structure
    TYPES: BEGIN OF s_rep,
             pernr TYPE persno,       " Personal Number
             ktart TYPE abwko,        " Absence Quota Type
             year(4) TYPE n,          " Year
             anzhl TYPE ptm_quonum,   " Absence Entitlement days
             kverb TYPE kverb,        " Deduction Quota days
             anzhb TYPE ptm_quonum,   " Balance days
             ktext TYPE kotxt,        " Quota Type Text
             awart TYPE awart,        " Absence Type
             abrtg TYPE abrtg,        " Absence days
             ename TYPE emnam,        " employee Name
             atext TYPE abwtxt,       " Absence Type Text
             endda TYPE endda,        " End date
             begda TYPE begda,        " Begin date
           END OF s_rep.
    Declaration of Variables
    DATA : gv_atext TYPE abwtxt,              " Absence Type Text
           gv_ktext TYPE kotxt,               " Absence Type Text
           gv_title1   TYPE sylisel,          " Report title
           gv_year(4)  TYPE c,                " Year
           gv_mon(2)   TYPE c,                " Month
           gv_hrs    TYPE abwtg,              " Hours
           gv_date   TYPE sydatum,            " Date
           gv_date1  TYPE sydatum,            " Date
           gv_dial.                           " Color flag
    Declaration of Constants
    CONSTANTS :
      c_x      TYPE c VALUE 'X',               " Sign
      c_1      TYPE persg   VALUE '1',         " Emp Group
      c_pernr(8) TYPE n VALUE '00000000',      " Pernr
      c_moabw  TYPE moabw   VALUE '01',        " Per SA Grouping
      c_mozko  TYPE mozko   VALUE '01',        " Per SA Grouping
      c_mopgk  TYPE mopgk   VALUE '1',         " Emp SGrp Grouping
      c_endda  TYPE sydatum VALUE '99991231',  " End Date
      c_val1(2) TYPE c VALUE '31',             " Date Type
      c_val2(2) TYPE c VALUE '12',             " Date Type
      c_val    LIKE p0041-dar01 VALUE '01',    " Date Type
      c_date1  LIKE sy-datum VALUE '18000101'. " Date
         I N T E R N A L  T A B L E S  D E C L A R A T I O N S
    DATA: i_2001 TYPE STANDARD TABLE OF s_2001 WITH HEADER LINE,
          i_2006 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
          i_rep1 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
          i_rep  TYPE STANDARD TABLE OF s_rep WITH HEADER LINE.
                     S E L E C T I O N  S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_ktart FOR t556a-ktart,  " Absence Quota Type
                    s_awart FOR t554s-subty.  " Absence Type
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) text-003.   " Quota & Absence
    PARAMETERS: p_qa RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) text-004.   " Quota
    PARAMETERS: p_q RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) text-005.   " Absence
    PARAMETERS: p_a RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF LINE.SELECTION-SCREEN END OF BLOCK b2.
                      I N I T I A L I Z A T I O N                        *
    INITIALIZATION.
                  A T  S E L E C T I O N - S C R E E N                   *
    AT SELECTION-SCREEN.
    Validate the screen fields
      PERFORM validate_screen.
                   S T A R T - O F - S E L E C T I O N                   *
    START-OF-SELECTION.
    Selection of Period
      PERFORM get_period.
    Get PERNR from LDB
    GET pernr.
      IF p0000-stat2 <> '0'.
    Get the data from PA0001,PA2001, PA2006
        PERFORM get_pers_data.
      ENDIF.
                   T O P - O F - P A G E                                 *
    TOP-OF-PAGE.
    Header of the List
      PERFORM header.
                   E N D - O F - P A G E                                 *
    Footer
    END-OF-PAGE.
      IF p_qa = c_x.
    Display both Absence and Quota Data
        WRITE /1(188) sy-uline.
      ELSEIF p_q = c_x.
    Display only Quota Data
        WRITE /1(114) sy-uline.
      ELSEIF p_a = c_x.
    Display only Absence Data
        WRITE /1(125) sy-uline.
      ENDIF.
                   E N D - O F - S E L E C T I O N                       *
    END-OF-SELECTION.
    Combine the Absence and Quota Data
      PERFORM append_data.
      IF p_qa = c_x.
    Display both Absence and Quota Data
        PERFORM display_qa_data.
      ELSEIF p_q = c_x.
    Display only Quota Data
        PERFORM display_q_data.
      ELSEIF p_a = c_x.
    Display only Absence Data
        PERFORM display_a_data.
      ENDIF.
    *&      Form  validate_screen
    Validation of Selection Screen fields
    FORM validate_screen .
    Validation of Personnel Number
      CLEAR pa0003.
      IF NOT pnppernr[] IS INITIAL.
        SELECT pernr
        FROM pa0003 UP TO 1 ROWS
          INTO pa0003-pernr
          WHERE pernr IN pnppernr.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Personnel Number'(006).
        ENDIF.
      ENDIF.
    Validation of Employee Status
      CLEAR t529u.
      IF NOT pnpstat2[] IS INITIAL.
        SELECT SINGLE statv
          INTO t529u-statv
          FROM t529u
          WHERE statv IN pnpstat2 AND
                statn = '2' AND
                sprsl = sy-langu.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Invalid Employee Status'(007).
        ENDIF.
      ENDIF.
    Validation of Personnel Area
      CLEAR t500p.
      IF NOT pnpwerks[] IS INITIAL.
        SELECT persa
        FROM t500p UP TO 1 ROWS
          INTO t500p-persa
          WHERE persa IN pnpwerks.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Personnel Area'(008).
        ENDIF.
      ENDIF.
    Validation of Personnel Sub Area
      CLEAR t001p.
      IF NOT pnpbtrtl[] IS INITIAL.
        SELECT btrtl
        FROM t001p UP TO 1 ROWS
          INTO t001p-btrtl
          WHERE btrtl IN pnpbtrtl.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Personnel Sub Area'(009).
        ENDIF.
      ENDIF.
    Validation of Employee Group
      CLEAR t501.
      IF NOT pnppersg[] IS INITIAL.
        SELECT persg
        FROM t501 UP TO 1 ROWS
          INTO t501-persg
          WHERE persg IN pnppersg.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Employee Group'(010).
        ENDIF.
      ENDIF.
    Validation of Employee Sub Group
      CLEAR t503k.
      IF NOT pnppersk[] IS INITIAL.
        SELECT persk
        FROM t503k UP TO 1 ROWS
          INTO t503k-persk
          WHERE persk IN pnppersk.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Employee Sub Group'(011).
        ENDIF.
      ENDIF.
    Validation of Payroll Area
      CLEAR t549a.
      IF NOT pnpabkrs[] IS INITIAL.
        SELECT abkrs
        FROM t549a UP TO 1 ROWS
          INTO t549a-abkrs
          WHERE abkrs IN pnpabkrs.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Employee Payroll Area'(026).
        ENDIF.
      ENDIF.
    Validation of Absence Type
      CLEAR t554s.
      IF NOT s_awart[] IS INITIAL.
        SELECT subty
        FROM t554s UP TO 1 ROWS
          INTO t554s-subty
          WHERE subty IN s_awart AND
                moabw EQ c_moabw AND
                endda EQ c_endda.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Employee Absence Type'(012).
        ENDIF.
      ENDIF.
    Validation of Absence Quota Type
      CLEAR t556a.
      IF NOT s_ktart[] IS INITIAL.
        SELECT ktart
        FROM t556a UP TO 1 ROWS
          INTO t556a-ktart
          WHERE ktart IN s_ktart AND
                mopgk EQ c_mopgk AND
                mozko EQ c_mozko AND
                endda EQ c_endda.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e999 WITH 'Incorrect Employee Quota Type'(013).
        ENDIF.
      ENDIF.
    ENDFORM.                  "validate_screen
    *&      Form  get_period
    Get the Correct Period based on Selection screen selection
    FORM get_period.
      CLEAR: gv_year,gv_mon, gv_date, gv_date1.
      gv_year = sy-datum+0(4).
      gv_mon  = sy-datum+4(2).
      IF pnptimr1 = c_x.      " Current Date
        pnpbegda = sy-datum.
        pnpendda = sy-datum.
      ELSEIF pnptimr2 = c_x.  " Current Month
        CONCATENATE gv_year gv_mon c_val INTO gv_date.
        CONCATENATE gv_year gv_mon c_val1 INTO gv_date1.
        pnpbegda = gv_date.
        pnpendda = gv_date1.
      ELSEIF pnptimr3 = c_x.  " Current Year
        CONCATENATE gv_year c_val c_val INTO gv_date.
        CONCATENATE gv_year c_val2 c_val1 INTO gv_date1.
        pnpbegda = gv_date.
        pnpendda = gv_date1.
      ELSEIF pnptimr4 = c_x.  " Upto Today
        pnpbegda = c_date1.
        pnpendda = sy-datum.
      ELSEIF pnptimr5 = c_x.  " From Today
        pnpbegda = sy-datum.
        pnpendda = c_endda.
      ELSE.
        IF ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
          pnpbegda = c_date1.
          pnpendda = c_endda.
        ELSEIF pnpbegda IS INITIAL AND NOT pnpendda IS INITIAL.
          pnpbegda = c_date1.
          pnpendda = pnpendda.
        ELSEIF NOT ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
          pnpbegda = pnpbegda.
          pnpendda = pnpendda.
        ENDIF.
      ENDIF.
    ENDFORM.              "get_period
    *&      Form  get_pers_data
    Get the Absence and Quota Data from PA0001,PA2001,PA2006
    FORM get_pers_data.
      DATA: lv_year1(4) TYPE n,
            lv_year2(4) TYPE n,
            lv_date1 TYPE sydatum,
            lv_date2 TYPE sydatum,
            lv_anzhb TYPE ptm_quonum.   " Last Year Balance days
    Get data from Respective Infotypes
      rp_provide_from_last p0001 space pnpbegda pnpendda.
    Absence Data
      LOOP AT p2001 WHERE pernr = pernr-pernr AND
                          begda GE pnpbegda   AND
                          endda LE pnpendda.
        IF p2001-awart IN s_awart.
          i_2001-pernr    = pernr-pernr.
          i_2001-subty    = p2001-subty.
          i_2001-awart    = p2001-awart.
          i_2001-abrtg    = p2001-abrtg.
          i_2001-begda    = p2001-begda.
          i_2001-endda    = p2001-endda.
          READ TABLE p0001 WITH KEY pernr = p2001-pernr.
          i_2001-ename    = p0001-ename.
    Get the Absence Type Text
          CLEAR gv_atext.
          SELECT SINGLE atext INTO gv_atext FROM t554t
                  WHERE sprsl = sy-langu AND
                        moabw = c_moabw  AND
                        awart = p2001-awart.
          IF sy-subrc = 0.
            i_2001-atext = gv_atext.
          ENDIF.
          APPEND i_2001.
          CLEAR i_2001.
        ENDIF.
      ENDLOOP.
    Quota Data
      LOOP AT p2006 WHERE pernr = pernr-pernr AND
                          begda GE pnpbegda   AND
                          endda LE pnpendda.
        IF p2006-ktart IN s_ktart.
          i_2006-pernr    = pernr-pernr.
          i_2006-subty    = p2006-subty.
          i_2006-begda    = p2006-begda.
          i_2006-endda    = p2006-endda.
          i_2006-year     = p2006-endda+0(4).
          i_2006-ktart    = p2006-ktart.
          i_2006-anzhl    = p2006-anzhl.
          i_2006-kverb    = p2006-kverb.
          i_2006-anzhb    = p2006-anzhl - p2006-kverb.
          READ TABLE p0001 WITH KEY pernr = p2001-pernr.
          i_2006-ename    = p0001-ename.
    Get the Quota Type Text
          CLEAR gv_ktext.
          SELECT SINGLE ktext INTO gv_ktext FROM t556b
                  WHERE sprsl = sy-langu AND
                        mopgk = c_mopgk  AND
                        mozko = c_mozko  AND
                        ktart = p2006-ktart.
          IF sy-subrc = 0.
            i_2006-ktext = gv_ktext.
          ENDIF.
          APPEND i_2006.
          CLEAR i_2006.
        ENDIF.
      ENDLOOP.
    For Vacation Quota (80) get the Balance of the Last Year and
    add to the Current Year Quota
      LOOP AT i_2006.
        IF i_2006-ktart = '80'.
          lv_year1 = i_2006-endda+0(4).
          lv_year2 = lv_year1 - 1.
          CONCATENATE lv_year2 '01' '01' INTO lv_date1.
          CONCATENATE lv_year2 '12' '31' INTO lv_date2.
          LOOP AT p2006 WHERE pernr = i_2006-pernr AND
                              begda GE lv_date1    AND
                              endda LE lv_date2    AND
                              ktart = '80'.
            lv_anzhb = p2006-anzhl - p2006-kverb.
            i_rep1-pernr = i_2006-pernr.
            i_rep1-ktext = i_2006-ktext.
            i_rep1-anzhl = p2006-anzhl.
            i_rep1-kverb = p2006-kverb.
            i_rep1-ename = i_2006-ename.
            i_rep1-begda = p2006-begda.
            i_rep1-endda = p2006-endda.
            i_rep1-anzhb = lv_anzhb.
            i_rep1-ktart = '80'.
            i_rep1-year = lv_year2.
            APPEND i_rep1.
            CLEAR: i_rep1.
          ENDLOOP.
        ENDIF.
        CLEAR: lv_year1, lv_year2,
               lv_date1, lv_date2,lv_anzhb.
      ENDLOOP.
      SORT i_rep1 BY pernr ktart.
    ENDFORM.          "get_pers_data
    *&      Form  append_data
    Put the Absence and Quota Data into one Report Int Table
    FORM append_data.
      CLEAR:   i_rep.
      REFRESH: i_rep.
      SORT i_2001 BY pernr awart.
      SORT i_2006 BY pernr ktart year.
    Move I_REP1 data into i_2006
      LOOP AT i_rep1.
        MOVE-CORRESPONDING i_rep1 TO i_2006.
        APPEND i_2006.
        CLEAR  i_2006.
      ENDLOOP.
    Move the Absence and Quota Data into a final Int Table
      LOOP AT i_2006.
        i_rep-pernr = i_2006-pernr.
        i_rep-ename = i_2006-ename.
        i_rep-ktart = i_2006-ktart.
        i_rep-anzhl = i_2006-anzhl.
        i_rep-kverb = i_2006-kverb.
        i_rep-ktext = i_2006-ktext.
        i_rep-anzhb = i_2006-anzhb.
        i_rep-year  = i_2006-year.
        CLEAR i_2001.
        CASE i_2006-ktart.
          WHEN '81'.
            PERFORM get_2001 USING i_2006-pernr '1000' i_2006-year.
          WHEN '50'.
            PERFORM get_2001 USING i_2006-pernr '1002' i_2006-year.
          WHEN '80'.
            PERFORM get_2001 USING i_2006-pernr '1001' i_2006-year.
          WHEN '56'.
            PERFORM get_2001 USING i_2006-pernr '1003' i_2006-year.
          WHEN '51'.
            PERFORM get_2001 USING i_2006-pernr '1004' i_2006-year.
          WHEN '52'.
            PERFORM get_2001 USING i_2006-pernr '1005' i_2006-year.
          WHEN '54'.
            PERFORM get_2001 USING i_2006-pernr '1006' i_2006-year.
          WHEN '53'.
            PERFORM get_2001 USING i_2006-pernr '1007' i_2006-year.
          WHEN '55'.
            PERFORM get_2001 USING i_2006-pernr '1008' i_2006-year.
          WHEN '57'.
            PERFORM get_2001 USING i_2006-pernr '1009' i_2006-year.
          WHEN '90'.
            PERFORM get_2001 USING i_2006-pernr '2000' i_2006-year.
          WHEN '58'.
            PERFORM get_2001 USING i_2006-pernr '2001' i_2006-year.
          WHEN '59'.
            PERFORM get_2001 USING i_2006-pernr '2002' i_2006-year.
          WHEN '91'.
            PERFORM get_2001 USING i_2006-pernr '2003' i_2006-year.
        ENDCASE.
        IF sy-subrc <> 0.
          APPEND i_rep.
        ENDIF.
        CLEAR i_rep.
      ENDLOOP.
      SORT i_rep BY pernr ktart year.
      DELETE i_rep WHERE pernr = ' '.
    ENDFORM.              " append_data
    *&      Form  display_qa_data
    Display the Absence and Quota Data
    FORM display_qa_data.
      DATA: lv_flag,                   " New Flag
            lv_tot2 TYPE ptm_quonum.   " Absence Balance days
      IF i_rep[] IS INITIAL.
        MESSAGE i000 WITH 'No Data found'(014).
      ELSE.
        LOOP AT i_rep.
    toggle color
          PERFORM toggle_color.
          IF lv_flag <> space.
            NEW-LINE.
          ENDIF.
          AT NEW pernr.
            READ TABLE i_rep INDEX sy-tabix.
            WRITE:/1 sy-vline,2(8) i_rep-pernr,
              10 sy-vline,11(40)   i_rep-ename.
          ENDAT.
          AT NEW ktart.
            READ TABLE i_rep INDEX sy-tabix.
            WRITE: 1 sy-vline, 10 sy-vline,
              51 sy-vline,52(25)   i_rep-ktext.
          ENDAT.
          AT NEW year.
            READ TABLE i_rep INDEX sy-tabix.
            WRITE: 1 sy-vline, 10 sy-vline,
                  51 sy-vline,
                  77 sy-vline, 78(4)  i_rep-year,
                  82 sy-vline, 83(11) i_rep-anzhl,
                  94 sy-vline, 95(25) i_rep-atext,
                 120 sy-vline,133 sy-vline,
                 144 sy-vline,
                 155 sy-vline,156(13)  i_rep-anzhb,
                 169 sy-vline.
          lv_tot2 = lv_tot2 + i_rep-anzhb.
          ENDAT.
          WRITE: 1 sy-vline,  10 sy-vline,
                51 sy-vline,  77 sy-vline,
                82 sy-vline,  94 sy-vline,
               120 sy-vline,121(12)  i_rep-abrtg NO-ZERO,
               133 sy-vline,134(10)  i_rep-begda NO-ZERO,
               144 sy-vline,145(10)  i_rep-endda NO-ZERO,
               155 sy-vline,169 sy-vline.
          NEW-LINE.
          AT END OF pernr.
            WRITE  : /1(169) sy-uline.
            SUM.
            FORMAT COLOR 3.
            WRITE:/1 sy-vline,   10 sy-vline,
                  51 sy-vline,   77 sy-vline,
                  82 sy-vline,   94 sy-vline,
                 120 sy-vline,121(12) i_rep-abrtg,
                 133 sy-vline,144 sy-vline,
                 155 sy-vline, 156(13) lv_tot2,
                 169 sy-vline.
            FORMAT COLOR OFF.
            WRITE  : /1(169) sy-uline.
            CLEAR lv_tot2.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.              " display_qa_data
    *&      Form  display_q_data
    Display only the Quota Data
    FORM display_q_data.
      DATA: lv_flag.               " New Flag
      SORT i_2006 BY pernr ktart year.
      IF i_2006[] IS INITIAL.
        MESSAGE i000 WITH 'No Data found'(014).
      ELSE.
        LOOP AT i_2006.
    Toggle Color
          PERFORM toggle_color.
          IF lv_flag <> space.
            NEW-LINE.
          ENDIF.
          AT NEW pernr.
            READ TABLE i_2006 INDEX sy-tabix.
            WRITE: /1 sy-vline,  2(8)  i_2006-pernr,
                   10 sy-vline,11(40)  i_2006-ename.
          ENDAT.
          AT NEW ktart.
            READ TABLE i_2006 INDEX sy-tabix.
            WRITE: 1 sy-vline,10 sy-vline,
                  51 sy-vline,52(25)  i_2006-ktext.
          ENDAT.
          AT NEW year.
            READ TABLE i_2006 INDEX sy-tabix.
            WRITE: 1 sy-vline,  10 sy-vline,
                  51 sy-vline,
                  77 sy-vline,78(4)  i_2006-year,
                  82 sy-vline,83(11) i_2006-anzhl,
                  94 sy-vline,95(13) i_2006-anzhb,
                 108 sy-vline.
            NEW-LINE.
          ENDAT.
          AT END OF pernr.
            WRITE  : /1(108) sy-uline.
            SUM.
            FORMAT COLOR 3.
            WRITE: /1 sy-vline, 10 sy-vline,
                   51 sy-vline,
                   77 sy-vline, 82 sy-vline,
                   94 sy-vline, 95(13) i_2006-anzhb,
                  108 sy-vline.
            FORMAT COLOR OFF.
            WRITE  : /1(108) sy-uline.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.              " display_q_data
    *&      Form  display_a_data
    Display Only the Absence Quota
    FORM display_a_data.
      DATA: lv_flag.               " New Flag
      SORT i_2001 BY pernr awart.
      IF i_2001[] IS INITIAL.
        MESSAGE i000 WITH 'No Data found'(014).
      ELSE.
        LOOP AT i_2001.
    Toggle Color
          PERFORM toggle_color.
          IF lv_flag <> space.
            NEW-LINE.
          ENDIF.
          AT NEW pernr.
            READ TABLE i_2001 INDEX sy-tabix.
            WRITE: /1 sy-vline, 2(10) i_2001-pernr,
                   10 sy-vline,11(40) i_2001-ename.
          ENDAT.
          WRITE:  1 sy-vline, 10 sy-vline,
                  51 sy-vline,52(25) i_2001-atext,
                  77 sy-vline,78(12) i_2001-abrtg,
                  90 sy-vline,91(10) i_2001-begda,
                 101 sy-vline,102(10) i_2001-endda,
                 112 sy-vline.
          NEW-LINE.
          AT END OF pernr.
            WRITE  : /1(112) sy-uline.
            SUM.
            FORMAT COLOR 3.
            WRITE: /1 sy-vline, 10 sy-vline,
                   51 sy-vline,
                   77 sy-vline,78(12) i_2001-abrtg,
                   90 sy-vline,101 sy-vline,
                  112 sy-vline.
            FORMAT COLOR OFF.
            WRITE  : /1(112) sy-uline.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.              " display_a_data
    *&      Form  header
    Write the Report Header
    FORM header .
      data : lv_pers type pbtxt,
             lv_orgn type orgtx.
      gv_title1 = sy-title.              " Set List Header
      IF p_qa = c_x.
        NEW-PAGE LINE-SIZE 193.
      ELSEIF p_a = c_x.
        NEW-PAGE LINE-SIZE 125.
      ELSEIF p_q = c_x.
        NEW-PAGE LINE-SIZE 119.
      ENDIF.
    Standard header
      FORMAT RESET.
      CALL FUNCTION 'Z_STANDARD_HEADER'
        EXPORTING
          title1 = gv_title1.
    Get the Personal Area and Org.Unit Texts
      clear : lv_pers,lv_orgn.
      select single name1 into lv_pers
        from t500p where persa = pnpwerks-low.
      select single orgtx into lv_orgn
        from t527x where sprsl = sy-langu and
                         orgeh = pnporgeh-low and
                         endda = c_endda.
      if not lv_pers is initial.
        write : /2 'Personal Area:'(017), 17(25) lv_pers color 7.
      endif.
      if not lv_orgn is initial.
        write : /2 'Organization Unit:'(021), 20(25) lv_orgn color 3.
      endif.
      IF p_qa = c_x.
        FORMAT COLOR COL_HEADING.
        WRITE  : /1(169) sy-uline.
        WRITE:/1 sy-vline,2(8)    'Emp.No'(015) CENTERED,
              10 sy-vline,11(40)  'Employee Name'(016) CENTERED,
              51 sy-vline,52(25)  'Quota Description'(018) CENTERED,
              77 sy-vline,78(4)   'Year'(027),
              82 sy-vline,83(11)  'Entitlement'(019),
              94 sy-vline,95(25)  'Absence Description'(022) CENTERED,
             120 sy-vline,121(12) 'Absence days'(023),
             133 sy-vline,134(10) 'From Date'(024),
             144 sy-vline,145(10) 'To Date'(025),
             155 sy-vline,156(13) 'Quota Balance'(020),
             169 sy-vline.
        WRITE  : /1(169) sy-uline.
      ELSEIF p_q = c_x.
        FORMAT COLOR COL_HEADING.
        WRITE  : /1(108) sy-uline.
        WRITE:/1 sy-vline,2(8)   'Emp.No'(015) CENTERED,
              10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
              51 sy-vline,52(25) 'Quota Description'(018) CENTERED,
              77 sy-vline,78(4)  'Year'(027),
              82 sy-vline,83(11) 'Entitlement'(019),
              94 sy-vline,95(13) 'Quota Balance'(020),
             108 sy-vline.
        WRITE  : /1(108) sy-uline.
      ELSEIF p_a = c_x.
        FORMAT COLOR COL_HEADING.
        WRITE  : /1(112) sy-uline.
        WRITE:/1 sy-vline,2(8)    'Emp.No'(015) CENTERED,
              10 sy-vline,11(40)  'Employee Name'(016) CENTERED,
              51 sy-vline,52(25)  'Absence Description'(022) CENTERED,
              77 sy-vline,78(12)  'Absence days'(023),
              90 sy-vline,91(10)  'From Date'(024),
             101 sy-vline,102(10) 'To Date'(025),
             112 sy-vline.
        WRITE  : /1(112) sy-uline.
      ENDIF.
    ENDFORM.                    " header
    *&      Form  toggle_color
    This routine alters the color of the records in the list
    FORM toggle_color.
      IF gv_dial = space.
        FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
        gv_dial = c_x.
      ELSE.
        FORMAT COLOR 1 INTENSIFIED OFF.
        CLEAR gv_dial.
      ENDIF.
    ENDFORM.                    " toggle_color
    *&      Form  get_2001
    Get the ABsence type for each Quota type
    FORM get_2001 USING p_pernr TYPE persno
                        p_value TYPE awart
                        p_year.
      LOOP AT i_2001 WHERE pernr = p_pernr AND
                           awart = p_value AND
                           endda+0(4) = p_year.
        i_rep-awart = i_2001-awart.
        i_rep-abrtg = i_2001-abrtg.
        i_rep-atext = i_2001-atext.
        i_rep-begda = i_2001-begda.
        i_rep-endda = i_2001-endda.
        APPEND i_rep.
      ENDLOOP.
    ENDFORM.                                                    " get_2001
    Regards
    anji

  • Small Case Study

    I have one small case study that I am trying to solve to understand the dimensioanl data modeling concept better.
    We deal with lots of small securities (loans) everyday. We generate Time Series reports from this data, most of the times we look at Market Values and Duration of the securities at aggregated level.
    Everyday we get thousands of securities, each having a type, category, coupon and an amount. E.g.
    Sec Id Type Category Coupon Amount Date
    100 Arm SF_ARMS 5.0 $1200 04/27/05
    101 Arm SF_ARMS_TREASURY5.5 $2000 04/27/05
    102 Fixed SHORT_TERM 5.5 $1800 04/27/05
    103 Fixed LONG_TERM 6.0 $1000 04/27/05
    Sec Id Market_Value Duration Market Calc Batch Date
    100 1350 3.12 M1 C1 B1 04/28/05
    101 2100 2.5 M2 C1 B1 04/28/05
    102 1900 3.0 M1 C1 B1 04/28/05
    103 1100 2.7 M1 C1 B1 04/28/05
    I have to produce a report like this:
    Market Value Duration
    Arm
    SF_ARMS X X
    SF_ARMS_TREASURY X X
    Fixed
    SHORT_TERM X X
    LONG_TERM X X
    My questions are:
    1) Dimensions I have identified are: Securities, Market, Calculator, Batch, Time.
    2) Do we need two separate fact tables for Market value and Duration ? Or they can be in one ?
    3) Should Amount and coupon be security attributes or sit in a separate fact table. According to one book any numerical values should go into a fact table.
    4) What about Type and Category, are these attributes of Security Dimension.
    Any guidance in this direction will be highly appreciated.
    Shalu

    Shalu, here are a few more items to consider. I'll take a stab at these because I'm currently working on a similar investments cube (though with a lot more dimensions)
    - Market value and duration can go into a single fact table if they share the same dimensionality (as noted). Not sure of your application, but are you trying to do any market rate scenario analysis (i.e. what happens if the yield curve shifts up 50 b.p. or down 50 b.p.)? If so, then some variables (duration, avg life, convexity) will need to be dimensioned by scenario, while others (book value, for instance) do not fluctuate based on the scenario and therefore would be in a different cube.
    - Amount and Coupon rate should probably not be stored in the fact table. Having said this, you have several options:
    1) store as attributes in the securities dimension
    Pros: easy for users to select all securities that match a given amount or coupon rate
    Cons: Difficult to band these together on a report or to aggregate the totals (i.e. total market value of all securities in the 4.00 - 4.99% coupon rate band)
    2) store as hierarchies in the securities dimension
    Pros: both amt and coupon could be banded and summarized over the hierarchy, making banding reports very easy to do
    Cons: Difficult to impossible to easily show BOTH amount bands and coupon bands on a single report, since one OLAP query will only allow one hierarchy to be selected
    3) store as separate dimensions outside of securities
    Pros: easy to band, can show both bands simultaneously on a report
    Cons: creates 2 more dimensions that increases cube size (although you will find the new "compressed composites" in 10g work wonders on this)
    Note that all these points also apply to your #4 re: type and category.
    Just because I'm curious, what information do your dimensions "calculator", "batch", and "time" provide?
    Thanks,
    Scott

  • Positive & Negative Time Management

    Dear Seniors,
    What is positive & negative time management? Which time management status do we use for these?
    What r time pairs & where can these be configured?
    Thx & Regards
    WARNED-> No more basic questions please.

    Hi,
    Positive time is plays the total role of workflow. All the processes related to time are automatically gets executed in the background. E.g., in our case it is done only partially to validate the attendance as per punches and other documents with shift timing and generate absence automatically in case of any discrepancy.
    .Negative Time (-ve Time) ? Where the all time related activities like validation of the attendance, posting of absence for wage deduction etc are done manually. It has less level of integration among the different components of time management.
    Positive Time Management we have two types of recordings:
    1. With Clock times - Complete time recording is captured
    2. With out Clock times - Only Number of hourse worked is captured
    Negative time Management:
    1. No clock times and assumed employee is working unless and until his or her absences are entered.
    Regards,
    Tarun

Maybe you are looking for