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

Similar Messages

  • Could someone PLEASE tell me how to set up more than one POP mail account.

    I am soooo frustrated. Before I upgraded to Tiger I had no problems setting up my mail accounts. Now, I can only set up one POP mail account. I have three mail accounts that I desperately need to set up from the same ISP server, all POP accounts. On Panther and earlier, all I had to do was add the accounts. Now I have ONE POP account and when I try to set up another I get an error message that I already have a POP account set up. Why is this happening and what happened to the old system that worked just fine. I am so annoyed with this. It simply defies logic!!!!

    I don't know if this will work or not, but why don't you try using bogus pop and/or smtp server information when you initially establish the accounts with Mail's setup wizard? Just continue through the "warning: cannot validate server" messages that the wizard will give you. Then go into Mail > preferences > accounts and highlight each of the new accounts, one at a time, and try changing the incoming pop and outgoing smtp mail server information to what it is supposed to be?
    For the "Outgoing" server just use the pull-down menu, to select it, and when all accounts are done, go into that same pull-down menu and choose "Edit Server List..." to remove the bogus smtp server information.
    Incoming should be just renaming that pop server in the "Incoming server" field.
    If that doesn't work, I've got something riskier you could try, again with no guarantees, and that is editing your ~/Library/Preferences/com.apple.mail.plist file using either the Property List Editor that comes with XCode Tools (will launch automagically when you click on that .plist file if XCode is installed) or with the pico editor in Terminal, and possibly renaming some folders in your ~/Library/Mail folder, too. Again, start with the bogus server info, then find those entries in the .plist file and make changes there.
    Note: if not familiar with the notation, "~" means your "home" directory.
    (if this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider marking this reply as "helpful" or "solved," in addition to, if applicable, marking this question as "answered")

  • 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)

  • TS1702 i recently purchased an in-app item for my skylanders lost island game. I purchased that jewel pile worth Au$1.99, my account has already been debited but I did not receive the jewels.  Can anyone please tell me how I can get a refund or at least g

    i recently purchased an in-app item for my skylanders lost island game. I purchased that jewel pile worth Au$1.99, my account has already been debited but I did not receive the jewels.  Can anyone please tell me how I can get a refund or at least get what I actually purchased?

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Hello please tell me how you can unlock the phone I bought İclod worker can not find the old vledeltsa. sorry English is not good, I know

    Hello please tell me how you can unlock the phone I bought İclod worker can not find the old vledeltsa. sorry English is not good, I know

    If it's locked to the previous owner's account then only he/she can remove it from their account : http://support.apple.com/kb/TS4515

  • HT204411 i am trying to purchase many songs at one time. i have added all songs to wish list , now to purchase it will only let me  do one at a time  please advise how i can purchase more than one at a time

    i am trying to purchase many songs at one time. i have added all songs to wish list , now to purchase it will only let me  do one at a time  please advise how i can purchase more than one at a time

    There used to be a 'buy all' button on the wish list screen but for some reason that has been removed from the current version of iTunes so you will need to buy each item individually. You can try leaving feedback for Apple and maybe it'll be added back in a future update : http://www.apple.com/feedback/itunesapp.html

  • 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

  • HT4098 Could someone please tell me how I can receive a refund for a subscription that I was charged for that I wanted to cancel? How can I speak to a human about this?

    I had a subscription to something that was supposed to be cancelable by May 10th. I went to do this and I received an email saying that I had been charged again. If anyone has any advice on how I can get a live human to help me obtain a refund and truly cancel this subscription I would greatly appreciate it.

    There is no telehone support for itunes.
    Live humans respond to the Contact Us link.
    Just because it is not a telephone conversation does not make the people who help you any less human.
    Click Support at the top of this page then click the link under Contact Us.

  • HT4236 Please tell me how I can delete pics from my iPad that I have down loaded from my laptop

    Will someone tell me in plain English how to delete  all unwanted pics from my ipad

    Connect the iPad to the computer and launch iTunes.
    Click on the iPad name on the left side under devices.
    Click on the Photos Tab on the right.
    Click on all of the albums or photos - under the Sync Photos From heading - that you want to remove
    Make sure that there is a checkmark next to the Sync Photos From heading
    Click on Apply in the lower right corner of iTunes
    If you are running iTunes 11 - from the menu at the top of the screen - go to View>Show Sidebar - so that the sidebar is visible.

  • My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?, My iPod touch was stolen. Can you tell me how I can get the serial number from my iTunes account?

    My iPod touch was stolen. Can I get the serial number from my iTunes account?

    See the end of:
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                                                
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • For the love of G-d, can someone please tell me how I can access my iCloud photo library from my phone

    my iCloud Drive is activated in Beta (whatever that means), photo backup enabled and all that stuff. I can't for the life of me figure out how to view photos that are already in my iCloud photo stream on my phone.

    bascially, everyone wants Apple to do a proper cloud storage option for high end media, majority people thought iCloud photo library beta was this great service purchase high storage all in the cloud, sadly the only thing it does decently is sync. If you want a real cloud photo storage option, choose another service. This is a beta so hopefully they wake up. I have NO idea what the point of selling higher tier storage options ( backup???) make any sense for a iCloud photo library user, you will certainly run out of storage on your device crippling yourself with reduce quality media rather then actually making use of the higher storage.
    just really odd, you just simply have to scratch your head on iCloud photo library and the tier cloud pricing lol it's like a joke.

  • 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.

  • While trying to save a word document (Microsoft Office 2011 for Mac) in PDF, there is a section of the header or footer which is always missing!! Could anyone please tell me hot to fix this problem!!??? It works perfectly fine on my friends Mac!!

    While trying to save a word document (Microsoft Office 2011 for Mac) in PDF, there is a section of the header or footer which is always missing!! Could anyone please tell me hot to fix this problem!!??? It works perfectly fine on my friends Mac!!

    Easiest way with Acrobat pro, is save the Word document, then convert the document to PDF with Acrobat, rather than doing a "save as" in Word itself to PDF.
    Do you have Acrobat full version or Pro?

  • Hi, can anyone please tell me how to install the Nik collection into Adobe Photoshop CC 2014.2.1

    Hi, can anyone please tell me how to install the Nik collection into Adobe Photoshop CC 2014.2.1 ?

    Glad I could help. Thanks for letting me know I did.
    Gene

Maybe you are looking for

  • IMovie 06/ Sony HDR-HC 9 compatibility

    My Sony HDR-HC9 works with iMovie 08, but not 06. My Sony DCR-TRV110E works with iMovie 06, but not 08. Can anyone explain ?

  • Unknown -50

    I purchase the song but I can't download music from itunes. The message is: "unknown error -50" I need your help!!!

  • How to create a Product Grouping and manage multiples?

    How I can create a Product Grouping with 3 pieces of a product + 2 pieces of another product and ensure that customer can only order in multiples (6+4, 9+6, 12+8, etc.) and not for example 4+3? Regards, Francesco

  • Importing XSD

    Hello Gurus, I am using XI2.0 and now I want to import an XSD. I have been reading around and saw that the best way to do this is, importing an External Definition ot the type XSD. So I have imported my XSD as an External Definition. Now I do not hav

  • I cannot RAM preview in AE CC.

    I have After Effects CC on a Mac running OS X 10.9.2 with 14 GB of RAM.  I cannot RAM preview.  No matter what I set "Memory & Multiprocessing" to, RAM preview won't do anything. Here's some details.  Under "Memory & Multiprocessing," the final line,