Could anyone please tell me how to get my cd/disc out. thanks

could anyone please tell me how to get my disc/cd out of my desk top? thanks

CD/DVD - Eject Stuck
CD/DVD - Eject Stuck (2)
CD/DVD - Eject Stuck (3)
CD/DVD - Eject Stuck (4)
CD/DVD - Eject Stuck (5)

Similar Messages

  • HI, could anyone please tell me how you can delete more than 1 photo at a time or ipad or ipod touch?

    HI there, could anyone please tell me how you can delete more than 1 photo at a time on ipad and ipod touch??

    Delete multiple pictures at 1 go.
    1. Click the box with arrow on top right of Album.
    2. Select pictures to delete
    3. Tap Delete
    http://i1224.photobucket.com/albums/ee374/Diavonex/86e1a2c37a805bca2ccacc66c95ce 934.jpg

  • When I type into Spotlight the name of a folder on the desktop, it doesn't appear in Spotlight. Could you please tell me how to get it right? Thank you.

    When I type into Spotlight the name of a folder on the desktop, it doesn't appear in Spotlight. Could you please tell me how to get it right? Thank you.
    And, what do I do if one of the harddisks on my Mini (2010, SL Server) starts misbehaving?

    Which security software (firewall, anti-virus) do you have?
    Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps and allows to delete the Firefox program folder.

  • Could someone please tell me how to get the voice turned off my iPad and to be able to move freely around on the screen?

    Could someone please tell me how to get the voice turned off my iPad and to be able to move freely around on the screen?

    A double-tap acts like a single tap and you need to use three fingers to scroll when VoiceOver is on:
    Press Home.
    Tap Settings. Then double-tap Settings.
    Tap General. Then double-tap General.
    Use three fingers on the screen to scroll to Accessibility.
    Tap Accessibility. Then double-tap Accessibility.
    Tap VoiceOver. Then double-tap VoiceOver.
    Tap "On" next to VoiceOver. Then double-tap "On" to turn it off.
    http://support.apple.com/kb/HT4064

  • Could somebody please tell me how to get audiobooks to have their positions remembered?

    could somebody please tell me how to get audiobooks to have their positions remembered?
    please.

    Hey john cummin1,
    Thanks for the question. The following article outlines audiobooks playback on iPod shuffle:
    iPod shuffle: Playing audiobooks and podcasts
    http://support.apple.com/kb/ht1831
    Bookmarks
    iPod shuffle allows you to bookmark audiobooks purchased from Audible.com (files with a .aa extension) and the iTunes Store (files with a .M4B extension). If you stop or pause one of these spoken word files, iPod shuffle will automatically bookmark that spot. The next time you play that file, it will start playing from the bookmarked spot.
    Bookmarks sync to and from iTunes, meaning you can listen to an audiobook on iPod shuffle or in iTunes from where you last stopped listening. The bookmarked spot that is further along, whether in iPod shuffle or iTunes, becomes the effective bookmark.
    To force iTunes to set the bookmark, play an audiobook in iTunes, play another song in iTunes, and then update iPod shuffle.
    Bookmarks are not available for audiobooks or spoken word files in any other file format (such as MP3) than the two formats mentioned.
    Chapter Marks
    Some audiobooks feature chapter marks that allow you to navigate through chapters while listening in iTunes. iPod shuffle (3rd generation) allows you to navigate through an audiobook using these chapter marks.  Simply select the playlist that iPod shuffle creates for the specific audiobook you'd like to listen to and while listening, double-click the Center button to go to the next chapter or triple-click the Center button (within 6 seconds of the start of the chapter) to go to the previous chapter. See HT3458 for additional controls using the remote. iPod shuffle (1st and 2nd generation) does not support chapter marks.
    Note: Chapter marks will be ignored if the audiobook playing is in a mixed playlist that you created (such as one that contains other songs or podcasts).
    Thanks,
    Matt M.

  • I bought a new iphone 4 and I can't restore my photos.. Could you please tell me how to get my photos back..

    I have changed my iphone 4 due to a lost.. Therefore I had to restore my back up from iTunes to the new phone, but my photos library has not been synchronized.. what is the reson for that and could anyone tell me how to restore that if it is possible to do that..

    well how would you expect to get those photos back if you didn't import them to your computer as recommended?

  • Could anyone please tell me how to expalin an informatica project in interview..

    Hi Narayan, As you provided below points abt project explanation - i have added generic explanation about project. But my explanation is not proper. Request you to please guide  me in right direction and add some point from your side which will help me in interviews. > Project Domain with (Optional: Architecture or Design format that your client is following) -  Our project is in aviation domain. Objective of our project is to fetch data from heterogeneous source systems and load data into DWH depending on business scearios/requirements. > Your responsibilities in details My responsibilities are to develope mappings depending on business requirements. We are getting LLD in which flow of mapping is provided along with transformation details. So we have to develope mapping based on LLD. > What kind of data is coming & some brief of different Source Our source system are mostly files and relation table (Oracle) and target are relational table (Oracle) > Bottleneck’s that you have encountered in your project with solution what to explai here. Plaese provide with example > Some new experience(Technically). Request you to please add two/three points here

    What      are your Daily routines?            Cheking any imp mails are came.Need to disucss with Team lead if we have to do anywork. By EOD send the mail to team lead regarding work. need to attend weekly status meeting.How      many mapping have you created all together in your project?        As of now i did 3 projects first project : 48 workflows , second : 52 workflow , third project : 156 worlfows as of now.  In      which account does your Project Fall?          account???         hope its manufacturing and advanced services. What      is your Reporting Hierarchy?           me -->team lead--->Project Manager--->programming Manager         me---> AR--->HR  How      many Complex Mapping’s have you created? Could you please me the situation      for which you have developed that Complex mapping?          i think 8 , one for character by character  comparision (with informatica not possible) so written 950 lines if single SQL code. and one for Dynamical Hierarchy distribution .... and one for Multi byte characters ( japanes,chines,..etc) and so on...      What is your Involvement in Performance tuning of your      Project?   some times any way performance team will take care of my code.What is the Schema of your Project? And why did you opt      for that particular schema?     some_Prd --->that is the souce for us  What are your Roles in this project?            as a developer , desing the workflows , unit testing, and so on... 
    Can I have one situation which you have adopted by      which performance has improved dramatically?         yes ..... my firest project ..i faced perormance issue after go live.  Where you Involved in more than two projects      simultaneously?         of couse ,, i involved 3 projects at a time. Do you have any experience in the Production support?           no
    What kinds of Testing have you done on your Project      (Unit or Integration or System or UAT)? And Enhancement’s were done after      testing?        Unit testing and sometimes integration. UAT will done by business not BI team.How many Dimension Table are there in your Project and      how are they linked to the fact table?           current project 18 and 2 facts . and relationship will always be dimention keys. 
    How do we do the Fact Load?           loding the fact table ??      after dimention load complete .. How did you implement CDC in your project?          change data capture ??        It is always on souce modification date. 
    How does your Mapping in File to Load look like?              souce --->ods--->flat file ( .dat) -- e cap delimeter
    How does your Mapping in Load to Stage look like?           is depends on project ...          Souce -->ods--->stage
    How does your Mapping in Stage to ODS look like?            Stage to ods ???         never ...
    What is the size of your Data warehouse?           10 TBWhat is your Daily feed size and weekly feed size?        feed size>???Which Approach (Top down or Bottom Up) was used in      building your project?            Bottom up ---i mean you are asking about dimention to fact and fact to dimention??How do you access your source’s (are they Flat files or      Relational)?               Relational and some times flat files also.
    Have you developed any Stored Procedure or triggers in      this project? How did you use them and in which situation?              no
    Did your Project go live? What are the issues that you      have faced while moving your project from the Test Environment to the      Production Environment?           yeah...i faced some issues.
    What is the biggest Challenge that you encountered in      this project?          Dynamic hierachy data distribution and moving the files from unix box to informatica directory through shell scriopt , need to clean the data in flatfile itselt. 
    What is the scheduler tool you have used in this      project? How did you schedule jobs using it?           Dollar Universe.. by using $U Sessioin task.   
         ---Naresh Neelam if you have any questions please send me a mail. i dont have access outside network at my work.

  • Could anyone please tell me how to start to solve this problem?

    Hi,
    I'm new to SOA world. I was making a PURCHASE ORDER PROCESSING application.
    I created DB connection,Credit Card Validation Service, Purchase Order Routing Service,
    BPEL Orchestration, Adding Human Workflow, Adding Business Rules, then Adding Fulfillment.
    From that time one problem was created,showing BPEL component has invalid settings.
    As i told before i'm new to this technology, so could anyone tell me how to start to check and solve this problem ?
    I have no idea from where and how to start.
    Regards,
    Sujay
    Edited by: Sujay S on Sep 17, 2009 3:18 PM

    Hi James,
    I'm new to SOA world. I was making a PURCHASE ORDER PROCESSING application.
    I created DB connection,Credit Card Validation Service, Purchase Order Routing Service,
    BPEL Orchestration, Adding Human Workflow, Adding Business Rules, then Adding Fulfillment.
    From that time one problem was created,showing BPEL component has invalid settings.
    As i told before i'm new to this technology, so could anyone tell me how to start to check and solve this problem ?
    I have no idea from where and how to start.
    Regards,
    Sujay

  • Can anyone please tell me how to get iTunes to accept my security code. Suddenly my card isn't good enough...

    For someone reason my iPhone demanded I update my billing information when I tried to update my apps. It required the security code for my card. I entered it, correctly at least 20 times until I because frustrated and tried it on my iMac. I updated iTunes, reset my billing information and then redid it. NOTHING! I read up on this online and they said that because it's a Debit card iTunes won't accept it. Here's the problem, it's a VISA Debit so it has to be accepted if they have the VISA logo on their site... it's a VISA. And furthermore it has always worked for me. Anyone have this same problem, or better yet find a solution? Please and thank you...

    Customer Service:
    Dial *611 from a cell phone
    (800) 922-0204
    Monday - Sunday 6 am - 11 pm      
    When you get the phone tree, press 4 and then say Agent.                                       

  • I have just updated my phone with IOS 6.1.2, everything is still there except my photos. Can anyone please tell me how to get them back or where to find them?

    Please help, having just updated my iPhone 4 to IOS 6.1.2, everything is where i left it regards to contacts, music and apps, but my photos have gone. Please please can someone tell me where to find them/get them back.

    Did you do File > Transfer Purchases (File > Devices > Transfer Purchases on iTunes 11) to copy your iTunes purchases over to your computer's iTunes prior to updating ? iTunes downloads (apps, ringtones, music, films, tv shows, ibooks) aren't included in a backup, only the contents and settings of third-party apps.
    You should be able to re-download apps and, depending upon what country that you are in, potentially music : re-downloading. Ringtones are a one-time only download, so if they aren't on your computer nor on a backup then you will need to try contacting iTunes support and see if they will grant you a re-download : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Can anyone please Tell me how to get a complete browser history including Date and TIME?

    I really need help finding out what time a website was visited that is in the browsers history. How can I get a complete browser history or set the iPhone to keep longer than a week. Is there a way to look back further than the dates shown? IOS there a app you can download that will keep track of safaris browser history and what time a site was accessed ? Thank you for your help:)

    Sorry, this just isn't possible.

  • COULD SOMEONE PLEASE TELL ME HOW TO GET AND KEEP THE MAIL ICON ON MY SHELF? I LOSE MY ICON AFTER START UP AND HAVE TO GO GET IT THROUGH FINDER! WHY IS THIS NOT STAYING ON MY SHELF? TY

    RECENTLY MY MAIL AND SAFARI ICON HAVE BEEN DISAPPEARING FROM THE SHELF, I HAVE TO GO THROUGH FINDER TO RETRIEVE THEM. WHEN I DRAG THEM TO THE SHELF THEY STAY AND ALL OF A SUDDEN DISAPPEAR, CAN ANYONE TELL ME WHY THIS IS HAPPENING AND WHAT IM DOING WRONG? ANY HELP WOULD BE GREATLY APPRECIATED! THANKS!!

    When the applications are next launched click and hold on the icon in the dock and select 'options>keep in dock'.
    P.S. No need for caps - it's considered to be shouting - not necessary round here

  • Could anyone please tell me how to tuning my program?

    I have already executed the program with SE30.
    I think that the program has some problem SQL in form
    "GET_BACK_ORDER       (Fetch VBAP, Net % = <b>26.2</b>)" and
    "GET_PENDING_ORDER (Fetch AUFK,  Net % = <b>25.7</b>)"
    but I can not find the data that I want from others table and I don't know how to tuning both form.
    Source code for Review of Sales Forecast
    REPORT  ZLPPRP26
            LINE-SIZE 573
            NO STANDARD PAGE HEADING.
      T A B L E S                                                        *
    TABLES: pbed,      "Independent Requirements Data
            pbim.      "Independent Requirements for Material
    TABLES: afko,      "Order header data PP orders
            aufk,      "Order master data
            t399x,     "Plant/order type
            tj02t,     "Text Status for check status of Process Order
            s003,      "Sale Order
            vbep,      "Sales Document: Schedule Line Data (QTY)
            vbap,      "Sales Document: Item Data (Material)
            vbup,      "Sales Document: Item Status
            mchb,      "Stock
            mcha,      "Stock description
            mara.      "General Material Data
    *................................ Include ISO declarations
    INCLUDE zstprpi1.
      T Y P E S                                                          *
    TYPES: boolean(1).
    TYPE-POOLS : slis.
      W O R K I N G   S T O R A G E   D A T A                            *
    DATA: BEGIN OF wa_pbim,
            matnr  LIKE  pbim-matnr,     " MATERIAL NO.
            werks  LIKE  pbim-werks,     " PLANT.
            bedae  LIKE  pbim-bedae,     " REQUIREMENT TYPE.
            versb  LIKE  pbim-versb,     " VERSION.
            pbdnr  LIKE  pbim-pbdnr,     " REQUIREMENT PLAN NO.
            bdzei  LIKE  pbim-bdzei,     " INQ REQUIREMENT POINTER.
            vervs  LIKE  pbim-vervs,     " STATUS ACTIVE-INACTIVE.
          END OF wa_pbim.
    DATA: BEGIN OF wa_pbed,
            pdatu  LIKE  pbed-pdatu,     " FINISH DATE
            bdzei  LIKE  pbed-bdzei,     " INQ REQUIREMENT POINTER.
            aenam  LIKE  pbed-aenam,     " NAME OF PERSON CHANGE.
            laeda  LIKE  pbed-laeda,     " DATE CHANGE.
            meins  LIKE  pbed-meins,     " UM.
            plnmg  LIKE  pbed-plnmg,     " PLAN QTY.
            entlu  LIKE  pbed-entlu,     " PERIOD INDICATOR
            perxx  LIKE  pbed-perxx,     " PLANNING PERIOD
          END OF wa_pbed.
    DATA: BEGIN OF wa_marc,     
            matnr  LIKE  marc-matnr,      " MAT CODE
            werks  LIKE  marc-werks,      " PLANT
            maabc  LIKE  marc-maabc,     " Class
            dismm  LIKE  marc-dismm,     " MRP Type
            dispo  LIKE  marc-dispo,     " MRP Controller
            eisbe  LIKE  marc-eisbe,     " Safety Stock
            bstfe  LIKE  marc-bstfe,     " Fix
            bstmi  LIKE  marc-bstmi,     " Min
            bstma  LIKE  marc-bstma,     " Max
          END OF wa_marc.
    DATA : BEGIN OF wa_mchb,
            matnr  LIKE  mchb-matnr,     " Mat Code
            werks  LIKE  mchb-werks,     " Plant
            clabs  LIKE  mchb-clabs,      " UR
            cinsm  LIKE  mchb-cinsm,      " QI
            cspem  LIKE  mchb-cspem,      " BL
            lgort  LIKE  mchb-lgort,     " Storage Location
            charg  LIKE  mchb-charg,     " Batch
          END OF wa_mchb.
    DATA : BEGIN OF wa_all_material,     " **MAIN OF PROGRAM**
            matnr  LIKE  mara-matnr,     " Mat Code
            werks  LIKE  marc-werks,      " Plant
            maabc  LIKE  marc-maabc,     " Class
            dismm  LIKE  marc-dismm,     " MRP Type
            dispo  LIKE  marc-dispo,     " MRP Controller
            meins  LIKE  mara-meins,     " UoM
            mseht  LIKE  t006a-mseht,    " UoM Text
            maktx  LIKE  makt-maktx,     " Mat Description
          END OF wa_all_material.
    DATA: BEGIN OF wa_ind_req,
            matnr  LIKE  pbim-matnr,     " MATERIAL NO.
            werks  LIKE  pbim-werks,     " PLANT.
            bedae  LIKE  pbim-bedae,     " REQUIREMENT TYPE.
            versb  LIKE  pbim-versb,     " VERSION.
            pbdnr  LIKE  pbim-pbdnr,     " REQUIREMENT PLAN NO.
            bdzei  LIKE  pbim-bdzei,     " INQ REQUIREMENT POINTER.
            vervs  LIKE  pbim-vervs,     " STATUS ACTIVE-INACTIVE.
            pdatu  LIKE  pbed-pdatu,     " FINISH DATE &#3585;&#3619;&#3603;&#3637; DAY Period
            aenam  LIKE  pbed-aenam,     " NAME OF PERSON CHANGE.
            laeda  LIKE  pbed-laeda,     " DATE CHANGE.
            plnmg  LIKE  pbed-plnmg,     " PLAN QTY.
            entli  LIKE  pbed-entli,     " Date type (1day, 2week, 3month)
            perxx  LIKE  pbed-perxx,     " PLANNING PERIOD
          END OF wa_ind_req.
    DATA: BEGIN OF wa_ind_req1,
            matnr  LIKE  pbim-matnr,     " MATERIAL NO.
           meins  LIKE  pbed-meins,     " UM. [Tiwa 31072006]
            plnmg  LIKE  pbed-plnmg,     " PLAN QTY.
            entli  LIKE  pbed-entli,     " Date type (1day, 2week, 3month)
            perxx  LIKE  pbed-perxx,     " PLANNING PERIOD
            pdatu  LIKE  pbed-pdatu,     " FINISH DATE &#3585;&#3619;&#3603;&#3637; DAY Period
          END OF wa_ind_req1.
    DATA: BEGIN OF wa_ind_rep,
            matnr  LIKE  pbim-matnr,     " MATERIAL NO.
            cw4    LIKE  pbed-plnmg,     " PLAN QTY of week from user
            nw1    LIKE  pbed-plnmg,     " PLAN QTY next month week1
            nw2    LIKE  pbed-plnmg,     " PLAN QTY next month week2
            nw3    LIKE  pbed-plnmg,     " PLAN QTY next month week3
            nw4    LIKE  pbed-plnmg,     " PLAN QTY next month week4
            nw5    LIKE  pbed-plnmg,     " PLAN QTY next month week5
            mxx    LIKE  pbed-plnmg,     " PLAN QTY next month(Period Month)
            ntotal LIKE  pbed-plnmg,     "
          END OF wa_ind_rep.
    DATA: BEGIN OF wa_sales_hist,
            spbup    LIKE  s003-spbup,      " Period to analyze
            vkorg    LIKE  s003-vkorg,      " Sales Organization(Plant)
            matnr    LIKE  s003-matnr,      " Mat Code
            aemenge  LIKE  s003-aemenge, " incoming orders Qty
            ummenge  LIKE  s003-ummenge, " Billing Qty
            ssour    LIKE  s003-ssour,   " for key
            vrsio    LIKE  s003-vrsio,   " for key
            spmon    LIKE  s003-spmon,   " for key
            sptag    LIKE  s003-sptag,   " for key
            spwoc    LIKE  s003-spwoc,   " for key
            vtweg    LIKE  s003-vtweg,   " for key
            spart    LIKE  s003-spart,   " for key
            bzirk    LIKE  s003-bzirk,   " for key
            kunnr    LIKE  s003-kunnr,   " for key
          END OF wa_sales_hist.
    DATA: BEGIN OF wa_sales_report,
            matnr    LIKE  s003-matnr,      " Mat Code
            m_3      LIKE  s003-aemenge, " incoming orders Qty m-3
            m_2      LIKE  s003-aemenge, " incoming orders Qty m-2
            m_1      LIKE  s003-aemenge, " incoming orders Qty m-1
            m_0      LIKE  s003-aemenge, " incoming orders Qty m-0
            estim    TYPE  P DECIMALS 3,
            avg_sale TYPE  P DECIMALS 3,
          END OF wa_sales_report.
    DATA: BEGIN OF wa_back_order,
            matnr    LIKE  vbap-matnr,     " Mat Code
            wmeng    LIKE  vbep-wmeng,     " Order quantity
            bmeng    LIKE  vbep-bmeng,     " Confirmed quantity
           vrkme    LIKE  vbep-vrkme,     " Sales unit [Tiwa 31072006]
          END OF wa_back_order.
    DATA: BEGIN OF wa_backord_rep,
            matnr    LIKE  vbap-matnr,     " Mat Code
            back     LIKE  vbep-wmeng,     " Order quantity
          END OF wa_backord_rep.
    DATA: BEGIN OF wa_pending_order,
            objnr    LIKE  jest-objnr,  " Object
            matnr    LIKE  afpo-matnr,  " Material
            psmng    LIKE  afpo-psmng,  " Order Item QTY
            wemng    LIKE  afpo-wemng,  " GR QTY
            amein    LIKE  afpo-amein,  " UoM for Inhouse Prod
          END OF wa_pending_order.
    DATA: BEGIN OF wa_pending_rep,
            matnr    LIKE  afpo-matnr,  " Material
            psmng    LIKE  afpo-psmng,  " Order Item QTY
          END OF wa_pending_rep.
    DATA: BEGIN OF wa_batch_safety,
            matnr    LIKE  marc-matnr,  " Mat Code
            eisbe    LIKE  marc-eisbe,     " Safety Stock
            bstfe    LIKE  marc-bstfe,     " Fix
            bstmi    LIKE  marc-bstmi,     " Min
            bstma    LIKE  marc-bstma,     " Max
          END OF wa_batch_safety.
    DATA: BEGIN OF wa_vbep,
            vbeln    LIKE  vbep-vbeln,  "Sales Document
            posnr    LIKE  vbep-posnr,  "Sales Document Item
            wmeng    LIKE  vbep-wmeng,  "Order quantity in sales units
            bmeng    LIKE  vbep-bmeng,  "Confirmed quantity
          END OF wa_vbep.
    DATA: BEGIN OF wa_vbap,
            vbeln    LIKE  vbap-vbeln,    "Sales Document
            posnr    LIKE  vbap-posnr,    "Sales Document Item
            matnr    LIKE  vbap-matnr,    "Material Code
            kwmeng   LIKE  vbap-kwmeng,   "Order Qty.
            kbmeng   LIKE  vbap-kbmeng,   "Comfirmed Qty.
            klmeng   LIKE  vbap-klmeng,   "Back Order.
          END OF wa_vbap.
    DATA: BEGIN OF wa_vbup,
            vbeln    LIKE  vbup-vbeln,  "Sales Document
            posnr    LIKE  vbup-posnr,  "Sales Document Item
          END OF wa_vbup.
    DATA: BEGIN OF wa_vbfa,
            VBELV    LIKE  vbfa-VBELV,   "Preceding SO
            POSNV    LIKE  vbfa-POSNV,   "Preceding item of an SD document
            VBTYP_N  LIKE  vbfa-VBTYP_N, "Document category J = D/O
            RFMNG    LIKE  vbfa-RFMNG,   "QTY in D/O
            MATNR    LIKE  vbfa-MATNR,   "Material
            VBELN    LIKE  vbfa-VBELN,   "Subsequent SD Doc.
            POSNN    LIKE  vbfa-POSNN,   "Subsequent item of an SD document
          END OF wa_vbfa.
    DATA:  matclss  LIKE  marc-maabc,      " SLECTION OPTION
           mrpcont  LIKE  marc-dispo,      " SLECTION OPTION
           p_week   LIKE  scal-week,       " Apply from parameter P_WEEK
           p_week4  LIKE  scal-week VALUE 999999, "add in 270706
           tmpweek  LIKE  scal-week,       " return of FORM date_2_week
           tmpdate  LIKE  scal-date,       " return of FORM week_get_1st_day
           tmp_next_week  LIKE  scal-week, " return of FORM next_week.
           yyyymm_nextmonth(6) TYPE C,
           firstdate_of_week_of_monthend LIKE  scal-date, "1st&#3586;&#3629;&#3591;week&#3626;&#3640;&#3604;&#3607;&#3657;&#3634;&#3618;
           all_mat_found  TYPE I VALUE 1.  " Use in FORM read_all_material
    DATA : next_month      LIKE  scal-date,
           next_next_month LIKE  scal-date,
           next_month_w1   LIKE  scal-week,
           next_month_w2   LIKE  scal-week,
           next_month_w3   LIKE  scal-week,
           next_month_w4   LIKE  scal-week,
           next_month_w5   LIKE  scal-week,
           next_next_month_w1  LIKE  scal-week,
           next_next_month_w2  LIKE  scal-week,
           next_next_month_w3  LIKE  scal-week,
           next_next_month_w4  LIKE  scal-week,
           next_next_month_w5  LIKE  scal-week.
    DATA : prev_month  LIKE  scal-date,  "GLOBAL
           prev_month0(6)  TYPE  C,      "Current Month
           prev_month1(6)  TYPE  C,
           prev_month2(6)  TYPE  C,
           prev_month3(6)  TYPE  C.
    DATA : date1_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "MON
           date2_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "TUE
           date3_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "WED
           date4_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "THU
           date5_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "FRI
           date6_in_currweek4_1  LIKE scal-date  VALUE 99999999,  "SAT
           date7_in_currweek4_1  LIKE scal-date  VALUE 99999999.  "SUN
    DATA : date1_in_currweek4  LIKE scal-date,  "MON
           date2_in_currweek4  LIKE scal-date,  "TUE
           date3_in_currweek4  LIKE scal-date,  "WED
           date4_in_currweek4  LIKE scal-date,  "THU
           date5_in_currweek4  LIKE scal-date,  "FRI
           date6_in_currweek4  LIKE scal-date,  "SAT
           date7_in_currweek4  LIKE scal-date.  "SUN
    DATA : date1_in_nextmonth_week1  LIKE scal-date,  "MON
           date2_in_nextmonth_week1  LIKE scal-date,  "TUE
           date3_in_nextmonth_week1  LIKE scal-date,  "WED
           date4_in_nextmonth_week1  LIKE scal-date,  "THU
           date5_in_nextmonth_week1  LIKE scal-date,  "FRI
           date6_in_nextmonth_week1  LIKE scal-date,  "SAT
           date7_in_nextmonth_week1  LIKE scal-date.  "SUN
    DATA : date1_in_nextmonth_week2  LIKE scal-date,  "MON
           date2_in_nextmonth_week2  LIKE scal-date,  "TUE
           date3_in_nextmonth_week2  LIKE scal-date,  "WED
           date4_in_nextmonth_week2  LIKE scal-date,  "THU
           date5_in_nextmonth_week2  LIKE scal-date,  "FRI
           date6_in_nextmonth_week2  LIKE scal-date,  "SAT
           date7_in_nextmonth_week2  LIKE scal-date.  "SUN
    DATA : date1_in_nextmonth_week3  LIKE scal-date,  "MON
           date2_in_nextmonth_week3  LIKE scal-date,  "TUE
           date3_in_nextmonth_week3  LIKE scal-date,  "WED
           date4_in_nextmonth_week3  LIKE scal-date,  "THU
           date5_in_nextmonth_week3  LIKE scal-date,  "FRI
           date6_in_nextmonth_week3  LIKE scal-date,  "SAT
           date7_in_nextmonth_week3  LIKE scal-date.  "SUN
    DATA : date1_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "MON
           date2_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "TUE
           date3_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "WED
           date4_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "THU
           date5_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "FRI
           date6_in_nextmonth_week4  LIKE scal-date VALUE 99999999,  "SAT
           date7_in_nextmonth_week4  LIKE scal-date VALUE 99999999.  "SUN
    DATA : date1_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "MON
           date2_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "TUE
           date3_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "WED
           date4_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "THU
           date5_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "FRI
           date6_in_nextmonth_week5  LIKE scal-date VALUE 99999999,  "SAT
           date7_in_nextmonth_week5  LIKE scal-date VALUE 99999999.  "SUN
    DATA : t_fieldcat   TYPE  slis_t_fieldcat_alv.
      I N T E R N A L   T A B L E S                                      *
    DATA: it_pbim           LIKE wa_pbim          OCCURS 0 WITH HEADER LINE,
          it_pbed           LIKE wa_pbed          OCCURS 0 WITH HEADER LINE,
          it_stock          LIKE wa_mchb          OCCURS 0 WITH HEADER LINE,
          it_stock_rep      LIKE wa_mchb          OCCURS 0 WITH HEADER LINE,
          it_ind_req        LIKE wa_ind_req       OCCURS 0 WITH HEADER LINE,
          it_ind_req1       LIKE wa_ind_req1      OCCURS 0 WITH HEADER LINE,
          it_ind_rep        LIKE wa_ind_rep       OCCURS 0 WITH HEADER LINE,
          it_tmp_sales_hist LIKE wa_sales_hist    OCCURS 0 WITH HEADER LINE,
          it_sales_hist     LIKE wa_sales_hist    OCCURS 0 WITH HEADER LINE,
          it_back_order     LIKE wa_back_order    OCCURS 0 WITH HEADER LINE,
          it_pending_order  LIKE wa_pending_order OCCURS 0 WITH HEADER LINE,
          it_sales_report   LIKE wa_sales_report  OCCURS 0 WITH HEADER LINE,
          it_backord_rep    LIKE wa_backord_rep   OCCURS 0 WITH HEADER LINE,
          it_batch_safety   LIKE wa_batch_safety  OCCURS 0 WITH HEADER LINE,
          it_pending_rep    LIKE wa_pending_rep   OCCURS 0 WITH HEADER LINE,
          it_all_material   LIKE wa_all_material  OCCURS 0 WITH HEADER LINE,
          t_vbap            LIKE wa_vbap          OCCURS 0 WITH HEADER LINE,
          t_vbep            LIKE wa_vbep          OCCURS 0 WITH HEADER LINE,
          t_vbfa            LIKE wa_vbfa          OCCURS 0 WITH HEADER LINE,
          t_vbup            LIKE wa_vbup          OCCURS 0 WITH HEADER LINE.
      R A N G E S                                                        *
    RANGES: r_month    FOR  pbed-pdatu,
            r_matnr    FOR  pbim-matnr.
      S E L E C T - O P T I O N S   A N D   P A R A M E T E R S          *
    SELECTION-SCREEN: BEGIN OF BLOCK bk1 WITH FRAME TITLE text-007.
      PARAMETERS:     p_werks  LIKE pbim-werks OBLIGATORY. "DEFAULT '1100'.
      SELECT-OPTIONS: s_matnr  FOR  mara-matnr.
      SELECT-OPTIONS: s_matc   FOR  matclss.
      SELECT-OPTIONS: s_mrpc   FOR  mrpcont OBLIGATORY.
      PARAMETERS :    p_month  LIKE s003-spbup OBLIGATORY.
    SELECTION-SCREEN : END OF BLOCK bk1.
      M A C R O   C O M M A N D   D E F I N I T I O N                    *
    DEFINE m%print_right.
      write at sy-linsz ''.
    END-OF-DEFINITION.
      MAIN PROGRAM                                                       *
    START-OF-SELECTION.
      PERFORM date_2_week USING sy-datum.  "return to tmpweek
      PERFORM get_last_week_of_month.
      PERFORM process_get_month_for_sales.
      PERFORM get_week_next_month.
      PERFORM get_week_next_next_month.
      PERFORM get_date_in_currweek4.
      PERFORM get_date_in_week_in_nextmonth.
      PERFORM read_all_material.
      IF all_mat_found EQ 1.        "Found some of material
        PERFORM read_stock.
        PERFORM read_pbim_pbed_data.
        PERFORM get_sales_history.
        PERFORM get_back_order.
        PERFORM get_pending_order.
        PERFORM print_report.
      ENDIF.
    *&      Form  read_pbim_pbed_data
    FORM read_pbim_pbed_data.
      yyyymm_nextmonth = next_month+0(6).
      SELECT pbimmatnr pbimwerks pbim~bedae
             pbimversb pbimpbdnr pbimbdzei pbimvervs
             pbedpdatu pbedaenam pbed~laeda
             pbedplnmg pbedentli pbed~perxx
      INTO TABLE it_ind_req
      FROM pbim
      INNER JOIN pbed
            ON pbimbdzei = pbedbdzei
      FOR ALL ENTRIES IN it_all_material
      WHERE pbim~vervs = 'X'  AND      "Active Version
            pbim~werks = p_werks AND
            pbim~matnr EQ it_all_material-matnr AND
            ( ( pbedperxx = next_month_w1 AND pbedentli = 2 ) OR
              ( pbedperxx = next_month_w2 AND pbedentli = 2 ) OR
              ( pbedperxx = next_month_w3 AND pbedentli = 2 ) OR
              ( pbedperxx = next_month_w4 AND pbedentli = 2 ) OR
              ( pbedperxx = next_month_w5 AND pbedentli = 2 ) OR
              ( pbedperxx = p_week        AND pbedentli = 2 ) OR
              ( pbedperxx = p_week4       AND pbedentli = 2 ) OR "27072006
              ( pbed~pdatu between date1_in_currweek4 AND
                                   date7_in_currweek4 ) OR
              ( pbed~pdatu between date1_in_currweek4_1 AND   "add 27072006
                                   date7_in_currweek4_1 ) OR  "add 27072006
              ( pbed~pdatu between date1_in_nextmonth_week1 AND
                                   date7_in_nextmonth_week1 ) OR
              ( pbed~pdatu between date1_in_nextmonth_week2 AND
                                   date7_in_nextmonth_week2 ) OR
              ( pbed~pdatu between date1_in_nextmonth_week3 AND
                                   date7_in_nextmonth_week3 ) OR
              ( pbed~pdatu between date1_in_nextmonth_week4 AND
                                   date7_in_nextmonth_week4 ) OR
              ( pbed~pdatu between date1_in_nextmonth_week5 AND
                                   date7_in_nextmonth_week5 ) OR
              ( pbedperxx = yyyymm_nextmonth AND pbedentli = 3 ) ).
      LOOP AT it_ind_req.
        wa_ind_req1-matnr = it_ind_req-matnr.
        wa_ind_req1-plnmg = it_ind_req-plnmg.
        wa_ind_req1-entli = it_ind_req-entli.
        wa_ind_req1-perxx = it_ind_req-perxx.
        wa_ind_req1-pdatu = it_ind_req-pdatu.
        COLLECT wa_ind_req1 INTO it_ind_req1.
      ENDLOOP.
      PERFORM get_ind_rep.
      PERFORM get_batch_safe.
    ENDFORM.
    *&      Form  get_batch_safe
    FORM get_batch_safe.
      DATA: wl_marc LIKE marc,
            safety  LIKE marc-eisbe VALUE 0,
            fix     LIKE marc-eisbe VALUE 0,
            min     LIKE marc-eisbe VALUE 0,
            max     LIKE marc-eisbe VALUE 0.
      LOOP AT it_all_material.
        CLEAR : wl_marc, safety, fix, min, max.
        SELECT SINGLE * FROM marc INTO wl_marc
        WHERE  matnr = it_all_material-matnr AND
               werks = p_werks.
        IF sy-subrc EQ 0.
          safety = wl_marc-eisbe.  " Safety Stock
          fix    = wl_marc-bstfe.  " Fix
          min    = wl_marc-bstmi.  " Min
          max    = wl_marc-bstma.  " Max
        ENDIF.
        it_batch_safety-matnr = it_all_material-matnr.
        it_batch_safety-eisbe = safety.  " Safety Stock
        it_batch_safety-bstfe = fix.     " Fix
        it_batch_safety-bstmi = min.     " Min
        it_batch_safety-bstma = max.     " Max
        APPEND it_batch_safety.
      ENDLOOP.
    ENDFORM.
    *&      Form  get_ind_rep
    FORM get_ind_rep.
      DATA: cw4     TYPE  P VALUE 0 DECIMALS 3,
            nw1     TYPE  P VALUE 0 DECIMALS 3,
            nw2     TYPE  P VALUE 0 DECIMALS 3,
            nw3     TYPE  P VALUE 0 DECIMALS 3,
            nw4     TYPE  P VALUE 0 DECIMALS 3,
            nw5     TYPE  P VALUE 0 DECIMALS 3,
            mxx     TYPE  P VALUE 0 DECIMALS 3, "Add in 12/07/2006 by Tiwa
            ntotal  TYPE  P VALUE 0 DECIMALS 3.
      LOOP AT it_all_material.
        CLEAR: ntotal, cw4, nw1, nw2, nw3, nw4, nw5, mxx, wa_ind_rep.
        LOOP AT it_ind_req1 WHERE matnr = it_all_material-matnr.
          IF ( ( ( it_ind_req1-perxx EQ p_week  ) AND
                 ( it_ind_req1-entli EQ 2 ) ) OR
               ( ( it_ind_req1-pdatu EQ date1_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date2_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date3_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date4_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date5_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date6_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date7_in_currweek4 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-perxx EQ p_week4 ) AND
                 ( it_ind_req1-entli EQ 2 ) ) OR
               ( ( it_ind_req1-pdatu EQ date1_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date2_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date3_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date4_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date5_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date6_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) OR
               ( ( it_ind_req1-pdatu EQ date7_in_currweek4_1 ) AND
                 ( it_ind_req1-entli EQ 1 ) ) ).
            cw4 = cw4 + it_ind_req1-plnmg.
          ELSEIF ( ( ( it_ind_req1-perxx EQ next_month_w1 ) AND
                     ( it_ind_req1-entli EQ 2 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date1_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date2_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date3_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date4_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date5_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date6_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date7_in_nextmonth_week1 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) ).
            nw1 = nw1 + it_ind_req1-plnmg.
          ELSEIF ( ( ( it_ind_req1-perxx EQ next_month_w2 ) AND
                     ( it_ind_req1-entli EQ 2 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date1_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date2_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date3_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date4_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date5_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date6_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date7_in_nextmonth_week2 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) ).
            nw2 = nw2 + it_ind_req1-plnmg.
          ELSEIF ( ( ( it_ind_req1-perxx EQ next_month_w3 ) AND
                     ( it_ind_req1-entli EQ 2 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date1_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date2_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date3_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date4_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date5_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date6_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date7_in_nextmonth_week3 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) ).
            nw3 = nw3 + it_ind_req1-plnmg.
          ELSEIF ( ( ( it_ind_req1-perxx EQ next_month_w4 ) AND
                     ( it_ind_req1-entli EQ 2 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date1_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date2_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date3_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date4_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date5_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date6_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date7_in_nextmonth_week4 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) ).
            nw4 = nw4 + it_ind_req1-plnmg.
          ELSEIF ( ( ( it_ind_req1-perxx EQ next_month_w5 ) AND
                     ( it_ind_req1-entli EQ 2 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date1_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date2_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date3_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date4_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date5_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date6_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) OR
                   ( ( it_ind_req1-pdatu EQ date7_in_nextmonth_week5 ) AND
                     ( it_ind_req1-entli EQ 1 ) ) ).
            nw5 = nw5 + it_ind_req1-plnmg.
          ELSEIF ( ( it_ind_req1-perxx EQ yyyymm_nextmonth ) AND
                   ( it_ind_req1-entli EQ 3 ) ).
            mxx    = mxx + it_ind_req1-plnmg.
            ntotal = ntotal + it_ind_req1-plnmg.
          ENDIF.
        ENDLOOP.
        ntotal = ntotal + ( nw1 + nw2 + nw3 + nw4 + nw5 ).
        wa_ind_rep-matnr   = it_all_material-matnr.
        wa_ind_rep-cw4     = cw4.
        wa_ind_rep-nw1     = nw1.
        wa_ind_rep-nw2     = nw2.
        wa_ind_rep-nw3     = nw3.
        wa_ind_rep-nw4     = nw4.
        wa_ind_rep-nw5     = nw5.
        wa_ind_rep-mxx     = mxx.
        wa_ind_rep-ntotal  = ntotal.
        IF wa_ind_rep-ntotal > 0.
          APPEND wa_ind_rep TO it_ind_rep.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    *&      Form  date_2_week
    FORM date_2_week USING inp_date.
      CLEAR tmpweek.
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          date = inp_date
        IMPORTING
          week = tmpweek
        EXCEPTIONS
          date_invalid = 1
          others = 2.
    ENDFORM.
    *&      Form  get_date_in_currweek4
    FORM get_date_in_currweek4.
      PERFORM week_get_1st_day USING p_week.  "return to tmpdate
      date1_in_currweek4 = tmpdate.                "MON
      date2_in_currweek4 = date1_in_currweek4 + 1. "TUE
      date3_in_currweek4 = date2_in_currweek4 + 1. "WED
      date4_in_currweek4 = date3_in_currweek4 + 1. "THU
      date5_in_currweek4 = date4_in_currweek4 + 1. "FRI
      date6_in_currweek4 = date5_in_currweek4 + 1. "SAT
      date7_in_currweek4 = date6_in_currweek4 + 1. "SUN
      IF p_week4 NE 999999.
        PERFORM week_get_1st_day USING p_week4.  "return to tmpdate
        date1_in_currweek4_1 = tmpdate.                  "MON
        date2_in_currweek4_1 = date1_in_currweek4_1 + 1. "TUE
        date3_in_currweek4_1 = date2_in_currweek4_1 + 1. "WED
        date4_in_currweek4_1 = date3_in_currweek4_1 + 1. "THU
        date5_in_currweek4_1 = date4_in_currweek4_1 + 1. "FRI
        date6_in_currweek4_1 = date5_in_currweek4_1 + 1. "SAT
        date7_in_currweek4_1 = date6_in_currweek4_1 + 1. "SUN
      ENDIF.
    ENDFORM.
    *&      Form  get_date_in_week_in_nextmonth
    FORM get_date_in_week_in_nextmonth.
    *Date in week1 of next month
      PERFORM week_get_1st_day USING next_month_w1.  "return to tmpdate
      date1_in_nextmonth_week1 = tmpdate.                      "MON
      date2_in_nextmonth_week1 = date1_in_nextmonth_week1 + 1. "TUE
      date3_in_nextmonth_week1 = date2_in_nextmonth_week1 + 1. "WED
      date4_in_nextmonth_week1 = date3_in_nextmonth_week1 + 1. "THU
      date5_in_nextmonth_week1 = date4_in_nextmonth_week1 + 1. "FRI
      date6_in_nextmonth_week1 = date5_in_nextmonth_week1 + 1. "SAT
      date7_in_nextmonth_week1 = date6_in_nextmonth_week1 + 1. "SUN
    *Date in week2 of next month
      PERFORM week_get_1st_day USING next_month_w2.  "return to tmpdate
      date1_in_nextmonth_week2 = tmpdate.                      "MON
      date2_in_nextmonth_week2 = date1_in_nextmonth_week2 + 1. "TUE
      date3_in_nextmonth_week2 = date2_in_nextmonth_week2 + 1. "WED
      date4_in_nextmonth_week2 = date3_in_nextmonth_week2 + 1. "THU
      date5_in_nextmonth_week2 = date4_in_nextmonth_week2 + 1. "FRI
      date6_in_nextmonth_week2 = date5_in_nextmonth_week2 + 1. "SAT
      date7_in_nextmonth_week2 = date6_in_nextmonth_week2 + 1. "SUN
    *Date in week3 of next month
      PERFORM week_get_1st_day USING next_month_w3.  "return to tmpdate
      date1_in_nextmonth_week3 = tmpdate.                      "MON
      date2_in_nextmonth_week3 = date1_in_nextmonth_week3 + 1. "TUE
      date3_in_nextmonth_week3 = date2_in_nextmonth_week3 + 1. "WED
      date4_in_nextmonth_week3 = date3_in_nextmonth_week3 + 1. "THU
      date5_in_nextmonth_week3 = date4_in_nextmonth_week3 + 1. "FRI
      date6_in_nextmonth_week3 = date5_in_nextmonth_week3 + 1. "SAT
      date7_in_nextmonth_week3 = date6_in_nextmonth_week3 + 1. "SUN
    *Date in week4 of next month
      IF next_month_w4 NE 999999.
        PERFORM week_get_1st_day USING next_month_w4.  "return to tmpdate
        date1_in_nextmonth_week4 = tmpdate.                      "MON
        date2_in_nextmonth_week4 = date1_in_nextmonth_week4 + 1. "TUE
        date3_in_nextmonth_week4 = date2_in_nextmonth_week4 + 1. "WED
        date4_in_nextmonth_week4 = date3_in_nextmonth_week4 + 1. "THU
        date5_in_nextmonth_week4 = date4_in_nextmonth_week4 + 1. "FRI
        date6_in_nextmonth_week4 = date5_in_nextmonth_week4 + 1. "SAT
        date7_in_nextmonth_week4 = date6_in_nextmonth_week4 + 1. "SUN
      ENDIF.
    *Date in week5 of next month
      IF next_month_w5 NE 999999.
        PERFORM week_get_1st_day USING next_month_w5.  "return to tmpdate
        date1_in_nextmonth_week5 = tmpdate.                      "MON
        date2_in_nextmonth_week5 = date1_in_nextmonth_week5 + 1. "TUE
        date3_in_nextmonth_week5 = date2_in_nextmonth_week5 + 1. "WED
        date4_in_nextmonth_week5 = date3_in_nextmonth_week5 + 1. "THU
        date5_in_nextmonth_week5 = date4_in_nextmonth_week5 + 1. "FRI
        date6_in_nextmonth_week5 = date5_in_nextmonth_week5 + 1. "SAT
        date7_in_nextmonth_week5 = date6_in_nextmonth_week5 + 1. "SUN
      ENDIF.
    ENDFORM.
    *&      Form  get_week_next_month
    FORM get_week_next_month.
      DATA : date_by_week_of_parameter  LIKE  scal-date,
             date  LIKE  scal-date,
             week  LIKE  scal-week.
      PERFORM week_get_1st_day USING p_week. "return to tmpdate
      CALL FUNCTION 'LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in             = tmpdate
        IMPORTING
          LAST_DAY_OF_MONTH  = next_month
        EXCEPTIONS
          DAY_IN_NO_DATE     = 1
          OTHERS             = 2.
      next_month = next_month + 1.  "YYYYMMDD 2006.xx.01
      PERFORM date_2_week USING next_month. "return to tmpweek
      week = tmpweek.
      PERFORM week_get_1st_day USING week. "return to tmpdate
      date = tmpdate.
      IF next_month NE date.
        PERFORM next_week USING week.
        next_month_w1 = tmp_next_week.
        week = tmp_next_week.
      ENDIF.
      next_month_w1 = week.          "**WEEK1**
      PERFORM next_week USING week.
      week = tmp_next_week.
      next_month_w2 = week.          "**WEEK2**
      PERFORM next_week USING week.
      week = tmp_next_week.
      next_month_w3 = week.          "**WEEK3**
      PERFORM next_week USING week.
      PERFORM week_get_1st_day USING tmp_next_week. "return to tmpdate
      IF tmpdate4(2) EQ next_month4(2).
        week = tmp_next_week.
        next_month_w4 = week.        "**WEEK4**
        PERFORM next_week USING week.
        PERFORM week_get_1st_day USING tmp_next_week. "return to tmpdate
        IF tmpdate4(2) EQ next_month4(2).
          week = tmp_next_week.
          next_month_w5 = week.      "**WEEK5**
        ELSE.
          next_month_w5 = 999999.
        ENDIF.
      ELSE.
        next_month_w4 = 999999.
        next_month_w5 = 999999.
      ENDIF.
    ENDFORM.
    *&      Form  get_week_next_next_month
    FORM get_week_next_next_month.
      DATA : date  LIKE  scal-date,
             week  LIKE  scal-week.
      CALL FUNCTION 'LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in             = next_month
        IMPORTING
          LAST_DAY_OF_MONTH  = next_next_month
        EXCEPTIONS
          DAY_IN_NO_DATE     = 1
          OTHERS             = 2.
      next_next_month = next_next_month + 1.  "YYYYMMDD 2006.xx.01
      PERFORM date_2_week USING next_next_month. "return to tmpweek
      week = tmpweek.
      PERFORM week_get_1st_day USING week. "return to tmpdate
      date = tmpdate.
      IF next_next_month NE date.
        PERFORM next_week USING week. "Return to tmp_next_week
        week = tmp_next_week.
      ENDIF.
      next_next_month_w1 = week.          "**next_next_month WEEK1**
      PERFORM next_week USING week.
      week = tmp_next_week.
      next_next_month_w2 = week.          "**next_next_month WEEK2**
      PERFORM next_week USING week.
      week = tmp_next_week.
      next_next_month_w3 = week.          "**next_next_month WEEK3**
      PERFORM next_week USING week.
      PERFORM week_get_1st_day USING tmp_next_week. "return to tmpdate
      IF tmpdate4(2) EQ next_next_month4(2).
        week = tmp_next_week.
        next_next_month_w4 = week.             "**next_next_month WEEK4**
        PERFORM next_week USING week.
        PERFORM week_get_1st_day USING tmp_next_week. "return to tmpdate
        IF tmpdate4(2) EQ next_next_month4(2).
          week = tmp_next_week.
          next_next_month_w5 = week.           "**next_next_month WEEK5**
        ELSE.
          next_next_month_w5 = 999999.
        ENDIF.
      ELSE.
        next_next_month_w4 = 999999.
        next_next_month_w5 = 999999.
      ENDIF.
    ENDFORM.
    *&      Form  GET_SALES_HISTORY
    FORM get_sales_history.
      DATA : m_3  LIKE  s003-aemenge VALUE 0,
             m_2  LIKE  s003-aemenge VALUE 0,
             m_1  LIKE  s003-aemenge VALUE 0,
             m_0  LIKE  s003-aemenge VALUE 0.
      SELECT s003spbup s003vkorg s003~matnr
             s003aemenge s003ummenge
             s003ssour s003vrsio s003spmon s003sptag
             s003spwoc s003vtweg s003spart s003bzirk s003~kunnr
      INTO TABLE it_tmp_sales_hist
      FROM   s003
      WHERE  ( s003~spbup = prev_month0 OR
               s003~spbup = prev_month1 OR
               s003~spbup = prev_month2 OR
               s003~spbup = prev_month3
             ) AND
             s003~vkorg = p_werks AND
             s003~matnr IN s_matnr.
      LOOP AT it_tmp_sales_hist.
        CLEAR wa_sales_hist.
        wa_sales_hist-spbup   = it_tmp_sales_hist-spbup.
        wa_sales_hist-vkorg   = it_tmp_sales_hist-vkorg.
        wa_sales_hist-matnr   = it_tmp_sales_hist-matnr.
        wa_sales_hist-aemenge = it_tmp_sales_hist-aemenge.
        wa_sales_hist-ummenge = it_tmp_sales_hist-ummenge.
        COLLECT wa_sales_hist INTO it_sales_hist.
      ENDLOOP.
      LOOP AT it_all_material.
        CLEAR : m_3, m_2, m_1, m_0, wa_sales_report.
        LOOP AT it_sales_hist WHERE matnr = it_all_material-matnr.
          IF it_sales_hist-spbup = prev_month3.
            m_3 = it_sales_hist-ummenge.
          ELSEIF it_sales_hist-spbup = prev_month2.
            m_2 = it_sales_hist-ummenge.
          ELSEIF it_sales_hist-spbup = prev_month1.
            m_1 = it_sales_hist-ummenge.
          ELSEIF it_sales_hist-spbup = prev_month0.
            m_0 = it_sales_hist-ummenge.
          ENDIF.
        ENDLOOP.
        wa_sales_report-matnr = it_all_material-matnr.
        wa_sales_report-m_3   = m_3.
        wa_sales_report-m_2   = m_2.
        wa_sales_report-m_1   = m_1.
        wa_sales_report-m_0   = m_0.
        wa_sales_report-avg_sale = ( m_3 + m_2 + m_1 ) / 3.
        IF ( ( m_0 > 0 ) OR ( m_1 > 0 ) OR ( m_2 > 0 ) OR ( m_3 > 0 ) ).
          APPEND wa_sales_report TO it_sales_report.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    *&      Form  PROCESS_GET_MONTH_FOR_SALES
    FORM process_get_month_for_sales.
      "Current Month
      PERFORM week_get_1st_day USING p_week.    "return to tmpdate
      prev_month0 = tmpdate+0(6).
      "Month -1
      PERFORM get_prev_month USING tmpdate.     "return to prev_month
      prev_month1 = prev_month+0(6).
      "Month -2
      PERFORM get_prev_month USING prev_month.  "return to prev_month
      prev_month2 = prev_month+0(6).
      "Month -3
      PERFORM get_prev_month USING prev_month.  "return to prev_month
      prev_month3 = prev_month+0(6).
    ENDFORM.
    *&      Form  GET_PREV_MONTH
    FORM get_prev_month USING inp_date LIKE sy-datum.
    inp_date+6(2) = '01'.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
      EXPORTING
        months        =  -1
        olddate       =  inp_date
      IMPORTING
        newdate       =  prev_month.
    ENDFORM.
    *&      Form GET_LAST_DAY_OF_MONTH
    FORM get_last_day_of_month USING inp_date LIKE sy-datum.
    DATA : last_day_of_month LIKE scal-date.
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
      EXPORTING
        day_in                 =  inp_date
    IMPORTING
       LAST_DAY_OF_MONTH       =  tmpdate
    EXCEPTIONS
       DAY_IN_NO_DATE          = 1
       OTHERS                  = 2.
    ENDFORM.
    *&      Form  WEEK_GET_FIRST_DAY
    FORM week_get_1st_day USING inp_week LIKE scal-week.
      CALL FUNCTION 'WEEK_GET_FIRST_DAY'
        EXPORTING
          week = inp_week
        IMPORTING
          date = tmpdate
        EXCEPTIONS
          week_invalid  = 1
          others        = 2.
    ENDFORM.
    *&      Form  NEXT_WEEK
    FORM next_week USING inp_week LIKE scal-week.
      CALL FUNCTION 'NEXT_WEEK'
        EXPORTING
          current_week       =  inp_week
        IMPORTING
          NEXT_WEEK          =  tmp_next_week.
    ENDFORM.
    *&      Form  GET_BACK_ORDER
    FORM get_back_order.
      DATA : back              TYPE P VALUE 0 DECIMALS 3,
             subtract          TYPE P VALUE 0 DECIMALS 3,
             do_qty    

    Hi ,
    Replace your  select statements as below in
    subroutines get_back_order and get_pending_order.
    Let me know your status of program from your rewards.
    Regards,
    Sankar
    FORM get_back_order.
    ranges : r_posnr for vbrp-posnr.
    r_posnr-low =  '000000'.
    r_posnr-high = '999999'.
    r_posnr-sign = 'I'.
    r_posnr-option = 'BT'.
    append r_posnr.
    SELECT vbapvbeln vbapposnr vbap~matnr
    vbapkwmeng vbapkbmeng vbap~klmeng
    INTO TABLE t_vbap FROM vbap
    WHERE
    ( vbeln LIKE '21%' OR " Sales Order
    vbeln LIKE '25%' OR " Exchange
    vbeln LIKE '26%' ) and
    posnr in r_posnr  and
    matnr IN s_matnr AND
    werks = p_werks 
    FORM get_pending_order.
    SELECT jestobjnr afpomatnr afpopsmng afpowemng
    INTO TABLE it_pending_order
    FROM aufk
    INNER JOIN afko
    ON aufkaufnr = afkoaufnr
    INNER JOIN afpo
    ON afkoaufnr = afpoaufnr
    INNER JOIN jest
    ON aufkobjnr = jestobjnr
    FOR ALL ENTRIES IN it_all_material
    WHERE
    jest~stat = 'I0002' AND "Status REL
    jest~inact <> 'X' AND
    afpo~matnr EQ it_all_material-matnr AND
    aufk~werks = p_werks.

  • I lost all my iMovies and could someone please tell me how to get them back?

    Recently I dropped my iPad and because I had apple care the next day I got a brand new one, but I accidentally started my new iPad as a new one. In the past I have made so many iMovies it's unreal and I have spent ridicolous amounts of time on making them, but when on my new iPad I downloaded iMovies again all my iMovies were gone. Is there anyway I can get them back.

    Have you not backed up or transferred your movies to your computer at any point before you dropped your old iPad?
    If the only copy of these movies was on the old iPad, and that iPad is now gone, then so are the movies that were on it.

  • I did a restore from backup and lost all of my picture and videos from last night. Can anyone please tell me how to get them back from the cloud?

    I did a restore from backup this morning. After it completed the restore I lost all of my pics and videos from Saturday. Can anyone assist in retrieving my files from iCloud? Thank you.

    Have you not backed up or transferred your movies to your computer at any point before you dropped your old iPad?
    If the only copy of these movies was on the old iPad, and that iPad is now gone, then so are the movies that were on it.

Maybe you are looking for

  • Another ORA-01722: invalid number Error

    Hello All, I have 2 Validations on 1 Item, Not Null and Not Exists, very standard. select fk_session_name_id from hrt_session where fk_session_name_id = :p9_fk_session_name_id   and fk_class_id = :p9_fk_class_id;My Item needs to be a Select List that

  • Timeout in Block Function doesn't work

    Hi, I'm using a BLOCK FUNCTION, with a timeout of 3 minutes from a attribute type, I wait for about 10 minutes, but the process still blocked... what's wrong ? can't I use a block function with timeout, or the block process need to be completed by Co

  • Images in monitor are messed up

    Help!  I am new to encore.  When I create a slideshow in encore the pictures in the monitor view are all messed up.  You cant even tell what the picture is.  Is this a common proble or is it an issue with my system.  Possibly a video driver issue?  A

  • Burst mode photo incorrect orientation (outside Album)

    When I use burst mode in portrait, all photos are shown oriented correctly in "Album", but when viewed with any other photo app (Google+, Google Photos, Cyanogen Gallery etc) have actually been saved rotated in landscape. Single shot without moving t

  • No Excel Export Option in CRViewer?

    I'm sure I'm missing something simple.  Excel is NOT one of the available export formats when I try to export the report from the CRViewer.  I can't find anything on dependencies, etc.  What do I need to do?  Thanks!