Need a tip for a Fieldpoint program

Hi,
I have a main program which includes several subprograms. The used hardware is Fieldpoint. (several AI)
All subprograms uses different channels of those AI.
What is the better way to deal with this AI:
- reading all AI's (with "fp read") in a array and reading parts of the array in the subprograms
- or reading appropriated AI's in the subprograms separatedly (with "fp read")
Thanks for any hint
Yves

Hi Yves,
This code is not FP specific, but it demostrates one of the thing you can set up with FGVs.
Note that in your case, a cluster or an array, or maybe an cluster with one array for each AI module would do the job inside of the FGV.
Feel free to ask any question
Message Edité par TiTou le 11-09-2006 02:18 PM
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Attachments:
SR.zip ‏42 KB

Similar Messages

  • Tips for a workflow program

    Hi all!
    As always I post here when I feel I need a good advice. Today at work my boss told some of us that we need some kind of workflow editor, since all of our projects to date are requiring it and he would like to "automatize" some of the process.
    As of now, all the workflow is done through databases. For example in any web app first we make a login form and based in the user/pass decide what components appear at the menu or what page gets displayed next.
    What we want to do is a system to define the workflow for different users, so roles could be created and every role can have different workflows through the assets (in this case web pages only). Once all the paths have been laid out, based in your current role the system would validate your request of a given page.
    I started to google around for clues in order to get an idea of such a system and came up with Enhydra Shark workflow server. Looking the documentation it seems it's similar of what we need. It would be great to deploy such a tool since it's pure Java, open source and it has a graphical workflow editor written in java also.
    The problem is that it seems something like overkill for the problem we are trying to solve. Our needs only include permissions of different people accesing a web app which is currently done with databases.
    Does our problem justify the deployment of a tool like Shark server? could a simple app be done in like 3 or 4 days to address our needs (with 3 ppl working on it) ?? Do you have any ideas of how such a system would work ??
    Thanks a lot for any pointers on these questions.
    btw the url for Enhydra Shark server is: http://shark.objectweb.org/

    Lynda,
    are there any tips for a beginner?
    First tip is to forget that you are a beginner. This will allow you to:
    Start imagining your first site and looking round at other sites in a relaxed way to decide how you wish it to appear and work (so you and the visitors are happy), how you can make it unique (so it will stand out and be (re)visited (by) more).
    When you have a strong image of your first site, you may start working on it and decide the tools to serve that purpose, without having been trapped unnecessarily in what you have seen elsewhere and in the predominant uses and seeming limitations of the tools.
    I hope this is not too far out.
    Padding/Margin are just minor tools to adapt to the overall size/size of the contents, in other words, whether you work from the element boundary in/out (in the former case it only takes up its own space as specified, in the latter it takes up its own space and the margin.

  • Need some tips for premiere cs6 video editing

    I have recorded professionally in a sound proof room with a microphone mc's, it's really good video quality and the sound quality is perfect too.
    I have recorded with 2 different devices at different angles i'm going to remove sound from both video clips and use the recorded mp3 file made in Adobe Audition CS6 (amazing program) I want to have the 2nd angle recording put in the video so it shows the main video then the 2nd in a little box in the top corner, how can i do this?
    Also any tips people can suggest for me on Speedgrade CS6 or After effects CS6 that will improve the viewing experience will be very appreciated.
    Last thing playback in Premiere and after effects is very slow, no computer faults my laptop is extremely fast but one thing i've had this laptop about 8 months and not updates the graphics card, would it be that or is there a way to fix this? when i try playblack in after effects it says something like '0.9/29 frames (not real time), i downloaded quicktime i thought this was real time?
    Thank you in advanced

    Here are some Tutorials
    http://www.youtube.com/playlist?list=PL507B3498B4479B96&feature=plcp
    http://forums.adobe.com/thread/913334
    http://forums.adobe.com/thread/845731
    http://forums.adobe.com/message/3234794
    A "crash course" http://forums.adobe.com/thread/761834
    A Video Primer for Premiere http://forums.adobe.com/thread/498251
    Premiere Tutorial http://forums.adobe.com/thread/424009
    And http://forums.adobe.com/message/2738611
    And http://blogs.adobe.com/kevinmonahan/2012/08/28/free-video-tutorial-samples-from-learning-p remiere-pro-cs6/
    -and more from Kevin http://forums.adobe.com/message/4714153
    http://blogs.adobe.com/premiereprotraining/2010/06/video_tutorials_didacticiels_t.html
    And http://blogs.adobe.com/premiereprotraining/2010/06/how_to_search_for_premiere_pro.html
    And http://bellunevideo.com/tutlist.php
    Premiere Pro Wiki http://premierepro.wikia.com/wiki/Main_Page
    Tutorial http://www.tutorialized.com/tutorials/Premiere/1
    Tutorial http://www.dvxuser.com/V6/forumdisplay.php?f=21
    Tutorial HD to SD w/CS4 http://bellunevideo.com/tutorials/CS4_HD2SD/CS4_HD2SD.html
    Exporting to DVD http://help.adobe.com/en_US/premierepro/cs/using/WS3E252E59-6BE5-4668-A12E-4ED0348C3FDBa.h tml
    And http://help.adobe.com/en_US/premierepro/cs/using/WSCDE15B03-1236-483f-BBD4-263E77B445B9.ht ml
    Color correction http://forums.adobe.com/thread/892861
    After Effects Tutorials http://www.videocopilot.net/
    Surround Sound http://forums.adobe.com/thread/517372
    Photo Scaling for Video http://forums.adobe.com/thread/450798
    -Too Large May = Crash http://forums.adobe.com/thread/879967
    -And another crash report http://forums.adobe.com/thread/973935
    CS6 http://www.dvxuser.com/V6/showthread.php?282290-New-Tutorial-Working-Faster-in-Premiere-Pr o-CS6
    Video Scaling https://blogs.adobe.com/premiereprotraining/2010/10/scaling-in-premiere-pro-cs5.html
    Encore http://tv.adobe.com/show/learn-encore-cs4/
    Authoring http://www.videocopilot.net/tutorials/dvd_authoring/
    Encore Tutorial http://www.precomposed.com/blog/2009/05/encore-tutorial/
    And more Encore http://library.creativecow.net/articles/devis_andrew/
    Regions and NTSC vs PAL http://forums.adobe.com/thread/951042
    -and Regions http://forums.adobe.com/thread/895223
    PDF http://blogs.adobe.com/adobecustomersuccess/2011/05/14/help-support-pages-for-creative-sui te-applications/

  • SQL - Need Tunning tips for group by [LATEST EXECUTION PLAN IS ATTACHED]

    Hi All Experts,
    My SQL is taking so much time to execute. If I remove the group by clause it is running within a minute but as soon as I am putting sum() and group by clause it is taking ages to run the sql. Number of records are wihout group by clause is almost 85 Lachs (8 Million). Is hugh dataset is killing this? Is there any way to tune the data on Group by clause. Below is my Select hints and execution plan. Please help.
    SQL
    SELECT /*+ CURSOR_SHARING_EXACT gather_plan_statistics all_rows no_index(atm) no_expand
    leading (src cpty atm)
    index(bk WBKS_PK) index(src WSRC_UK1) index(acct WACC_UK1)
    use_nl(acct src ccy prd cpty grate sb) */
    EXECUTION PLAN
    PLAN_TABLE_OUTPUT
    SQL_ID 1y5pdhnb9tks5, child number 0
    SELECT /*+ CURSOR_SHARING_EXACT gather_plan_statistics all_rows no_index(atm) no_expand leading (src cpty atm) index(bk
    WBKS_PK) index(src WSRC_UK1) index(acct WACC_UK1) use_nl(acct src ccy prd cpty grate sb) */ atm.business_date,
    atm.entity legal_entity, TO_NUMBER (atm.set_of_books) setofbooksid, atm.source_system_id sourcesystemid,
    ccy.ccy_currency_code ccy_currency_code, acct.acct_account_code, 0 gl_bal, SUM (atm.amount)
    atm_bal, 0 gbp_equ, ROUND (SUM (atm.amount * grate.rate), 4) AS
    atm_equ, prd.prd_product_code, glacct.parentreportingclassification parentreportingclassification,
    cpty_counterparty_code FROM wh_sources_d src,
    Plan hash value: 4193892926
    | Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads | OMem | 1Mem | Used-Mem |
    | 1 | HASH GROUP BY | | 1 | 1 | 471 |00:31:38.26 | 904M| 76703 | 649K| 649K| 1149K (0)|
    | 2 | NESTED LOOPS | | 1 | 1 | 8362K|00:47:06.06 | 904M| 76703 | | | |
    | 3 | NESTED LOOPS | | 1 | 1 | 10M|00:28:48.84 | 870M| 17085 | | | |
    | 4 | NESTED LOOPS | | 1 | 1 | 10M|00:27:56.05 | 849M| 17084 | | | |
    | 5 | NESTED LOOPS | | 1 | 8 | 18M|00:14:10.93 | 246M| 17084 | | | |
    | 6 | NESTED LOOPS | | 1 | 22 | 18M|00:11:58.96 | 189M| 17084 | | | |
    | 7 | NESTED LOOPS | | 1 | 22 | 18M|00:10:24.69 | 152M| 17084 | | | |
    | 8 | NESTED LOOPS | | 1 | 1337 | 18M|00:06:00.74 | 95M| 17083 | | | |
    | 9 | NESTED LOOPS | | 1 | 1337 | 18M|00:02:52.20 | 38M| 17073 | | | |
    |* 10 | HASH JOIN | | 1 | 185K| 18M|00:03:46.38 | 1177K| 17073 | 939K| 939K| 575K (0)|
    | 11 | NESTED LOOPS | | 1 | 3 | 3 |00:00:00.01 | 11 | 0 | | | |
    | 12 | TABLE ACCESS BY INDEX ROWID | WH_SOURCES_D | 1 | 3 | 3 |00:00:00.01 | 3 | 0 | | | |
    |* 13 | INDEX RANGE SCAN | WSRC_UK1 | 1 | 3 | 3 |00:00:00.01 | 2 | 0 | | | |
    |* 14 | TABLE ACCESS BY INDEX ROWID | WH_COUNTERPARTIES_D | 3 | 1 | 3 |00:00:00.01 | 8 | 0 | | | |
    |* 15 | INDEX UNIQUE SCAN | WCPY_U1 | 3 | 1 | 3 |00:00:00.01 | 5 | 0 | | | |
    | 16 | PARTITION RANGE SINGLE | | 1 | 91M| 91M|00:00:00.08 | 1177K| 17073 | | | |
    |* 17 | TABLE ACCESS FULL | WH_ATM_BALANCES_F | 1 | 91M| 91M|00:00:00.04 | 1177K| 17073 | | | |
    |* 18 | TABLE ACCESS BY INDEX ROWID | WH_PRODUCTS_D | 18M| 1 | 18M|00:01:43.88 | 37M| 0 | | | |
    |* 19 | INDEX UNIQUE SCAN | WPRD_UK1 | 18M| 1 | 18M|00:00:52.13 | 18M| 0 | | | |
    |* 20 | TABLE ACCESS BY GLOBAL INDEX ROWID| WH_BOOKS_D | 18M| 1 | 18M|00:02:53.01 | 56M| 10 | | | |
    |* 21 | INDEX UNIQUE SCAN | WBKS_PK | 18M| 1 | 18M|00:01:08.32 | 37M| 10 | | | |
    |* 22 | TABLE ACCESS BY INDEX ROWID | T_SDM_SOURCEBOOK | 18M| 1 | 18M|00:03:43.66 | 56M| 1 | | | |
    |* 23 | INDEX RANGE SCAN | TSSB_N5 | 18M| 2 | 23M|00:01:11.50 | 18M| 1 | | | |
    |* 24 | TABLE ACCESS BY INDEX ROWID | WH_CURRENCIES_D | 18M| 1 | 18M|00:01:51.21 | 37M| 0 | | | |
    |* 25 | INDEX UNIQUE SCAN | WCUR_PK | 18M| 1 | 18M|00:00:49.26 | 18M| 0 | | | |
    | 26 | TABLE ACCESS BY INDEX ROWID | WH_GL_DAILY_RATES_F | 18M| 1 | 18M|00:01:55.84 | 56M| 0 | | | |
    |* 27 | INDEX UNIQUE SCAN | WGDR_U2 | 18M| 1 | 18M|00:01:10.89 | 37M| 0 | | | |
    | 28 | INLIST ITERATOR | | 18M| | 10M|00:22:40.03 | 603M| 0 | | | |
    |* 29 | TABLE ACCESS BY INDEX ROWID | WH_ACCOUNTS_D | 150M| 1 | 10M|00:20:19.05 | 603M| 0 | | | |
    |* 30 | INDEX UNIQUE SCAN | WACC_UK1 | 150M| 5 | 150M|00:10:16.81 | 452M| 0 | | | |
    | 31 | TABLE ACCESS BY INDEX ROWID | T_SDM_GLACCOUNT | 10M| 1 | 10M|00:00:50.64 | 21M| 1 | | | |
    |* 32 | INDEX UNIQUE SCAN | TSG_PK | 10M| 1 | 10M|00:00:26.17 | 10M| 0 | | | |
    |* 33 | TABLE ACCESS BY INDEX ROWID | WH_COMMON_TRADES_D | 10M| 1 | 8362K|00:18:52.56 | 33M| 59618 | | | |
    |* 34 | INDEX UNIQUE SCAN | WCTD_PK | 10M| 1 | 10M|00:03:06.56 | 21M| 5391 | | | |
    Edited by: user535789 on Mar 17, 2011 9:45 PM
    Edited by: user535789 on Mar 20, 2011 8:33 PM

    user535789 wrote:
    Hi All Experts,
    My SQL is taking so much time to execute. If I remove the group by clause it is running within a minute but as soon as I am putting sum() and group by clause it is taking ages to run the sql. Number of records are wihout group by clause is almost 85 Lachs (*8 Million*). Is hugh dataset is killing this? Is there any way to tune the data on Group by clause. Below is my Select hints and execution plan. Please help.I doubt that your 8 million records are shown within minutes.
    I guess that the output started after a few minutes. But this does not mean that the full resultset is there. It just means the database is able to return to you the first few records after a few minutes.
    Once you add a group by (or an order by) then this requires that all the rows need to be fetched before the database can start showing them to you.
    But maybe you could run some tests to compare the full output. I find it useful to SET AUTOTRACE TRACEONLY for such a purpose (in sql plus). This avoids to print the selection on the screen.

  • Need some tips for Database Developer Role.

    Dear All,
    Next week, I'm going to face an Interview for Database Developer role.
    For this, I need some more & useful information on these recommended points.
    1. Involve in a designing part of Data warehouse from
    scratch 
    2. Create complex analytic queries on large data sets.
    3. Analyse trends in key metrics.
    4. Monitoring and optimizing the performance of the database.
    Please help get the vital information on these points.
    All help will be highly appreciated.
    Thanks,

    1. Involve in a designing part of Data warehouse from
    scratch
    Design Database...
    This needs lot of information about business and its fonctionnalités, and so many.. Tables,  relationships etc...
    http://technet.microsoft.com/en-us/library/ms187099%28v=sql.105%29.aspx
    Code Design...
    SP's, Funcitions, Views, Sub queries, Joins, Triggers etc...
    DW Design
    DB size and number of reports and historical data details, reduce the normalization and etc....
    http://technet.microsoft.com/en-us/library/aa902672%28v=sql.80%29.aspx
    2. Create complex analytic queries on large data sets.
    Its all based on your current database design, size, required output, data, performance etc..
    4. Monitoring and optimizing the performance of the database.
    Perfmon, Activity monitor, spotlight, custom queries, DMV's sp_whoisactive, execution plans, and many other thirdparty tools.. and may be best experience will give best view and clarity :)
    Note : This is very big topic and its not easy to answer in few words or lines... :) goole it for more details...
    Raju Rasagounder Sr MSSQL DBA

  • Need a cd for the firefox program

    My husband has deleted Safari for the 3rd time on his Mac. I am tired of loading the whole program and want to switch him to Firefox (which I use and love)....at this point in time he has no way to get on the internet to download anything....is there a cd with the Firefox program that I could purchase?

    Thank you so much....my husband is not very computer savvy and has a long history of trying to delete things to make his computer faster....this is at least the 3rd if not 4th time he has deleted Safari and I am tired of loading his whole Mac OX program....

  • Need a tip for an image viewer

    Hi guys i'm trying to make an Image Viewer app and i couldn't find a way to tell my main AS3 class which is the Image that opened the application.
    I already specified images in windows to "Open with" my Image Viewer, and indeed my application executes but, is there a way to register the path of the file that opened my application?
    So far i've only seen drag&drop implementations, and i imagine that your answer will be a negative but i'm trying to find a solution to this because it's the only problem that keeps me from replacing the Windows Picture and Fax Viewer, so any tip, any idea, will be appreciated.

    Thanks mate!
    It is now possible to do it with AIR 1.5.1
    In case someone needs it, here's the code that does the magic (AS3.0)
    import flash.display.NativeWindow;
    import flash.desktop.NativeApplication;
    import flash.events.InvokeEvent;
    var fileLoader:Loader = new Loader();
    addChild(fileLoader);
    NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, handleInitializationArgs);
    function handleInitializationArgs(event:InvokeEvent):void
        // get the application arguments from
        // the InvokeEvent object
       var args:Array = event.arguments as Array;
        // if arguments were provided to the application
        if (args.length)
            // of the arguments provided, assume the first
            // is of the associated file type
            var fileToOpen:String = String(args[0]);
            // load that argument as a url into the loader
            fileLoader.load(new URLRequest(fileToOpen));

  • Need a tip for Labview

    Hi
    I need to know the place in the web where I can find Labview examples.
    I have been in National Instrument's web page but I couldn't find the
    examples.I will appriciate to have the link.
    Thanks,
    Arash

    Hi Arash;
    LabVIEW already ships with a lot of very useful examples. Just go to the help and look for the examples.
    If you do a search for LabVIEW examples at www.ni.com you will get lots of useful examples too.
    At NI Developer Zone, if you go to Development Library > Measurement and Automation Software > LabVIEW, you will also find lots of examples and insights by subject.
    Regards;
    Enrique
    www.vartortech.com

  • Need some tips for start up

    Hello everybody,
    Very first post here and absolutely a beginner to java.Looking 4 a flying start.This is what i would like to do and if somebody can guide me how i could go step by step would be greatful.Here it goes...........
    At first, a program should be written that runs on two PCs, at least one of the PCs having Matlab installed. There should be a stand-alone user interface which is connected to the main program via network sockets, i.e. via the internal loopback interface. The user can select files belonging to a project, specify a string giving the
    Matlab command for the desired function and give the names of the variables he wants to get back. Furthermore, IP-address of the desired remote machine, password and so on have to be input.
    If all inputs are done and given to the main program, this program connects to the chosen remote entity and sends the files, commands and variables to it.
    I would be glad if somebody can gimmi a start up.
    Thanks in advance

    first of all try doing what your trying to do in a stand alone enviorment.... it sould not be that complecated....
    to execute external commands have a look at Runtime, Process etc
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runtime.html
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Process.html
    then create a client server interface, and start by getting the client and server comunicate by simple messaging and then do the other more complecated data exchanges....
    to get the comunication part done have a look at ServerSocket, Socket etc.
    http://java.sun.com/j2se/1.4.1/docs/api/java/net/ServerSocket.html
    http://java.sun.com/j2se/1.4.1/docs/api/java/net/Socket.html
    hope this helps
    oaq

  • Urgent need of code for abap hr program

    Hi,
    Can any one provide with coding to calculate the leave balance  for employee
    for a given period. Its very urgent.
    Thanks in advance,
    Subha

    Hi
    See this sample code for calculation of absence quota
    using 2001 and 2006 infotypes
    make changes as per your requirement
    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
    <b>
    Reward points for useful Answers</b>
    Regards
    Anji

  • Ideas For a Simple Program?

    I need some ideas for a simple program for a project in class. Can anyone help me?

    Import Classes
    import java.io.*;
    public class tictactoe
    Define Variables
    public static InputStreamReader ISR = new InputStreamReader(System.in);
    public static BufferedReader BFR = new BufferedReader(ISR);
    public static String BOX[][] = new String[3][3]; //Integer Arry for tictactoe box
    public static String PName; //Moving Player's Name
    public static String P1Name; //Player 1 Name
    public static String P2Name; //Player 2 Name
    public static String InputPLY; //X or O
    public static String InputStr; //Player's Input
    public static boolean BreakLoop; //Set this to true in PlayGame() to exit
    public static void main(String args[]) throws IOException
    InputPLY = "O";
    BreakLoop = false;
    ClearBOXCache();
    PrintCredits();
    System.out.println("");
    System.out.println("PLEASE ENTER PLAYER 1 NAME");
    P1Name = BFR.readLine();
    System.out.println("PLEASE ENTER PLAYER 2 NAME");
    P2Name = BFR.readLine();
    System.out.println("");
    System.out.print("\nWelcome ");
    System.out.print(P1Name);
    System.out.print(" and ");
    System.out.println(P2Name);
    System.out.println("");
    System.out.println(P1Name + " = X");
    System.out.println(P2Name + " = O");
    PlayGame();
    PrintCredits();
    BFR.readLine();
    System.exit(0);
    public static void DrawGrid()
    This function is to draw the tictactoe grid.
    System.out.println("");
    System.out.println("\t/-----------------------------\\");
    System.out.println("\t|-------- TIC TAC TOE --------|");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[0][0] + " | " + BOX[0][1] + " | " + BOX[0][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[1][0] + " | " + BOX[1][1] + " | " + BOX[1][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[2][0] + " | " + BOX[2][1] + " | " + BOX[2][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t\\-----------------------------/");
    public static void PrintCredits()
    This function is to print credits. Intended for startup and ending
    System.out.println("");
    System.out.println("");
    System.out.println("\t-------------------------------");
    System.out.println("\t--------- TIC TAC TOE ---------");
    System.out.println("\t-------------------------------");
    System.out.println("");
    System.out.println("\t-------------------------------");
    System.out.println("\t---- MADE BY WILLIAM CHAN! ----");
    System.out.println("\t-------------------------------");
    public static void ClearBOXCache()
    This function is to clear the BOX's cache.
    It is intended for restarting a game     
    BOX[0][0] = " ";
    BOX[0][1] = " ";
    BOX[0][2] = " ";
    BOX[1][0] = " ";
    BOX[1][1] = " ";
    BOX[1][2] = " ";
    BOX[2][0] = " ";
    BOX[2][1] = " ";
    BOX[2][2] = " ";
    public static void CheckWin(String PLYW) throws IOException
    This function is to check if a player wins
    for (int X = 0; X < 3; X++)
    if (BOX[X][0].equals(PLYW) && BOX[X][1].equals(PLYW) && BOX[X][2].equals(PLYW))
    PrintWin(PLYW);
    for (int Y = 0; Y < 3; Y++)
    if (BOX[0][Y].equals(PLYW) && BOX[1][Y].equals(PLYW) && BOX[2][Y].equals(PLYW))
    PrintWin(PLYW);
    if (BOX[0][0].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][2].equals(PLYW))
    PrintWin(PLYW);
    else if (BOX[0][2].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][0].equals(PLYW))
    PrintWin(PLYW);
    else if (!BOX[0][0].equals(" ") && !BOX[0][1].equals(" ") && !BOX[0][2].equals(" ") && !BOX[1][0].equals(" ") && !BOX[1][1].equals(" ") && !BOX[1][2].equals(" ") && !BOX[2][0].equals(" ") && !BOX[2][1].equals(" ") && !BOX[2][2].equals(" "))
    ClearBOXCache();
    System.out.println("Tie Game!");
    BFR.readLine();
    System.out.println("Game has restarted");
    public static void PrintWin(String PrintWinner) throws IOException
    This function is to print which player won
    if (PrintWinner.equals("X"))
    System.out.println(P1Name + " wins!");
    System.out.println(P2Name + " loses!");
    else if (PrintWinner.equals("O"))
    System.out.println(P2Name + " wins!");
    System.out.println(P1Name + " loses!");
    BFR.readLine();
    ClearBOXCache();
    System.out.println("Game has restarted!");
    public static void PrintInstruction(String PLYINSTR)
    This function is to give instruction to the player
    if (PLYINSTR.equals("X"))
    PName = (P1Name);
    else if (PLYINSTR.equals("O"))
    PName = (P2Name);
    System.out.println("");
    System.out.println(PName + ":");
    System.out.println("PLEASE MAKE YOUR MOVE");
    System.out.println("");
    System.out.println("TL = TOP LEFT BOX, TM = TOP MIDDLE BOX, TR = TOP RIGHT BOX");
    System.out.println("ML = MIDDLE LEFT BOX, MM = MIDDLE MIDDLE BOX, MR = MIDDLE RIGHT BOX");
    System.out.println("BL = BOTTOM LEFT BOX, BM = BOTTOM MIDDLE BOX, BR = BOTTOM RIGHT BOX");
    public static void PlayGame() throws IOException
    This function is the main game function.
    It calls other game functions.         
    Define Variables
    while(true)
    if (InputPLY.equals("O"))
    InputPLY = "X";
    else if (InputPLY.equals("X"))
    InputPLY = "O";
    while(true)
    PrintInstruction(InputPLY);
    InputStr = BFR.readLine(); //Player's move
    Check player's move
    if (InputStr.equals("TL"))
    if (BOX[0][0].equals(" "))
    BOX[0][0] = InputPLY;
    break;
    else if (InputStr.equals("TM"))
    if (BOX[0][1].equals(" "))
    BOX[0][1] = InputPLY;
    break;
    else if (InputStr.equals("TR"))
    if (BOX[0][2].equals(" "))
    BOX[0][2] = InputPLY;
    break;
    else if (InputStr.equals("ML"))
    if (BOX[1][0].equals(" "))
    BOX[1][0] = InputPLY;
    break;
    else if (InputStr.equals("MM"))
    if (BOX[1][1].equals(" "))
    BOX[1][1] = InputPLY;
    break;
    else if (InputStr.equals("MR"))
    if (BOX[1][2].equals(" "))
    BOX[1][2] = InputPLY;
    break;
    else if (InputStr.equals("BL"))
    if (BOX[2][0].equals(" "))
    BOX[2][0] = InputPLY;
    break;
    else if (InputStr.equals("BM"))
    if (BOX[2][1].equals(" "))
    BOX[2][1] = InputPLY;
    break;
    else if (InputStr.equals("BR"))
    if (BOX[2][2].equals(" "))
    BOX[2][2] = InputPLY;
    break;
    else if (InputStr.equals("RESTART"))
    ClearBOXCache();
    System.out.println("");
    System.out.println("GAME RESTARTED!");
    System.out.println("");
    break;
    else if (InputStr.equals("QUIT"))
    BreakLoop = true;
    break;
    if (BreakLoop == true)
    break;
    DrawGrid();
    CheckWin(InputPLY);
    }

  • IGo charger tip for HP 15

    I have an iGo universal charger I bought recently as a spare in case of something happening to the factory charger. I noticed none of the tips worked. Is there a tip for the iGo I have that will fit my PC? If there is, I just need the tip # for it.
    TW45

    Yes there is only the dv6700z (AMD) and dv6700t (Intel) and they use the same power supply.

  • Please I need some tips of video editing.

    Hi! My name is Bruno Rauch, i'm brazilian and I need some tips for video editing..
    Here below I'm going to put a link of two videos that I had made days ago...And I'm very grateful if you guys could see and tell me some tips to encrease my video quality.
    Bubble Gun Treffen 2014 - Águas de Lindóia - SP - YouTube
    Trip to San Pedro of Atacama - YouTube
    Thanks for your help.

    What I can suggest is that you look into using image stabilization. I know that the vehicle bounces around, but if you have the front of the car in the shot, or a mountain range in the distance, the software should be able to stabilize your footage some.
    Having said that, I should also point out that there are ways to move more smoothly with your camera. There are devices available to steady the camera, called Steadycam. Here is a link.
    B&H Photo Video
    If you can't afford a Steadycam, just using a tripod can help. keep it folded up, put the camera on it, pick it up under the head, and it acts as a balancing weight to smooth out the movement.
    Using such things will also help you keep the horizon straight (except when the car is turning).
    One more thing. Carry a bottle of window cleaner and lots of clean rags.

  • I have a Macbook Pro 15" that is three and a half years old.  Although it has slowed a bit, it still runs well and runs every program I need. Any tips for how to keep this old computer running well and in good health?

    I have a Macbook Pro 15" that is three and a half years old.  Although it has slowed a bit, it still runs well and runs every program I need. Any tips for how to keep this old computer running well and in good health?
    I have a 250 gig drive and try to keep at least 100 gigs unused at all times, 4 GB 667 MHz DDR2 SDRAM memory, back up with Time Machine and CrashPlan, and have OS X 10.7.3.
    This was my first Mac since an old Apple II GS.  After that I used PC's and got really good at reformatting, replacing drives, reinstalling, defragging, resolving software conflicts, etc.  Since switching back to Macs (five in my extended family now), I haven't had to do any of those things. So, although, the cost is three times as much, the aggrevation has been ten times less.
    I'm retired and living on a fixed income and would therefore like to keep this computer running as opposed to constatntly upgrading.
    That said, any tips?
    Thanks
    It does have a crack on the left of the screen case about 3/4'' up from the bottom.  I've posted that as another question.

    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility.  For situations DU cannot handle the best third-party utilities are: Disk Warrior;  DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.x is now Intel Mac compatible. Drive Genius provides additional tools not found in Disk Warrior.  Versions 1.5.1 and later are Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.  Dependence upon third-party utilities to run the periodic maintenance scripts was significantly reduced since Tiger.  These utilities have limited or no functionality with Snow Leopard or Lion and should not be installed.
    OS X automatically defragments files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems. For more about malware see Macintosh Virus Guide.
    I would also recommend downloading a utility such as TinkerTool System, OnyX 2.4.3, or Cocktail 5.1.1 that you can use for periodic maintenance such as removing old log files and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack.  If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the command line.  Note that AppleJack 1.5 is required for Leopard. AppleJack 1.6 is compatible with Snow Leopard. There is no confirmation that this version also works with Lion.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    SyncTwoFolders
    Synk Pro
    Synk Standard
    Tri-Backup
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at CNet Downloads or MacUpdate.
    Be sure you have an adequate amount of RAM installed for the number of applications you run concurrently. Be sure you leave a minimum of 10% of the hard drive's capacity as free space.
    Adding more RAM, if feasible, and a new, faster hard drive may also help pep it up a little.

  • I need help finding a workable web program that is not CSS based.  I tried IWeb and it just won't work for me.  Way too limiting.  I've been using a 12 year old copy of Macromedia Dreamweaver, but the new Dreamweaver is CSS

    Been building web pages for nearly 20 years, starting with GoLive.  Went to Dreamweaver about 12 years ago, the Macromedia version.  Tried going to iWeb when it came with a new Mac, but found it way too limiting with it's CSS template base.   Unknowlingly, I then bought a new copy of Dreamweaver.   Ooops, Adobe had bought Macromedia and Dreamweaver, too, is now CSS based, which for my money makes it useless to anyone who likes simplicity.   Now I find that even iWeb has been discontinued.  I was told yesterday that Apple doesn't have a web program any more.   At 12 years old, I just don't think it's practical to try to load my old Macromedia Dreamweaver into the new Mountain Lion (I'm getting a new Mac), though it is running, barely, in Snow Leopard.
    I need to find a web builder program that will permit simple construction of educational pages, nothing fancy, nothing artistic, just create a page, give it a color, type or drag in text, insert a table, insert pix in the table blocks, add text under the pix... done!    I should note that I am not looking to build traffic.  I teach simple things for free and people who want to learn those things (antique sewing machine repair, quilting, building longbows) find me.
    I've downloaded trial versions of half a dozen or so programs and looked at maybe 20 more, but all are either CSS based and drive me insane with requirments for constantly making rules and template models, and/or require that you base your web presence in their server.   Also, many will not work with pages built in other programs.  I maintian a volume of over 1000 web pages, many requiring regular updating, and they have been with the same server for more than 15 years.  I'm not about to change.
    So, anybody know a simple, old fashioned web builder that's happpy on a Mac platform?
    Captain Dick

    Although not supported anymore, iWeb does still function using Mountain Lion...
    http://www.iwebformusicians.com/iWeb/mountain-lion.html
    ... and you can purchase it from Amazon.
    Start with a blank page using the Black or WHite template.
    All modern websites use CSS and there are thousands of free templates to be had if you want to use a code entry style application. You will need to go this route if you want to create a site that is viewable on mobile devices although you can create an iPhone version using iWeb...
    http://www.iwebformusicians.com/iWeb/Mobile-iWeb.html
    Search this forum for numerous topics about iWeb alternatives.

Maybe you are looking for

  • Problem with Flash Player in IE7 / IE8

    I'm stumped. I've got a problem running Flash content in IE7 / IE8. I had Adobe Master Suite CS3 installed on my laptop, and had no issues running Flash content in any browser including IE7 when this was installed. I've recently un-installed it and c

  • Video Controller Failure.

    After a couple of months of kernel panics, freezing, etc., a Hardware Test finally produced the sad conclusion that the NVIDIA 8600M GT video controller in my MBP had failed. This is the well documented fault that has been occurring since 2007/2008.

  • The wwv_flow_custom_auth_std.login is not rendering the page

    Hi, after patching of the OAS, the APEX application stopped working. 1. The first issue was having f?p=AppID:pageID in the DAD. we resolved this by creating another procedure x and making it the value for the variable PlsqlDefaultPage create or repla

  • Crop Tool Malfunctioning! How do I fix it?

    My crop tool no longer works. I can choose an area I want to crop, then when I go to "Image/Crop" it only crops a single pixel. I have been having to select the area with the rectangular marquee tool, copy & paste it into another layer, delete the ba

  • Correcting camera shake in a sequence of still images

    What is the best way to change registration of one image in a sequence of images that will become a timelapse movie? I am hoping to do it before rendering the stills into a movie in order to retain the best image quality. I am currently using Lightro