F4 Help on Year

Hi All,
I need to have F4 Help on Selection Screen only for Year.
Please let me know how to do it.
Your help is appreciated
Regards
Sathish

Check this FM : in INclude LSCA3F01
call function 'HELP_VALUES_GET_WITH_TABLE_EXT'
      exporting
           fieldname     = 'VJAHR'
           tabname       = 'TFACD'
           no_conversion = ' '
      importing
           select_value  = p_year
      tables
           fields        = h_fields <-- pass values
           select_values = h_select_values
           valuetab      = h_value_tab. <-- Pass years ...

Similar Messages

  • 1 year old MacBook Pro wont let me do a software update. Please help :(, 1 year old MacBook Pro wont let me do a software update. Please help :(

    Hi everyone,
    I purchased my MacBokk Pro a little over a year ago brand new from an Apple store. As of a few month ago it refuses to do a software update. It says it cant connect because of a network problem, but when I run a network diagnostic it says there is no problem. Please help me

    No specific update. Just trying to check for software updates and it wont even let me check for one. I know there will be many updates to do because it hasnt let me check for updates in months

  • Mid Year Go live - Taxable Income

    Dear Gurus,
         Our SAP Payroll went live in the month of July. We have entered YTD data through INLK schema for April, May and June. I have entered 1) /401 Projection Factor, 2) /460 Income Tax, 3) /4ME Monthly Education cess, 4) /4MH Monthly Higher Edu cess
    5) /4MI Monthly Taxable Income , 6) /4MT Monthly Tax payable.
          Now when I am running July month salary through schema copied from IN00. Tax deducted so far (WT/456 ) is alright. Hopwever, my taxabl;e income is not taking into account cumulative figure of previous three month which we have entered through /4MI for previous month.
          Please tell where it went wrong.  And also how can I rectify that manually. Because it is not possible to revert back and reupload YTD data through INLK as finance posting is done for July.
    Please help.

    mid year go live

  • Need help diagnosing cause of printing issue w/ image distortion

    Hello, I'm looking for some expert advice for my print issue with image distortion (see above) on my files once setup and proofed by my printer.
    I have a large PSD background file out of photoshop (CMYK, 170mb psd) that is being placed into an InDesign document. No preflight errors, all correct SWOP cmyk settings, and I keep having issues where images distort on my printers proofs - they seem unable to explain the issue and can't offer any other suggestions beyond ("just try resaving/uploading again" which of course has an added fee with each upload...).
    The files are all fine on our end: on-screen, on our cmyk proofs, and our saved PDFs/packaged files. But everytime our printer opens these they seem to have these distorted image problems - scrambled images (almost as if there was a ghosted transparent image in the distorted area), strange lines (see above, and color distortion (usually greens and pinks, see above).
    Is this an issue with my settings/file formats? Maybe the issue lies on our printers end? I'll keep checking this throughout the day and provide quick answers to anyone who can help me get to the bottom of this.
    Adobe forums have been a huge help in years past so I decided this was by best bet for a resolution from those who know more than myself (or my printer), thanks for taking the time to help!
    - Ian

    Hello, I'm looking for some expert advice for my print issue with image distortion (see above) on my files once setup and proofed by my printer.
    I have a large PSD background file out of photoshop (CMYK, 170mb psd) that is being placed into an InDesign document. No preflight errors, all correct SWOP cmyk settings, and I keep having issues where images distort on my printers proofs - they seem unable to explain the issue and can't offer any other suggestions beyond ("just try resaving/uploading again" which of course has an added fee with each upload...).
    The files are all fine on our end: on-screen, on our cmyk proofs, and our saved PDFs/packaged files. But everytime our printer opens these they seem to have these distorted image problems - scrambled images (almost as if there was a ghosted transparent image in the distorted area), strange lines (see above, and color distortion (usually greens and pinks, see above).
    Is this an issue with my settings/file formats? Maybe the issue lies on our printers end? I'll keep checking this throughout the day and provide quick answers to anyone who can help me get to the bottom of this.
    Adobe forums have been a huge help in years past so I decided this was by best bet for a resolution from those who know more than myself (or my printer), thanks for taking the time to help!
    - Ian

  • Verizon Wireless Real Rude Been Customer At least 8 Years Get This !!!

    Hello Everyone,
                            I have been a customer for many years and I upgraded many phones and billed them to my account and paid my account!! I have the Everything Plan with 4 lines for at least 8 years! I have upgraded many phones and also billed stuff to my account and always paid! Well my sister made a payment in July this year and it was returned to fraud charges on her bank account! All well and fine Now in September I get a check back saying my account is restricted to cash only payments. I call they hook me up to financial services THE MOST RUDE PEOPLE!! They would not even listen to me and said I had 2 returned checks the July one ans August 8th 2014. All they kept asking me how would you like to make your payment and I try to explain 2 checks did not bounce and all they did was repeat HOW WOULD YOU LIKE TO MAKE YOU PAYMENT!! I got No help 77 years old and treated like a low life scum!! Customer service would not help they always connect me to financial services. I made this months payment mind you it was due 11/26/2014 for $261.85 that's my bill for 4 lines 3 with smart phones and one basic! I paid $200 last week and the guy says you have a outstanding balance of $61.85 I am sorry i said hey idiot I am paying a week and a half ahead of time the money is not DUE!!!! Well when do you plan on paying it. This is total **!! Well my sister came gave me reciept It shows she paid $300 CASH on 08/08/2014 so how did a check be returned on 08/11/2014 when it was paid cash!! They do not listen nor help I am 77 don't care about my score but I am ready to take my payment and go to AT&T and get the family line of 4 and SAVE SOME GOOD MONIES!! Now Verizon has what 4 smart phones with 10GB for $160 here I am Paying $262 a month with 3GB!!!!
                                                                                                               Well I am sending in a letter with the receipt that CASH was paid and not a dam person would listen to me at all!! Finally I got to vent here and with the letter and I am using planet feedback to write the corporate Headquarters as well and making it public. 8 year customer and 77 years old and treated like I paid my bill half the time and wouldn't listen I have a CASH RECEIPT they just say "HOW WOULD YOU LIKE TO MAKE YOUR PAYMENT TODAY" repeatedly!!! No help what so ever!!! Now they owe my account $300 and the $25 fee if they don't rectify this situation I will be going to AT&T I don't have many years left and could care less about my F.I.C.O score VERIZON!! Like I asked you have any proof trumping my receipt don't call me AT ALL send it U.S. MAIL with proof in black and white. And just screw with my score or send me early termination bill without proof and I will fight this all the way with small claims and nail you if reported on credit reports for trebbile damages (miss spell) Sorry everyone needed to vent these people care less at all no respect for a 77 year old that been a faithful customer for many years!! This is the worst I have been treated by ANY company of course I pay my bills so I have no other problems with companies.. Have a great thanksgiving everyone I am sorry needed to vent. Now wait for a response if not planet feedback. If anyone has problems with any company look them up and complain publicly and they actually look into problems and fix the situation as your dealing with the CEO office.. Made out in past on credit cards long time ago.. Thank You All Happy Holidays!!! whatever they blank out they don't want you to hear... SO WHAT DO YOU ALL THINK THIS RUDE OR WHAT??

    Forgot to say I have to call for the next 6 moths to make payments and can't order nothing for my lines after 8 years. I'm sorry I am so insulted after being loyal for years. I just needed to vent folks but that's just not right! They could of said fax receipt and fixed this period!

  • I have a godaddy website with a welcome page- I need help adding a few additional pages with a hyperlink to my welcome page.

    I need help attaching a few hyperlinks my godaddy welcome page. I have 2 more ipages articles, I also converted them to pdf. Godaddy only helped (last year) with the 1st article.  I do not know how to attach a hyperlink to the artlcles and add the hyperlinks to my welcome page.

    The program is called Pages not iPages. Just let us know if you do not speak English and what language you do speak so we can adjust for that.
    The issues are to do with your web page not with Pages.
    I think you are asking how to link from your web page to your pdf articles. You must first copy those pdfs to your web server, or some other web location, and then provide html links on your welcome page to those pdf files.
    The pdfs themselves may contain links to other locations but I can not see that that is what you are asking for.
    Nor to what those links would be to.
    From your heading I think you may have confused the name of Pages, the word processing program, with web pages which are two different things.
    Peter

  • Compatibility Issues with CS2 and Windows 2000 XP??? This is supposed to be THE one operating system CS2 DOES WORK ON? Can someone help - I really need my CS2 back! Thanks.

    HELP! Years ago - SEVEN to be exact- I PURCHASED Adobe CS2 and used it extensively. Then I was in an accident that took five years to recover from. After my recovery I tried to get back to using my Adobe products only to find that Adobe was discouraging use of CS2 and since I OWN a LICENSE and that was the LAST version I used I wanted to begin again with a version I am familiar with. Many months later, apparently I wasn't the only one who wanted to KEEP USING CS2 and now Adobe has made it possible to download this version for PC and MAC, BUT due to OS compatibility issues Adobe continues to discourage downloading and use. HERE'S THE THING: I have the SAME SYSTEM running the SAME OS as when I first PURCHASED IT. I have downloaded the EXACT SAME VERSION of CS2. It installs fine. But I cannot OPEN the application and the troubleshooter reports there are "COMPATIBILITY ISSUES". WHY?!?!?!?!?
    I'm on a PC running Windows 2000 XP. I OWN a LICENSE for Adobe CS2 and it used to run on this very same machine. I had to re-format my system two years ago so it has much more free space but when I  try to OPEN the application it won't run. When I run the Windows Troubleshooter it reports system compatibility issues?! Can anyone advise me what to try now??? Thank you.

    Yes, I have. My system was completely cleaned of everything and I'm just now RE-INSTALLING CS2 for Windows2000 XP from the Adobe site that gives you versions to select for your OS. I have successfully downloaded disks 1,2 and 3 and I can INSTALL disks 1 and 2, but it FAILS at disk 3. I REALLY need to resolve this today because I need to submit some work by tomorrow and the troubleshooting isn't helping!
    Can you advise anything else . . . anyone? Thank you!
    Khrystle13

  • Help! When I open Lightroom 4 ,  all my files are gone. It is exactly the way it was when I received it: empty. Nothing. Where are all  my files gone?

    I am a panic mode. All my work, from day is GONE from my lightroom 4' library. No keyword, no thumbnails, no catalogue, no nothing. Lightroom went virgin overnight. What happened? How could this be possible?
    When I go to file, open catalogue it leads me to my desktop. I do have some files there, but this is not my library.
    Please , I desparately need your help: several years of work there!

    Hmmm.  Relaunch iPhoto holding the option key, see if you have an alternate Library available here.
    You can restore through Time Machine, or a boot clone.
    http://www.fatcatsoftware.com/iplm/  iPhoto manager is a tried and true software for corrupt iphoto libraries.

  • Help! iMac would not Connect/Find with Airport Extreme

    Strange issue. I used to connect my Airport extreme with iMac, until recently iMac could not join with aiport. Instead my iMac connected to my neighbor's network. I'm using Time Warner cable.
    However, my MBP and my Dell laptop could connect to my airport. Any ideas what could interfere with my iMac? I already called the Tech support and even went to the Apple store, they all said is the iMac since the iMac was able to connect with all the airports at the store. The tech support suggested me to move my airport to a room with less interference. Is that right? the iMac or the airport should I move?
    We spent 2 hours, resetting back to factory setting and still iMac could not join Airport Extreme.
    Any suggestions or advices are appreciated.
    Tom
    iMac   Mac OS X (10.4.10)  
      Mac OS X (10.4.10)  

    Thank you for your e-mail, Duane. Yes, the airport express (hooked up to my stereo in the dining room) does receive iTunes from my G5 in the office. The light is a blinking yellow, but it still receives the signal.
    Last night, I was able to get an internet signal on my eMac (with airport extreme card installed) from the VersaLink router that my G5 uses in the office!
    I figured out that the eMac and G5 were obviously not communicating with each other, and went to the Airport icon on the top of both screens to make sure that the Location Names were correct. I discovered that I needed to change the G5 from the Airport Express Location (stereo)to the name of the eMac location (Master Bedroom). Then I got the network connection. I suppose to play iTunes to my stereo, I will have to change the location, again, right?
    Another comment: I was rather amazed that, after at least an hour and a half phone conversation with three different technicians, no one came close to this solution. And I'm paying for technical help (two years left on a three year contract)! Evidently, it is not common knowledge that a wireless router and an airport extreme card with mini-antenna can communicate? I came close to buying an Airport Extreme Base Station because I thought that I might need it!!!
    So, I'm thinking I'm in the right ballpark but would welcome any more comments.
    Thanks for listening.
    Dave

  • Kt3 ultra-aru multiplier prob

    I just bought a new MSI kt3 ultra-aru from newegg and a new athlon xp 1900+(1.6ghz) and i unlocked it but the board wont boot with the new multiplier, so i thought the proc was not unlock so i try my old tbird which has already been unlocked and it does not work either, help Plz

    Quote
    Originally posted by WaltC
    Quote
    Originally posted by Shamael
    Hello
    I've got the same kind of problem with my MSI KT3 Ultra (no RAID).
    Setting any multiplier below 9 would make the system unable to boot. I need to clear CMOS to be able reboot.
    Setting the multiplier to 9 or above: no problem.
    My CPU is an Athlon 1400 and its L1 bridges are "factory unlocked".
    How could I fix this issue?
    Many thanks.
    Not that this may help, but years ago I had an old Pentium 2 that had its multiplier locked when going above its default, but unlocked when going below its default multiplier.  It came this way from the factory. Pretty good FSB overclocker, btw.... :]   Later I found that Intel had changed this and subsequent P2's came from the factory locked in both directions.
    Might it be that the cpu is not as "unlocked" as you've been led to believe?  Just a thought.  A way to prove this one way or the other I think would be to try it in another motherboard.
    Well, I don't think this is the same kind of issue because I used this Athlon 1400 with any multiplier on an ABIT KT7A before buying this MSI KT3.

  • How can I get smart group in address book to email?

    digimurr
    Feb 15, 2012 9:58 AM
    Hi
    I'm trying to send an email out to a smart group I created which has about 150 members.  I right click send email while in the address book.  The group ends up in the 'To:' field.  I do a 'cmd A' to select all and move them to the 'bcc' field.  I put my email address in the 'To' field.  I create the subject line and body text which containes a url and an image with a url link.
    When I press send it immediately moves to my outbox and sits there with no activity showing in the MAIL ACTIVITY preview pane.... I've left it for quite a while thinking it might take a while but nothing changes.
    When I send it to my self only it works.   I've tried taking a smaller group last names A-C 30 recipients and it does the same thing.
    Would appreciate some help if you have had the same problem or maybe know what I've done wrong.  Oh, I've also tried it sending it out on me.com and shaw.ca email accounts...
    Thanks
    Murray Brown
    Using Lion 10.7.3
    Imac 27
    I7
    8 gig ram
    1 TB drive
    iMac (27-inch Mid 2011), Mac OS X (10.7.3)

    If you want to "send an email" to the group, you need to get the group into your email client's Contacts first...
    Select your Group > Select All
    From Address Book.App "Help" (±10 years old)
    *See emphasis below* -
    Importing and exporting vCards
    A vCard, or "virtual address card," is a standard method of exchanging data between applications. Address Book can create and read vCards, so if you have another application that also works with the vCard format, you can import or export addresses as vCards.
    Also, you can send your own card to other people in vCard format. They can use the vCard to add your information to their address books.
    You can also use vCards to add addresses to the Contacts list on your iPod.
    To create a vCard, drag an address card out of the Address Book window.
    To add someone else's vCard to your address book, drag it into the Address Book window.
    To create a single vCard with multiple entries, drag more than one card out of the Address Book window.
    To create multiple vCards at the same time, hold the Option key when dragging multiple cards out of the Address Book window.
    You can also work with vCards using commands in the File menu.
    Address Book also supports Lightweight Directory Interchange Format (LDIF). LDIF is an ASCII file format used to exchange information and enable synchronization of that information between Lightweight Directory Access Protocol (LDAP) servers. You can't export information from Address Book in LDIF format; you can only import it. Address Book can import and export vCards.
    To determine the format of a document, select the document and choose File > Get Info. The format, or kind of document, is listed at the top.
    If another application won't accept vCards in the default 3.0 format, try changing the format to 2.1 in the vCard pane of Address Book Preferences, and send the vCard again.
    ÇÇÇ

  • HP A1620N will not boot up

    I asked for help last year with my computer that would not boot up. I have finally returned to work on it. It is an HP a1620n with windows xp. I had to install a new ps. Computer still will not boot up, it just gives me the blue hp invent screen. bought and used new thermal paste. Still nothing. Removed and reinstalled memory. No luck. Tried constantly tapping f1, esc, f8, f10, f12 while computer is powering up. No good. Removed hard drive and put it in an external case. Can look at some stuff but not everything. Not sure if its a hardware problem or a software problem.
    Any help would be appreciated.
    Thank you,
    nissan84pu

    Hello again Nissan84pu,
    I did go back and look at your previous post about what you have done; I did read where you took the original motherboard out but ended up putting it back in because another board did the same thing.  Also see where you have worked on the processer, ram and replaced the power supply, about the only other you really haven’t tested is the hard drive and I would say that would probably be you’re next step.
    What is kind of odd is that you haven’t been able to access the bios on the startup that been the most worrisome thing to me. Have you been able to access the bios menu and I’m just not aware of it?
    Please respond at your earliest convenience.
    Thanks
    Clicking the White Kudos star on the left is a way to say Thanks!
    Clicking the 'Accept as Solution' button is a way to let others know which steps helped solve the problem!

  • Pages always prints envelopes upside down

    When using Pages to print envelopes, my HP laserjet always prints the envelope upside down. Apple and HP indicate I shoudl feed the envelopes with the top to the right. This works properly with everyother piece of software I have used
    I know, when I use Pages I could just change the orientation of the envelope in the envelope feed slot, or check "reverse page orientation" in the Print dialog (so the envelope is upside down in the print preview.) But I'd prefer not to have to remember random procedures to accomodate software malfunctions. Is there some preference I can set in Pages (or something) to fix this so it works correctly?
    PS.I hate to post this as a question, but the Apple Support Communities (SW platform, not the people ) has sort of forces this.
    Why in the world does it present "Ask a question" as the main option. Initially I skipped that, but the community search funcion really *****. Searching is incredibly non-intuitive and poorly targeted (If I'm in the pages section why is it giving me totally unrelated results from unrelated sections?
    Get on the ball Apple. You broke the "Support Communities" website and the OS X built in "Help Center" years ago, and still haven''t fixed them.
    Thank God for all the helpful Mac users out there, because Apple's help and support efforts (Help platforms, manuals, etc.) seem to have fallen by the wayside.

    Hi John,
    No help on your actual question, but some comments on the search function here.
    Search offers the choice of limiting the searsch to a specific community/forum when the first results are presented. You can also limit the search to a specific user.
    The basic search is a keyword search, and turns up any post that has that keyword in it (with some weighting added by then software). Searches search for "Any" of the terms included in the query unless you limit the results using commands such as  AND or NEAR. Not all that intuitive, I'll agree.
    One other feature of the ASC site is the 'related' topics list, "More Like This," that appears after you've submitted a query. You'll find the list to the right of the message(s) in the community. A click opn the (green) checked items will often provide a solution to your(well described)  issue.
    None marked 'solved' on the list at this time, but some worth exploring for hints or a solution.
    Regards,
    Barry

  • Converting RoboHelp 7 HTML Project to RoboHelp 9 for Word Project?

    Due to complications in localization, I've been asked to evaluate authoring in doc files instead of HTMs, since the tool we use for localization (Across Server) seems to work better (or so we're told) with doc files.
    I've only authored in RoboHelp HTML with a CHM output for the last several years, so I'm unfamiliar with RH for Word. But I have used Doc-to-Help many years ago, so I'm somewhat familiar with the implications of using doc files.
    How would I go about doing this conversion? Is there some utility that does this, or is the best way to export to a printed output and then import that output into a new project?
    I'm also going to evaluate this using RH 9 since I'm considering upgrading from RH 7. I only have Word 2003.
    Thanks in advance,
    Jared

    RoboHelp for Word has only had minimal changes for the last two versions. Take a hint. Also enhancements to RoboHelp HTML outputs have not been mirrored.
    I suggest you do some work in RoboHelp for Word and see how much you enjoy it.
    As for conversion, open RoboHelp for Word and see the import options. Your idea seems to be the way to go, if you really really have to.
    Oh, one more thing, you will not get much help in the RoboHelp for Word forum because there is hardly any user to user support.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Grahical reports in abap how to devlop

    hi all
    can u please tell me how to display reports in graphical form 2d or 3d using abap programming

    Hi ,
    Paste this code in se38,
    PERFORM create_chart is important for you.
    *& Report  ZMM_INV_TURNS_REPORT                                       *
    *& Author  Vijay Babu Dudla                                           *
    *& Date    25th April 2008                                            *
    Description :  Inventory Turns Report                               *
    Inputs:                                                             *
      Tables:                                                           *
        ECMT  -  COGS data                                              *
        GLTO  -  Inventory Data                                         *
    Parameters:                                                        *
    From Period                                                        *
          Year                                                          *
    To   Period                                                        *
          Year                                                          *
          Company Code
      Parameters:                                                       *
        N/A                                                             *
    Outputs: A ALV report is generated to display the Inventory Turns   *
    External Routines                                                   *
      Classes: CL_GUI_ALV_GRID                                          *
               CL_IGS_CHART                                             *
      Transactions    : No                                              *
      Programs        : No                                              *
    Return Codes: No                                                    *
    Ammendments:                                                        *
       Programmer        Date     Req. #            Action              *
    ================  ==========  ======  ==============================*
    Vijay Dudla     04/15/2008   RD4K900255  Initial Development       *
    RMANDAL         05/18/2008   RD4K900419  1) Getting COGS values    *
                                                  from ZSCOMMON         *
                                              2) Displying values in    *
                                                 Graph                  *
    REPORT  zmm_inv_turns_report MESSAGE-ID zi.
    *-TYPES Declaration
    *- Period Details
    TYPES: BEGIN OF ty_period,
            perid TYPE fc_perid,           " Period
           END OF ty_period.
    *-Year Details
    TYPES: BEGIN OF ty_year,
            gjahr TYPE gjahr,              " Year
           END OF ty_year.
    *-Final Display Table
    TYPES: BEGIN OF ty_data,
            texts(20),                     " Col Value
            per01(20),                                          " Period1
            per02(20),                                          " Period2
            per03(20),                                          " Period3
            per04(20),                                          " Period4
            per05(20),                                          " Period5
            per06(20),                                          " Period6
            per07(20),                                          " Period7
            per08(20),                                          " Period8
            per09(20),                                          " Period9
            per10(20),                                          " Period10
            per11(20),                                          " Period11
            per12(20),                                          " Period12
            year TYPE gjahr,
          END OF ty_data.
    *-Period Balance information
    TYPES: BEGIN OF ty_balance,
             period TYPE fc_perid,         " Period
             gjahr TYPE gjahr,             " Year
             tslvt TYPE tslxx,             " Balance
           END OF ty_balance.
    *- Period and Year info
    TYPES: BEGIN OF ty_per_year,
             period TYPE fc_perid,         " Period
             gjahr TYPE gjahr,             " Year
           END OF ty_per_year.
    *- Field Symbols
    FIELD-SYMBOLS: <fs> TYPE ANY.
    *- Data Declarations
    *- Internal Table Decleations
    DATA: it_fieldcat TYPE lvc_t_fcat,     " Fieldcatalog
          it_per      TYPE STANDARD TABLE OF zmm_year_period,
          it_year_per TYPE zmm_t_inv_period,
          it_final    TYPE STANDARD TABLE OF ty_data,
          it_year     TYPE STANDARD TABLE OF ty_year,
          it_period   TYPE STANDARD TABLE OF ty_period,
          it_common   TYPE STANDARD TABLE OF zscommon,
    BEGIN OF INSERT BY RMANDAL - 19/05/2008 - RD4K900419
          it_common1  TYPE STANDARD TABLE OF zscommon,
    END OF INSERT BY RMANDAL - 19/05/2008 - RD4K900419
          it_inv      TYPE STANDARD TABLE OF glt0,
          it_cogs     TYPE STANDARD TABLE OF ecmct,
         it_inv_data TYPE STANDARD TABLE OF zfi_year_period,
          it_balance  TYPE STANDARD TABLE OF ty_balance,
          it_peryear  TYPE STANDARD TABLE OF ty_per_year
                           WITH HEADER LINE.
    *- Work Area declarations
    DATA: wa_fieldcat TYPE lvc_s_fcat,
          w_per       TYPE zmm_year_period,
          w_period    TYPE zmm_inv_period,
          wa_final    TYPE ty_data,
         wa_inv      TYPE zfi_year_period,
          wa_per      TYPE ty_period,
          wa_balance  TYPE ty_balance.
    *- Range table Declations
    DATA: return  TYPE TABLE OF ddshretval WITH HEADER LINE,
          r_year  TYPE RANGE OF gjahr WITH HEADER LINE,
          r_yr    TYPE RANGE OF gjahr WITH HEADER LINE,
          r_per   TYPE RANGE OF fc_perid WITH HEADER LINE,
          r_saknr TYPE RANGE OF racct.
    *- Variable to Period and Year
    DATA: perid   TYPE fc_perid,
          year    TYPE gjahr,
          w_bukrs TYPE glt0-bukrs.
    *- Graph Display
    DATA:  g_html  TYPE w3htmltabtype,
           g_url   TYPE w3url.
    *-Controls for Displaying the Grpah and ALV Report
    DATA: grid    TYPE REF TO cl_gui_alv_grid,
          split   TYPE REF TO cl_gui_splitter_container,
          cont    TYPE REF TO cl_gui_custom_container,
          gridcon TYPE REF TO cl_gui_container,
          htmlcon TYPE REF TO cl_gui_container,
          html_control TYPE REF TO cl_gui_html_viewer.
    *&     Selection Screen                                               *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-ttl.
    SELECT-OPTIONS:  s_per FOR perid NO-EXTENSION NO INTERVALS OBLIGATORY,
                                         " Period
                     s_year FOR year NO-EXTENSION NO INTERVALS OBLIGATORY.
                                         " Year
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-tt2.
    SELECT-OPTIONS:  s_per2 FOR perid NO-EXTENSION NO INTERVALS OBLIGATORY,
                                         " Period
                     s_year2 FOR year NO-EXTENSION NO INTERVALS OBLIGATORY.
                                         " Year
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-tt3 .
    PARAMETERS: p_rep RADIOBUTTON GROUP g1 DEFAULT 'X',
                p_grp RADIOBUTTON GROUP g1,
                p_bot RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b3.
    PARAMETERS: p_bukrs LIKE glt0-bukrs DEFAULT '3000' OBLIGATORY.
    *&     AT SELECTION-SCREEN ON VALUE REQUEST                           *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_year-low.
    *-Value help for year
      PERFORM get_hlp_for_year.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_per-low.
    *-Value help for Period
      PERFORM get_hlp_for_period.
    *&     AT SELECTION-SCREEN                                            *
    AT SELECTION-SCREEN .
    *-Validations
    *- Per Period should be 1 to 12
      LOOP AT s_per.
        IF s_per-low GT 12 OR s_per-low LT 1.
          MESSAGE e000(zi) WITH 'Enter Period between 1 and 12'.
        ENDIF.                             " IF s_per-low GT 12 OR s_per-low
        IF NOT s_per-high IS INITIAL.
          IF s_per-high GT 12 OR s_per-high LT 1.
            MESSAGE e000(zi) WITH 'Enter Period between 1 and 12'.
          ENDIF.                           " IF s_per-high GT 12 OR
        ENDIF.                             " IF NOT s_per-high IS INITIAL
      ENDLOOP.                             " LOOP AT s_per
      IF s_per-low GE sy-datum+4(2) AND
         s_year-low GE sy-datum+0(4).
        MESSAGE e000(zi) WITH text-002 text-003.
      ENDIF.                               " IF s_per-low GE sy-datum+4(2)
      LOOP AT s_per2.
        IF s_per2-low GT 12 OR s_per2-low LT 1.
          MESSAGE e000(zi) WITH 'Enter Period between 1 and 12'.
        ENDIF.                             " IF s_per2-low GT 12 OR
      ENDLOOP.                             " LOOP AT s_per2.
      IF s_per2-low GE sy-datum+4(2) AND
         s_year2-low GE sy-datum+0(4).
        MESSAGE e000(zi) WITH text-002 text-003.
      ENDIF.                               " IF s_per2-low GE sy-datum+4(2)
    Company Code Validation
      IF p_bukrs IS NOT INITIAL.
        SELECT
        SINGLE  bukrs                      " Company Code
          FROM  t001
          INTO  w_bukrs
         WHERE  bukrs = p_bukrs.
        IF sy-subrc NE 0.
          MESSAGE e000(zi) WITH 'Enter Valid Company code '.
        ENDIF.                             " IF sy-subrc NE 0.
        CLEAR w_bukrs.
      ENDIF.                               " IF p_bukrs IS NOT
    *&     START OF SELECTION                                             *
    START-OF-SELECTION.
    *-Get the GL Accounts from table ZSCOMMON
      PERFORM get_gl_information.
    *-Get the Inventory Details
      PERFORM get_inventory_data.
    *-Get the COGS details
      PERFORM get_cogs_data.
    *-Population of Period Table
      PERFORM populate_period_data.
    *-Populate the Final Data
      PERFORM populate_final_data.
    *&     END OF SELECTION                                               *
    END-OF-SELECTION.
    *-Display the Output
      PERFORM display_inv_turn_data.
    *&      Form  get_hlp_for_year
          Get the Value help for Year
    FORM  get_hlp_for_year.
    *-Populate the F4 Values for Year
      SELECT  pabrj
        FROM  t549q
        INTO
       TABLE  it_year.
      IF sy-subrc EQ 0.
        SORT it_year.
        DELETE it_year WHERE gjahr = ''.
        DELETE ADJACENT DUPLICATES FROM it_year
                                COMPARING gjahr.
    *-Attaching the F4 Help to The Selection parameter
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = 'GJAHR'
            dynpprog        = sy-repid
            dynpnr          = sy-dynnr
            value_org       = 'S'
          TABLES
            value_tab       = it_year
            return_tab      = return
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc EQ 0.
          READ TABLE return INDEX 1.
          s_year-low = return-fieldval.
        ENDIF.                             " IF sy-subrc EQ 0
      ENDIF.                               " IF sy-subrc EQ 0
    ENDFORM.                               " get_hlp_for_year
    *&      Form  get_hlp_for_period
          Get the Search help for Period
    FORM get_hlp_for_period.
    *-Population of Period to Display the F4 values
      CLEAR return[].
      wa_per-perid = '001'.
      DO 12 TIMES.
        APPEND wa_per TO it_period.
        wa_per-perid = wa_per-perid + 1.
      ENDDO.                               " DO 12 TIMES.
    *-Attaching the F4 values to the selection parameter
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'PERID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = it_period
          return_tab      = return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE return INDEX 1.
        s_per-low = return-fieldval.
      ENDIF.                               " IF sy-subrc EQ 0
    ENDFORM.                               " get_hlp_for_period
    *&      Form  GET_GL_INFORMATION
          Get the GL account Information from ZSCOMMON table
    FORM get_gl_information .
      DATA: wa_common TYPE zscommon,
            wa_saknr  LIKE LINE OF r_saknr.
    *-GL Accounts from ZSCOMMON
      SELECT  *
        FROM  zscommon
        INTO
       TABLE  it_common
       WHERE  programm  =  sy-repid AND
              code      = 'GLAC'.
      IF sy-subrc EQ 0.
        wa_saknr-sign   = 'I'.
        wa_saknr-option = 'EQ'.
        LOOP AT it_common INTO wa_common.
          wa_saknr-low = wa_common-valuestrng.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = wa_saknr-low
            IMPORTING
              output = wa_saknr-low.
          APPEND wa_saknr TO r_saknr.
        ENDLOOP.                           " LOOP AT it_common
      ENDIF.                               " IF sy-subrc EQ 0
    ENDFORM.                               " GET_GL_INFORMATION
    *&      Form  GET_INVENTORY_DATA
          Get the Inventory Data
    FORM get_inventory_data .
      REFRESH r_year.
      r_year-sign = 'I'.
      r_year-option = 'EQ'.
    *-Populate the Year from Selection Parameters
      LOOP AT s_year.
        r_year-low = s_year-low.
        APPEND r_year.
        r_year-low = r_year-low - 1.
        APPEND r_year.
        r_year-low  = s_year-low.
        IF s_year2-low IS NOT INITIAL.
          DO.
            r_year-low = r_year-low + 1.
            IF r_year-low GT s_year2-low.
              EXIT.
            ENDIF.                         " IF r_year-low GT
            APPEND r_year.
          ENDDO.                           " DO
        ENDIF.                             " IF s_year2-low IS NOT
      ENDLOOP.                             " LOOP AT s_year
      CLEAR r_year.
      SORT r_year BY low.
      DELETE ADJACENT DUPLICATES FROM r_year COMPARING low.
      r_yr-sign = 'I'.
      r_yr-option = 'EQ'.
      LOOP AT s_year.
        r_yr-low = s_year-low.
        APPEND r_yr.
        IF s_year2-low IS NOT INITIAL.
          DO.
            r_yr-low = r_yr-low + 1.
            IF r_yr-low GT s_year2-low.
              EXIT.
            ENDIF.                         " IF r_yr-low GT s_year2-low
            APPEND r_yr.
          ENDDO.                           " DO
        ENDIF.                             " IF s_year2-low IS NOT
      ENDLOOP.                             " LOOP AT s_year
    *-Get the Inventory Data
      SELECT *
        FROM glt0
        INTO TABLE it_inv
        WHERE bukrs = p_bukrs AND
              ryear IN r_year AND
              racct IN r_saknr.
    ENDFORM.                               " GET_INVENTORY_DATA
    *&      Form  GET_COGS_DATA
          Get the COGS data
    FORM get_cogs_data .
      DATA: s_item TYPE RANGE OF fc_item,
            wa_item LIKE LINE OF s_item.
    BEGIN OF INSERT BY RMANDAL ON - 05/19/2008- RD4K900419
      data: wa_common1 TYPE zscommon.
      SELECT  *
        FROM  zscommon
        INTO
       TABLE  it_common1
       WHERE  programm  =  sy-repid AND
              code      = 'CCOA'.
      IF sy-subrc EQ 0.
        wa_item-sign   = 'I'.
        wa_item-option = 'EQ'.
        LOOP AT it_common1 INTO wa_common1.
          wa_item-low = wa_common1-valuestrng.
          APPEND wa_item TO s_item.
        ENDLOOP.                           " LOOP AT it_common1
      ENDIF.                               " IF sy-subrc EQ 0
    wa_item-sign = 'I'.
    wa_item-option  = 'EQ'.
    wa_item-low = '0000005000'.
    APPEND wa_item TO s_item.
    wa_item-low = '0000006100'.
    APPEND wa_item TO s_item.
    wa_item-low = '0000007900'.
    APPEND wa_item TO s_item.
    END OF INSERT BY RMANDAL ON - 05/19/2008- RD4K900419
    *-Population of COGS information
      SELECT *
        FROM ecmct
        INTO TABLE it_cogs
        WHERE ryear IN r_year AND
              rbunit EQ '000000000000003000' AND
              ritem IN s_item  AND
          ( ( sityp EQ '2  ' AND
              subit EQ '0100      ')
              OR
            ( sityp EQ ' ' AND
              subit EQ ' ') ).
      IF sy-subrc EQ 0.
      ENDIF.                               " IF sy-subrc EQ 0
    ENDFORM.                               " GET_COGS_DATA
    *&      Form  POPULATE_FINAL_DATA
          Population of final Data
    FORM populate_final_data .
      DATA: inc(2) TYPE n,
            w_pert(15),
            col(5).
    *Field catalog population.
      wa_fieldcat-fieldname = 'TEXTS'.
      wa_fieldcat-outputlen = 20.
      wa_fieldcat-coltext = 'Info'.
      APPEND wa_fieldcat TO it_fieldcat.
      inc = 1.
      DO 12 TIMES.
        CONCATENATE 'PER' inc INTO wa_fieldcat-fieldname.
        CONCATENATE 'PER' inc INTO wa_fieldcat-coltext.
        wa_fieldcat-outputlen = 20.
        wa_fieldcat-just = 'R'.
        APPEND wa_fieldcat TO it_fieldcat.
        CLEAR wa_fieldcat .
        inc  = inc + 1.
      ENDDO.                               " DO 12 TIMES.
      SORT it_per BY year period.
      inc = 1.
    *-Final Internal table formation
      LOOP AT it_per INTO w_per.
        READ TABLE it_final WITH KEY year = w_per-year
                                  TRANSPORTING NO FIELDS.
        IF sy-subrc NE 0.
          wa_final-texts = w_per-year.
          wa_final-year = w_per-year.
          inc = 1.
          DO 12 TIMES.
            CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
            ASSIGN (w_pert) TO <fs>.
            <fs> = inc.
            inc = inc + 1.
          ENDDO.                           " DO 12 TIMES
          APPEND wa_final TO it_final.
          CLEAR wa_final.
          inc = w_per-period+1(2).
          wa_final-year = w_per-year.
          wa_final-texts = 'COGS Tot(12 months)'.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-cogs.
          APPEND wa_final TO it_final.
          wa_final-texts = 'Inv Total(12 months)'.
          wa_final-year = w_per-year.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invtot.
          APPEND wa_final TO it_final.
          wa_final-texts = 'Inv Avg(monthly)'.
          wa_final-year = w_per-year.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invavg.
          APPEND wa_final TO it_final.
          wa_final-texts = 'Turns(COGS/Inv.Avg)'.
          wa_final-year = w_per-year.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invturn.
          APPEND wa_final TO it_final.
          CLEAR wa_final.
          APPEND wa_final TO it_final.
        ELSE.
          inc = w_per-period+1(2).
         wa_final-texts = 'COGS Total(12 months)'.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          CONCATENATE 'PER' inc INTO col.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-cogs.
          MODIFY it_final FROM  wa_final TRANSPORTING (col)
                         WHERE  texts = 'COGS Tot(12 months)'
                           AND  year = w_per-year.
          wa_final-texts = 'Inv Total(12 months)'.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          CONCATENATE 'PER' inc INTO col.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invtot.
          MODIFY it_final FROM  wa_final TRANSPORTING (col)
                         WHERE  texts = 'Inv Total(12 months)'
                           AND  year  = w_per-year .
          wa_final-texts = 'Inv Avg(monthly)'.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          CONCATENATE 'PER' inc INTO col.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invavg.
          MODIFY it_final FROM  wa_final TRANSPORTING (col)
                         WHERE  texts = 'Inv Avg(monthly)'
                           AND  year  =  w_per-year
          wa_final-texts = 'Turns(COGS/Inv.Avg)'.
          CONCATENATE 'WA_FINAL-PER' inc INTO w_pert.
          CONCATENATE 'PER' inc INTO col.
          ASSIGN (w_pert) TO <fs>.
          <fs> = w_per-invturn.
          MODIFY it_final FROM  wa_final TRANSPORTING (col)
                         WHERE  texts = 'Turns(COGS/Inv.Avg)'
                           AND  year = w_per-year .
          CLEAR wa_final.
        ENDIF.                             " IF sy-subrc NE 0
      ENDLOOP.                             " LOOP AT it_per INTO
    ENDFORM.                               " POPULATE_FINAL_DATA
    *&      Form  DISPLAY_INV_TURN_DATA
          Display Inventory Turns Report
    FORM display_inv_turn_data .
      IF NOT it_final IS INITIAL.
    *-Save the Data
       PERFORM save_data.
        CALL SCREEN 100.
      ELSE.
        MESSAGE s000(zi) WITH 'No data for selection'.
      ENDIF.                               " IF NOT it_final
    ENDFORM.                               " DISPLAY_INV_TURN_DATA
    *&      Form  POPULATE_PERIOD_DATA
          Populate the Period Data
    FORM populate_period_data .
    *- Work Variables
      DATA: wa_inv     TYPE glt0,
            wa_cog     TYPE ecmct,
            w_amt(12),
            w_debit    TYPE tslxx,
            w_credit   TYPE tslxx,
            w_invtot   TYPE tslxx,
            w_cogstot  TYPE tslxx,
            w_bal1     TYPE tslxx,
            w_bal2     TYPE tslxx,
            w_total    TYPE tslxx,
            w_inc(2)   TYPE n,
            w_perd     TYPE fc_perid,
            w_bal(12),
            lv_period  TYPE fc_perid,
            lv_year    TYPE gjahr,
            w_change.
    *- Field Symbols
      FIELD-SYMBOLS: <fs> TYPE ANY,
                     <fs_bal> TYPE ANY.
    *-Population of Balance for all Periods.
      SORT it_inv BY ryear.
      LOOP AT r_year.
        CLEAR: w_debit,w_credit,
               w_bal1,w_bal2,w_total.
        wa_balance-gjahr = r_year-low.
        LOOP AT it_inv INTO wa_inv WHERE ryear = r_year-low AND
                                         drcrk = 'S' .
          w_bal1 = w_bal1 + wa_inv-tslvt.
          CLEAR wa_inv-tslvt.
        ENDLOOP.                           " LOOP AT it_inv
        LOOP AT it_inv INTO wa_inv WHERE ryear = r_year-low AND
                                         drcrk = 'H' .
          wa_inv-tslvt = wa_inv-tslvt * -1.
          w_bal2 = w_bal2 + wa_inv-tslvt.
          CLEAR wa_inv-tslvt.
        ENDLOOP.                           " LOOP AT it_inv INTO wa_inv
        w_total = w_bal1 - w_bal2.
        w_inc = 1.
        DO 12 TIMES.
          LOOP AT it_inv INTO wa_inv WHERE ryear = r_year-low AND
                                           drcrk = 'S' .
            CLEAR: w_bal.
            CONCATENATE 'WA_INV-TSL' w_inc INTO w_bal.
            ASSIGN (w_bal) TO <fs_bal>.
            w_debit = w_debit + <fs_bal>.
            UNASSIGN <fs_bal>.
          ENDLOOP.                         " LOOP AT it_inv INTO wa_inv
          LOOP AT it_inv INTO wa_inv WHERE ryear = r_year-low AND
                                       drcrk = 'H' .
            CLEAR: w_bal.
            CONCATENATE 'WA_INV-TSL' w_inc INTO w_bal.
            ASSIGN (w_bal) TO <fs_bal>.
            <fs_bal> = <fs_bal> * -1.
            w_credit = w_credit + <fs_bal>.
            UNASSIGN <fs_bal>.
          ENDLOOP.                         "  LOOP AT it_inv INTO wa_inv
          wa_balance-tslvt = w_debit - w_credit + w_total.
          wa_balance-period = w_inc.
          APPEND wa_balance TO it_balance.
          w_inc = w_inc + 1.
        ENDDO.                             " DO 12 TIMES
      ENDLOOP.                             " LOOP AT r_year
      CLEAR: w_credit,w_debit.
      r_per-sign = 'I'.
      r_per-option = 'EQ'.
      CLEAR it_peryear[].
    *-Populate the periods
      r_per-low = s_per-low.
      lv_year = s_year-low.
      DO .
        it_peryear-period = r_per-low.
        it_peryear-gjahr = lv_year.
        APPEND it_peryear.
        IF r_per-low GE s_per2-low AND
           lv_year EQ s_year2-low.
          EXIT.
        ENDIF.                             " IF r_per-low GE s_per2
        IF r_per-low = 12.
          r_per-low = 1.
          lv_year = lv_year + 1.
        ELSE.
          r_per-low = r_per-low + 1.
        ENDIF.                             " IF r_per-low = 12
      ENDDO.                               " DO
      CLEAR: r_per,r_year,w_change.
    *-Population of the Turns information based on Period and year
      LOOP AT it_peryear.
        w_perd = it_peryear-period.
        LOOP AT r_yr WHERE low = it_peryear-gjahr.
          w_per-period = it_peryear-period.
          IF w_change = ''.
            w_per-year = r_yr-low.
          ENDIF.                           " IF w_change = ''
          IF w_per-period = 12.
            IF  s_per-low <> w_per-period.
            r_yr-low = r_yr-low - 1.
              w_change = 'X'.
            ENDIF.                         " IF  s_per-low <> w_per-period
            w_per-year = r_yr-low.
          ENDIF.                           " IF w_per-period = 1
          CLEAR: w_invtot,
                 w_cogstot.
    *-For each period populate the Credit and Debit info
          DO 12 TIMES.
            w_period-period = it_peryear-period.
            w_period-year = r_yr-low.
            CLEAR: w_amt,w_debit,w_bal1.
            CONCATENATE 'WA_INV-TSL' w_period-period+1(2) INTO w_amt.
            LOOP AT it_inv INTO wa_inv WHERE ryear = w_period-year AND
                                             drcrk = 'S' .
              ASSIGN (w_amt) TO <fs>.
              w_debit = w_debit + <fs>.
              UNASSIGN <fs>.
              CLEAR wa_inv-tslvt.
            ENDLOOP.                       "  LOOP AT it_inv INTO wa_inv
            CLEAR: w_credit,w_bal2.
            LOOP AT it_inv INTO wa_inv WHERE ryear = w_period-year AND
                                             drcrk = 'H' .
              ASSIGN (w_amt) TO <fs>.
              <fs> = <fs> * -1.
              w_credit = w_credit + <fs>.
              UNASSIGN <fs>.
              CLEAR wa_inv-tslvt.
            ENDLOOP.                       " LOOP AT it_inv INTO wa_inv
            w_period-tsl01 = w_debit - w_credit.
            CLEAR w_amt.
            CONCATENATE 'WA_COG-TSL' w_period-period+1(2) INTO w_amt.
            LOOP AT it_cogs INTO wa_cog WHERE ryear = w_period-year.
              ASSIGN (w_amt) TO <fs>.
              w_period-tsl02 = w_period-tsl02 + <fs>.
              UNASSIGN <fs>.
            ENDLOOP.                       " LOOP AT it_cogs INTO wa_cog
    *-Calculate the total amounts
            w_invtot  =  w_invtot + w_period-tsl01.
            w_cogstot =  w_cogstot + w_period-tsl02.
            APPEND w_period TO it_year_per.
            CLEAR: w_period-tsl02,w_period-tsl01.
            IF it_peryear-period EQ 1.
              it_peryear-period = 12.
              r_yr-low = r_yr-low - 1.
            ELSE.
              it_peryear-period = it_peryear-period - 1.
            ENDIF.                         " IF it_peryear-period
          ENDDO.                           " DO 12 TIMES.
          lv_period = w_per-period.
          lv_year =  w_per-year.
          DO 12 TIMES.
            READ TABLE it_balance INTO wa_balance
                                  WITH KEY period = lv_period
                                           gjahr  = lv_year.
         w_per-invtot = w_invtot .+ wa_balance-tslvt.
            w_per-invtot = w_per-invtot + wa_balance-tslvt.
            IF lv_period = 1.
              lv_period = 12.
              lv_year = lv_year - 1.
            ELSE.
              lv_period = lv_period - 1.
            ENDIF.                         " IF lv_period = 1
            CLEAR wa_balance-tslvt.
          ENDDO.                           " DO 12 TIMES
          w_per-cogs = w_cogstot.
          w_per-invavg = w_per-invtot / 12.
          IF w_per-invavg NE 0.
            w_per-invturn = w_per-cogs / w_per-invavg.
          ENDIF.                           " IF w_per-invavg NE 0
          w_per-year = it_peryear-gjahr.
          w_per-info = it_year_per.
          APPEND w_per TO it_per.
          CLEAR: w_per-period,
                 w_per-invtot,
                 w_per-invavg,
                 w_per-cogs,
                 w_per-invturn,
                 w_per-info,it_year_per.
        ENDLOOP.                           " LOOP AT r_yr WHERE
      ENDLOOP.                             " LOOP AT it_peryear
    ENDFORM.                               " POPULATE_PERIOD_DATA
    *&      Form  create_chart
          Display the Chart
    FORM create_chart USING p_html TYPE w3htmltabtype p_real.
      DATA:
        igs_chart       TYPE REF TO cl_igs_chart,
        line            TYPE igs_data,
        data            TYPE igs_data_tab,
        ext_line        TYPE igs_ext,
        extension       TYPE igs_ext_tab,
        mime            TYPE w3mimetabtype,
        html            TYPE w3htmltabtype,
        html_line       TYPE w3html,
        url             TYPE w3url,
        content_length  TYPE i,
        content_type    TYPE w3param-cont_type,
        content_subtype TYPE w3param-cont_type.
      DATA: val TYPE char30.
    empty result table
      REFRESH p_html.
    create chart object
      CREATE OBJECT igs_chart.
    set chart type
      igs_chart->type = cl_igs_chart=>co_type_lines.
    set picture size
      igs_chart->width = 640.
      igs_chart->height = 480.
    igs_chart->width = 1024.
    igs_chart->height = 680.
    data to be displayed in the form of Graph
      SORT it_per BY period.
      LOOP AT it_per INTO w_per.
        line-groupid = w_per-year.
        line-x = w_per-period.
        IF w_per-invturn < 0.
          w_per-invturn = w_per-invturn * -1.
          CLEAR val.
          val = w_per-invturn .
          CONCATENATE '-' val INTO line-y.
        ELSE.
          line-y = w_per-invturn.
        ENDIF.                             " IF w_per-invturn < 0
    BEGIN OF INSERT BY RMANDAL - 19/05/2008 - RD4K900419
    To dislay the values in Graph
        line-DATALABEL = line-y.
        condense line-datalabel.
    END OF INSERT BY RMANDAL - 19/05/2008 - RD4K900419
        APPEND line TO data.
        CLEAR line.
      ENDLOOP.                             " LOOP AT it_per INTO w_per
    *-Populate the IGS data
      igs_chart->data = data.
    set titles
      igs_chart->title = 'Inventory Turns'.
      igs_chart->title_values = 'No of Turns'.
      igs_chart->title_categories = 'Period'.
    create picture
      CALL METHOD igs_chart->send
        IMPORTING
          content_type            = content_type
          content_length          = content_length
          content                 = mime
          imagemap                = html
        EXCEPTIONS
          rfc_communication_error = 1
          rfc_system_error        = 2
          internal_error          = 3
          OTHERS                  = 4.
      IF sy-subrc IS INITIAL AND p_real NE space.
        SPLIT content_type AT '/' INTO content_type content_subtype.
        CALL METHOD html_control->load_data
          EXPORTING
            type         = content_type
            subtype      = content_subtype
            size         = content_length
          IMPORTING
            assigned_url = url
          CHANGING
            data_table   = mime.
        CONCATENATE
          '<HTML><HEAD><TITLE>SAP IGS Chart</TITLE></HEAD>'
          '<BODY BGCOLOR=#DEDEC8>'
          '<MAP NAME=chart>'
          INTO html_line-line.
        APPEND html_line TO p_html.
        APPEND LINES OF html TO p_html.
        CONCATENATE
          '</MAP>'
          '<IMG SRC="' url '" USEMAP=#chart BORDER=0>'
          '</BODY></HTML>'
          INTO html_line-line.
        APPEND html_line TO p_html.
      ENDIF.                               "  IF sy-subrc IS INITIAL AND..
    ENDFORM.                               " create_chart
    *&      Module  STATUS_0100  OUTPUT
          Status and Controls Initialzation
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTURN'.
      SET TITLEBAR 'ZTURN'.
      DATA: layout TYPE lvc_s_layo.
    *-Create the Container
      CREATE OBJECT cont
         EXPORTING
           container_name              = 'CONT'
         EXCEPTIONS
           cntl_error                  = 1
           cntl_system_error           = 2
           create_error                = 3
           lifetime_error              = 4
           lifetime_dynpro_dynpro_link = 5
           OTHERS                      = 6
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.                               " IF sy-subrc NE 0
    *-If Report option
      IF p_rep EQ 'X'.
    *-Creation of Grid Object
        CREATE OBJECT grid
          EXPORTING
            i_parent          = cont
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5
        IF sy-subrc NE 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.                             " IF sy-subrc NE 0
        layout-zebra = 'X'.
        layout-no_headers = 'X'.
        layout-cwidth_opt = 'X'.
        layout-grid_title = 'Inventory Turns Report'.
    *-Display the ALV
        grid->set_table_for_first_display(
           EXPORTING
             is_layout                     =  layout
           CHANGING
             it_outtab                     = it_final
             it_fieldcatalog               = it_fieldcat
         EXCEPTIONS
           invalid_parameter_combination = 1
           program_error                 = 2
           too_many_lines                = 3
        IF sy-subrc  NE 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.                             " IF sy-subrc  NE 0
    *-If Graph Option selected
      ELSEIF p_grp EQ 'X'.
      set rfc destination
        cl_gfw=>its_rfc_dest = 'IGS_RFC_DEST'.
      create hmtl control
        CREATE OBJECT html_control
          EXPORTING parent = cont.
        PERFORM create_chart USING g_html 'X'.
      get url of output data
        CALL METHOD html_control->load_data
          EXPORTING
            type         = 'text'
            subtype      = 'html'
          IMPORTING
            assigned_url = g_url
          CHANGING
            data_table   = g_html.
      Load the picture by using the url generated by the data .
        CALL METHOD html_control->show_url
          EXPORTING
            url = g_url.
    *-If Both Report and Graph Selected
      ELSE.
      set rfc destination
        cl_gfw=>its_rfc_dest = 'IGS_RFC_DEST'.
    Create Splitter for custom_container
        CREATE OBJECT split
           EXPORTING
              parent  = cont
              rows    = 2
              columns = 1.
        CALL METHOD split->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = htmlcon.
        CALL METHOD split->get_container
          EXPORTING
            row       = 2
            column    = 1
          RECEIVING
            container = gridcon.
      create hmtl control
        CREATE OBJECT html_control
          EXPORTING parent = htmlcon.
        PERFORM create_chart USING g_html 'X'.
      get url of output data
        CALL METHOD html_control->load_data
          EXPORTING
            type         = 'text'
            subtype      = 'html'
          IMPORTING
            assigned_url = g_url
          CHANGING
            data_table   = g_html.
      Load the picture by using the url generated by the data .
        CALL METHOD html_control->show_url
          EXPORTING
            url = g_url.
        CREATE OBJECT grid
          EXPORTING
            i_parent          = gridcon
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5
        IF sy-subrc NE 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.                             " IF sy-subrc NE 0
        layout-zebra = 'X'.
        layout-no_headers = 'X'.
        layout-cwidth_opt = 'X'.
        layout-grid_title = 'Inventory Turns Report'.
        grid->set_table_for_first_display(
           EXPORTING
             is_layout                     =  layout
           CHANGING
             it_outtab                     = it_final
             it_fieldcatalog               = it_fieldcat
         EXCEPTIONS
           invalid_parameter_combination = 1
           program_error                 = 2
           too_many_lines                = 3
        IF sy-subrc  NE 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.                             " IF sy-subrc  NE 0
      ENDIF.                               " IF p_rep EQ 'X'
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          User Action Handling
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
    *-Handling the User actions
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.

Maybe you are looking for

  • File Sharing on a mixed Tiger-Leopard network

    I have a LAN with two machines, a PPC with 10.4.11 and a new Laptop with 10.5.1. If I turn on file sharing on the Tiger machine, I can see and access it from Leopard. But if I turn on file sharing on the Laptop, I can find the laptop as a server when

  • Table for Customer stock in Quality inspection

    Hi In which Table the following is stored For current month Customer stock in Quality inspection Unrestricted use Consignment Stock For previous month Customer stock in Quality inspection Unrestricted use Consignment Stock Thanks RG

  • Changing font in SQL*PLUS

    I need to change Font of SQL*PLUS 3.3 to courier new and font size 8.. do you have any idea how can I achive this.. I tried changing registry also but it doesnot work. I am using Windows 95 machine. My database is Oracle 8i. Please help me if you kno

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not s

  • Internal Hard Drive doesn't show up on Time Machine menu. Why???

    So I recently bought a brand new MacBook G5 2.1 Ghz 1G RAM, and when I first set it up I had my external hard drive from my old PC laptop hooked up to and it instantly asked if I wanted to use it for my Time Machine disk. I said yes, but it then prom