Stock categery Q instead of D

Hello,
     User want to keep some material (which is lying physically , not availble in system)  in to inventory. He created Transfer order with movment type 712. while putting stock categeory , instead of 'S' , user put 'Q'.  Now stock is showing with 'Q' in  transaction: LS26.
User tried to writeoff the quantity by using transaction Li21. But as stock is lying in "Q" system now allowing to writeoff, system throwing error. Could you suggest the procedure to resolve this?
regards
sapproduction

Hi,
If the part which you want to replace the stock categery from Q to D is managed by QM module, then you can only change the Q status from QM t-code, MIGO can't do that any more!
Good luck
Tao

Similar Messages

  • Using stock apple apps, instead 3rd party software

    I was wondering what would be the best option for cleaning application cache, memory and doing regular computer maintenance, without installing 3rd party software, or if there is any?
    can CleanMyMac or DiskDoctor functions substituted with apple stock apps ?
    thanks

    How to maintain a Mac
    1. Make redundant backups, keeping at least one off site at all times. One backup is not enough. Don’t back up your backups; all should be made directly from the original data. Don’t rely completely on any single backup method, such as Time Machine. If you get an indication that a backup has failed, don't ignore it.
    2. Keep your software up to date. In the App Store or Software Update preference pane (depending on the OS version), you can configure automatic notifications of updates to OS X and other Mac App Store products. Some third-party applications from other sources have a similar feature, if you don’t mind letting them phone home. Otherwise you have to check yourself on a regular basis.
    Keeping up to date is especially important for complex software that modifies the operating system, such as device drivers. Before installing any Apple update, you must check that all such modifications that you use are compatible. Incompatibility with third-party software is by far the most common cause of trouble with system updates.
    3. Don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” "boosters," “extenders,” “cleaners,” "doctors," "tune-ups," “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, such stuff is useless or worse than useless. Above all, avoid any software that purports to change the look and feel of the user interface.
    It's not much of an exaggeration to say that the whole "utility" software industry for the Mac is a fraud on consumers. The most extreme examples are the "CleanMyMac" and “MacKeeper” scams, but there are many others.
    As a rule, the only software you should install is that which directly enables you to do the things you use a computer for, and doesn't change the way other software works.
    Safari extensions, and perhaps the equivalent for other web browsers, are a partial exception to the above rule. Most are safe, and they're easy to get rid of if they don't work. Some may cause the browser to crash or otherwise malfunction.  Some are malicious. Use with caution, and install only well-known extensions from relatively trustworthy sources, such as the Safari Extensions Gallery.
    Never install any third-party software unless you know how to uninstall it. Otherwise you may create problems that are very hard to solve. Do not rely on "utilities" such as "AppCleaner" and the like that purport to remove software.
    4. Don't install bad, conflicting, or unnecessary fonts. Whenever you install new fonts, use the validation feature of the built-in Font Book application to make sure the fonts aren't defective and don't conflict with each other or with others that you already have. See the built-in help and this support article for instructions. Deactivate or remove fonts that you don't really need to speed up application launching.
    5. Avoid malware. Malware is malicious software that circulates on the Internet. This kind of attack on OS X was once so rare that it was hardly a concern, but malware is now increasingly common, and increasingly dangerous.
    There is some built-in protection against downloading malware, but you can’t rely on it — the attackers are always at least one day ahead of the defense. You can’t rely on third-party protection either. What you can rely on is common-sense awareness — not paranoia, which only makes you more vulnerable.
    Never install software from an untrustworthy or unknown source. If in doubt, do some research. Any website that prompts you to install a “codec” or “plugin” that comes from the same site, or an unknown site, is untrustworthy. Software with a corporate brand, such as Adobe Flash Player, must come directly from the developer's website. No intermediary is acceptable, and don’t trust links unless you know how to parse them. Any file that is automatically downloaded from the web, without your having requested it, should go straight into the Trash. A web page that tells you that your computer has a “virus,” or that anything else is wrong with it, is a scam.
    In OS X 10.7.5 or later, downloaded applications and Installer packages that have not been digitally signed by a developer registered with Apple are blocked from loading by default. The block can be overridden, but think carefully before you do so.
    Because of recurring security issues in Java, it’s best to disable it in your web browsers, if it’s installed. Few websites have Java content nowadays, so you won’t be missing much. This action is mandatory if you’re running any version of OS X older than 10.6.8 with the latest Java update. Note: Java has nothing to do with JavaScript, despite the similar names. Don't install Java unless you're sure you need it. Most people don't.
    6. Don't fill up your boot volume. A common mistake is adding more and more large files to your home folder until you start to get warnings that you're out of space, which may be followed in short order by a boot failure. This is more prone to happen on the newer Macs that come with an internal SSD instead of the traditional hard drive. The drive can be very nearly full before you become aware of the problem.
    While it's not true that you should or must keep any particular percentage of space free, you should monitor your storage use and make sure you're not in immediate danger of using it up. According to Apple documentation, you need at least 9 GB of free space on the startup volume for normal operation.
    If storage space is running low, use a tool such as OmniDiskSweeper to explore the volume and find out what's taking up the most space. Move seldom-used large files to secondary storage.
    7. Relax, don’t do it. Besides the above, no routine maintenance is necessary or beneficial for the vast majority of users; specifically not “cleaning caches,” “zapping the PRAM,” "resetting the SMC," “rebuilding the directory,” "defragmenting the drive," “running periodic scripts,” “dumping logs,” "deleting temp files," “scanning for viruses,” "purging memory," "checking for bad blocks," "testing the hardware," or “repairing permissions.” Such measures are either completely pointless or are useful only for solving problems, not for prevention.
    To use a Mac effectively, you have to free yourself from the Windows mindset that every computer needs regular downtime maintenance such as "defragging" and "registry cleaning." Those concepts do not apply to the Mac platform. A computing device should not be a focus of your attention. It should be an almost invisible tool by means of which you communicate, work, and play. If you want a machine that is always whining for your attention like a neurotic dog, use a PC.
    The very height of futility is running an expensive third-party application called “Disk Warrior” when nothing is wrong, or even when something is wrong and you have backups, which you must have. Disk Warrior is a data-salvage tool, not a maintenance tool, and you will never need it if your backups are adequate. Don’t waste money on it or anything like it.

  • Creating stock transfer reservation instead of P.req

    Folks,
    We have two materials ,both are external procurement and both are the same master data but one materials creating P.req and another materials is creating Stock transfer reservation(category BD) instead of P.reqs,Is there any specific setting which we missed to create P.reqs.
    Please through some lights on this.
    Regards,
    Prabhu

    Hello all,
    The issue was resolved,In the transportation lane the source location is maintained as 1007 location type(Storage location MRP area).
    Regards,
    Prabhu

  • Reg. Stock account posting instead of consumption account

    Dear Experts
    Pls consider my below senario
    As per SAP the material goes to consumption account when GR is made. but our concern wants to keep the material at unrestricted stock and that is to be used as and when required for production. how to configure the same. Our implementation team has done like I said in our production server. And in our ECC also we want the same settings.Pls help me
    Thanks in advance

    The first thing is that whenever GR done against any PO it is not necessary that material always go to consumption it is dependent on Acct Assignment Cat used in PO.
    If Acct Assignment Cat. is blank in PO then material must go in unrestricted stock. You need to check the same in SPRO.
    IMGMaterials ManagementPurchasingAccount AssignmentMaintain Account Assignment Categories--double click on any acct assignment cat
    Details will be displayed for this acct assignment cat: there check field Consumption posting in Detailed Information. If you want to post material in unrestricted stock then make the field blank.
    Hope this will help you.
    Cheers,
    Parag Mahajan

  • PRD is not triggering in Negative Stocks allowed scenario

    I am trying to do Subcontracting process with Negative Stocks allowed for the final material and raw materials even & all of them are checked for negative stocks allowed. When I am trying to issue, say 10 units of materials to SC Vendor with ZERO stocks in storage, the stock's updating accordingly as 10-, but while doing MIGO for say 5 units, the stock's updating accordingly, but in FI documents so created, the PRD key is missing. I read bout PRD and it states : Price differences can also arise in the case of materials with moving average price if there is not enough stock to cover the invoiced quantity. In the case of goods movements in the negative range, the moving average price is not changed. Instead, any price differences arising are posted to a price difference account. Depending on the settings for the posting rules for transaction/event key PRD, it is possible to work with or without account modification. If you use account modification, the following modifications are available in the standard system. So, what steps are to be taken in order to trigger PRD key in the FI Documents.
    Regards,
    Sowmyesh Maniyar

    Sowmyesh Maniyar wrote:
    I read bout PRD and it states : Price differences can also arise in the case of materials with moving average price if there is not enough stock to cover the invoiced quantity.
    Yes its correct.. At the time MIRO, if any price difference occurs, then first system checks stock is available or not.. If stock is there then system will take the amount from stock account, if not, then system take the amount in PRD account...
    But here you have activated negative stock. I think because of this your stock account triggered instead of PRD account..
    Can you check and analysis the accounting entry, where the price different amount goes ?

  • Stock transfer order between 2 plants in same company code

    Dear All,
    We have the requirement, where in the stock tranfer order (between 2 plants in same company code) instead of Material valuation price, MAP/Standard (depends on Price Control) gets picked up from supplying plant ,user should be able to enter its own price while creating stock transfer order.
    For fullfilling this requirement, I have created new condition type(where i have changed condition category from internal price "G" to "H" - Basic Price)
    Instead of using condition type- P101 in the stock transfer pricing,I have used above created new condition type, in pricing procedure then also while doing the post good issue against the outbound delivery( move type-"641", moving average is getting picked up.
    Can you please tell,where is the setting where we can make the system to consider manual given price while creating the stock transfer order instead of picking moving average price.
    Its very Important requirement ,please Provide valuable Inputs else provide some alternative.
    Thanks & Regards
    Nitin Chhabra

    Stock Transfer Order between Plants in the same Company Cpde are not relevant for pricing, as there is no billing. Billing only takes place between company codes. As same company code it would be like selling something to yourself - it doesn't make sense.  The stock value in the receiving Plant depends on the price contol there. If standard price, then you must enter the price when creating the material or use material revaluation to change it. When you transfer the material from the issuing plant, the value there will be transferred. In case of standard price any difference is posted to stock transfer differences. If using MAP then the value will be transferred from the issuing Plant in full.
    If you use costing with standard price in main plant, then it is possible that you can transfer the cost from the main plant to the second plant, by using special procurement key for costing.
    Rgds
    Richard

  • 2 Step Stock Transfer Using WM Transport Order??

    Dear SAP expertes,
    I have a problem, I think a lot of you too; that is stock transfer in 2 steps from one storage location to another (mov. types 313-315), but using o referencing a reservation.
    SAP says that is not possible create reservations for 2 step stock transfer in MM, but also says use "Stock Transfer Orders" instead, that means use module WM.
    Do anyone could transfer stock from one storage location to another using WM Stock Transfer Orders? I tried, but couldn't make it. In anyone have documention to do this I will appreciate it a lot.
    Best regards,
    Favio.

    Hi Jürgen L.
    I was checking SAP Note  "28692 - MMIM: Reservation for a two-step stock transfer", and you were right, they say "Use the stock transport order instead of the stock transfer reservation".
    I confused with WM stock tranfer order, but I want to ask you if you have used UB transport order between storage location of the same plant?
    Best regards,
    Favio.
    Edited by: Favio Del Castillo on Sep 22, 2010 5:01 PM

  • Special stock Indicator in process order

    Hi Guys,
    I am using Configurable material via BOM dependency. During sales order pop-up and selection are coming well. I have selected Component A1, B2, C2 with characteristic value. Now B2 and C2 have procurement type "F" and for A1 procurement type was X. After MRP run, saw in the planned order as 'special stock type E" for A1 material and in process order it is not taking plant stock. Instead it is asking for sales order stock and componet view shows Account assignment as "M" and special stock indicator as "Individual customer stock". Now I changed the procurement type as "F" and delete re-create MRP/ BOM re-run MRP........still it is not picking up plant stock in availability, instead now asking for purchase requisition. For B2 and C2, not asking for ourchase requisition as there is plant stock. . Why it is happening and how to solve it?
    Thanks
    Krish

    Solved it......It was availability check issue.

  • Sub Contracting: CO product is lying with vendor instead fo own

    Hi expert
    when i am taking Co product with movement 545 (0).system  showing stock with vendor instead of own storage location,
    regad
    Nabil

    Hi
    USe of 545 O movemnet
    If a component is entered with a negative quantity for the subcontract order, the receipt of the by-product is posted to stock provided to vendor during goods receipt for purchase order or during the subsequent adjustment. 
    so now you need to do 542 movement manually to bring back the stock to unrestricted use

  • AR Invoice - Stocks

    Dear Experts,
    I have Item ABC bought on 1st of Jan 2010 (qty =10).
    Then i bought more on 1st of Feb 2010 (Qty = 5).
    I have created a stock ageing report using Query generator, and i can view the current ageing 1-30 days = Qty 5 and 30-60days = Qty10 for item ABC.
    When i process an AR Invoice for item ABC (qty=3), it is deducting the stocks from the 1-30days but it should actually deduct it from the (old stock) 30-60days.
    Is there a way i can make the AR Invoice pick the (old stock) 30-60days, instead of it picking the 1-30days (current) stock.
    I'm on SAP 2007 PL42, and my valuation method is moving average.
    Regards,
    Feroz Dosani

    Dear Gordon and Shwu Hua Gan,
    Thank you for your replies, much appreciated.
    Mr. Shwu Hua Gan you are correct on how moving average is calculated, and i have read the same on previous posts, but that is not my issue here, that works perfectly.
    Dear Gordon, my stock ageing query is good, as when i purchased "Item ABC bought on 1st of Jan 2010 (qty =10)." The stock Ageing report shows me the Qty 10 in the 30-60Days Column, further more, "Then i bought more on 1st of Feb 2010 (Qty = 5)" and my stock agening report shows me the Qty 5 in the 1-30Days. Which is fine for me. Something like this:-
    Item Code                              Total QTY                        1-30Days Ageing                     30-60Days Ageing
    ABC                                                15                                  5                                                 10
    The problem that i'm facing is when i do an A/R Invoice ( Date = 4thFeb,2010, Item ABC qty =3) , SAP picks the 1-30 Days stock and reduces that, and my stock ageing show me the ageing as below:
    Item Code                              Total QTY                        1-30Days Ageing                     30-60Days Ageing
    ABC                                                12                                  2                                                 10
    But i want it to reduce the 30-60days stocks, so when i run the stock ageing report after processing the AR Invoice  it should show me 1-30 Qty = 5 and 30-60 Qty=5 (reduced from 10 to 5), like below:-
    Item Code                              Total QTY                        1-30Days Ageing                     30-60Days Ageing
    ABC                                                12                                  5                                                 8
    Gordon, Please find the query at the end of this message.
    Any suggestions would be appreciated.
    Regards,
    Feroz Dosani.
    Edited by: Dosani Feroz on Feb 18, 2010 9:19 AM

  • Stock Transfer Order::: Urgent

    Dear All,
    I am trying to use STO to transfer stock between storage location to storage location of the same plant. But when I issue the goods against the STO .... the stock dosent transfer to "Stock in transit", instead it remains in the "On-order Stock"
    Please help
    Cheers

    HI,
    First think is that since you are transfering from Sloc to Sloc in the SAME PLANT, stock in transit does not come into picture. when you are doing between two different plants then Stock in transit comes into picture.
    Kindly refer this link http://help.sap.com/saphelp_47x200/helpdata/en/4d/4b9036dfe4b703e10000009b38f889/frameset.htm
    Thanks & Regards,
    Kiran

  • REG: while doing PGI with ref to OBD should pick stock from one location

    Hi experts ,
    I have a n issue while doing PGI with ref to OBD.
    1.We are purchasing Raw material Aluminium circle 1000 nos from "X" vendor & keeping stock in Main stores i.e 0001 location plant-1.
    2.From there we are issuing to production line i.e 0003 location(Plant 1)500 nos.
    4.Remaining stock of 500 nos is in 0001 location in under some Batches.
    5.Meanwhile we are suppose to transfer the aluminium circle to plant 2 .
    6.For this we are raising STO for aluminium circles  600 nos to Plant 2.
    7.With ref to STO we are raising OBD for Plant 2.
    8.With ref to OBD While doing PGI it should picks the stock from 0001(Main Stores)  location only.
    9.But the STO qty is 600 nos ,availablity of stock in 0001 is 500 nos only .
    10.While PGI  it takes 500 nos from 0001 location & remaining 100 nos picking from Production line 0003.It should not pick from Production line 0003 location .
    11.For this system should not allow to pick from 0003 location & also system should throw error message "Deficit of QTY in 0001 location"for 100 nos.
    KIndly suggest me asap.
    Thanks in advance
    vichu
    Edited by: viswanathan seenuvasan on Dec 10, 2009 7:01 AM

    Hi,
    As I understand the picking is done automatically in outbound delivery. Am I right?
    a)
    If picking is not done automatically but manually, why the user defines the production storage location in the OBD? In this case some training would be necessary....
    b)
    If it is done automatically: which settings are you using? Batch determination only?
    1. In stock determination (SPRO > MM > IM > Stock determination > Define strategies for Stock Determination) you can define which storsage location should be used by system, and you can assign the stock determination rule to the applications (SPRO > MM > IM > Stock determination > Assign Stock determination Rule in the Applications)
    (you also have to assign the stock determination group to the material master (MARC-EPRIO))
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/d8/2f3746996611d1b5480000e82de955/frameset.htm
    2. You have to use batch determination
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/25/283aac4f7811d18a150000e816ae6e/frameset.htm
    3. You have to use availability check in delivery not to ship out goods for which reservation already exists (if goods are in production storage location I assume you have a PrdOrd...)
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/93/744cd9546011d1a7020000e829fd11/frameset.htm
    I haven't tries this but I assume it should work...
    Please check SAP online help.
    Regards,
    Csaba
    Edited by: Csaba Szommer on Jan 1, 2010 11:02 AM
    Forget stock determination. Instead of it you should use picking location determination - suggested by Laksmipathi. It wokrks fine with batch determination.
    SPRO > LE > Shipping > Picking > Determine Picking Location > Assign Picking Location
    Edited by: Csaba Szommer on Jan 1, 2010 5:03 PM

  • Replenishment upto max. stock level during SNP heuristics run.

    Hi Experts,
    As per the requirement from client, we need to configure the setting of replenishment upto max. stock level during SNP heuristics run.
    I am using below settings in R/3 for achieving the expected results.
    (R/3 ) MRP1 u2013
    Lot size                       HB               Replenish to maximum stock level
    Maximum stock level       20,000
    (APO) Targ.Stk Lvl Methd   5 u2013 in APO u2013 product master -   lot size tab.
    Still, after heuristics run, the requisitions are getting created equals to forecast value. It should get generated as max. stock level maintained.
    Could anyone share their experience regarding this? Am I missing some additional setting?
    Inputs are highly appreciated!
    rgds/Jay

    Dear Jayprakash ,
    If the requirement is that  you have to replenish upto a certain stock level then instead of maintaining the  Max Stock level you can simply maintain
    SB : Safety stock from product master
    and in the  Safety stock field maintain the quantity as desired ( in this case 20000 ) . This probably will solve the problem  in your case . You may not require  to maintain Max stock level .
    Target stock level in heuristics also works fine with the following settings
    make sure you maintain
    Target stock level method as =5
    In Maximum Stock level  = maintain the quantity desired  ( 20000 in your case say )
    do not maintain  any safety stock method keep it blank .
    then location heuristics generates PR according to the  the maximum stock level.
    If still it is not working plz let me know what other settings you are maintaining probably we will find a way out .
    Hope it helps .
    Thanks
    Debsankar

  • Check stock consistence

    Hi,
    I have used the transaction MB5K to check stock consistence: about several materials codes there is a red message that is : ' 506  miss an enter in the historical table'..What means?Where is the historical table and how can I correct this inconsistence?( In fact for these material there is a value stock =0 and instead it wouldn't be zero..).
    Please help me,10 points for a right answer.
    Thanks in advance,best regards.
    Maximilian

    you can use any material for consignment and if u wan tto consider certain factors for MRP then u may assign the specila procurement type in mrp views

  • Urgent: regarding the increasing the performance of report

    Hi,
    I had a report which is displaying the correct data but i execute on PRD Server,it gets Request Time Out.So i want to increase the performance of it.Plzz help me out in doing this.
    REPORT  ZWIP_STOCK NO STANDARD PAGE HEADING LINE-SIZE 150.
    TABLES: AFPO, AFRU, MARA, MAKT.
    DATA: BEGIN OF ITAB OCCURS 0,
          AUFNR LIKE AFPO-AUFNR,
          MATNR LIKE AFPO-MATNR,
          LGORT LIKE AFPO-LGORT,
          MEINS LIKE MARA-MEINS,
          NTGEW LIKE MARA-NTGEW,
          MTART LIKE MARA-MTART,
          STOCK TYPE P LENGTH 10 DECIMALS 3,
          END OF ITAB.
    DATA : ITAB2 LIKE ITAB OCCURS 0 WITH HEADER LINE.
    DATA : DESC LIKE MAKT-MAKTX.
    SELECT-OPTIONS : MAT_TYPE FOR MARA-MTART.
    SELECT-OPTIONS : P_MATNR FOR AFPO-MATNR.
    DATA : V_MINOPR LIKE AFRU-VORNR,
           V_MAXOPR LIKE AFRU-VORNR,
           V_QTYMIN LIKE AFRU-GMNGA,
           V_QTYMAX LIKE AFRU-GMNGA,
           V_QTY TYPE P LENGTH 10 DECIMALS 3.
            SELECT AAUFNR AMATNR ALGORT BMEINS BNTGEW BMTART FROM AFPO AS A
              INNER JOIN MARA AS B ON AMATNR = BMATNR
                INTO TABLE ITAB WHERE ELIKZ <> 'X' AND MTART IN MAT_TYPE AND A~MATNR IN P_MATNR.
        ITAB2[] = ITAB[].
        SORT ITAB2 BY MATNR MEINS MTART NTGEW.
        DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING MATNR MEINS MTART NTGEW.
       LOOP AT ITAB2.
        V_QTY = 0.
          LOOP AT ITAB WHERE MATNR = ITAB2-MATNR.
            SELECT MIN( VORNR ) INTO V_MINOPR FROM AFRU WHERE AUFNR = ITAB-AUFNR.
            SELECT MAX( VORNR ) INTO V_MAXOPR FROM AFRU WHERE AUFNR = ITAB-AUFNR.
            SELECT SUM( GMNGA ) INTO V_QTYMIN FROM AFRU WHERE AUFNR = ITAB-AUFNR AND VORNR =  V_MINOPR.
            SELECT SUM( GMNGA ) INTO V_QTYMAX FROM AFRU WHERE AUFNR = ITAB-AUFNR AND VORNR =  V_MAXOPR.
            V_QTY = V_QTY + V_QTYMIN - V_QTYMAX.
          ENDLOOP.
          ITAB2-STOCK = V_QTY.
          MODIFY ITAB2.
        ENDLOOP.
        LOOP AT ITAB2.
              WRITE:/ ITAB2-MATNR,ITAB2-STOCK.
        ENDLOOP.

    Instead of code from
    itab2[] = itab[] till last endloop try code given below
    data : begin of minopr occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of minopr.
    data : begin of maxopr occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of maxopr.
    data : begin of qtymin occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of qtymin.
    data : begin of qtymax occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of qtymax.
    select aurnr vornr into table minopr from afru for all entries in itab where aurnr = itab-aufnr
    maxopr[] = minopr[].
    sort minopr by aufnr vornr ascending.
    sort maxopr by aufnr vornr descending.
    delete adjacent duplicates from minopr comparing aufnr.
    delete adjacent duplicates from maxopr comparing aufnr.
    SELECT aufnr vornr GMNGA INTO TABLE QTYMIN FROM AFRU for all entries in minopr WHERE AUFNR = minopr-AUFNR AND VORNR = MINOPR-vornr.
    SELECT aufnr vornr GMNGA INTO TABLE QTYMAX FROM AFRU for all entries in maxopr WHERE AUFNR = maxopr-AUFNR AND VORNR = maxopr-vornr.
    sort qtymin by aufnr.
    sort qtymax by aufnr
    sort itab by matnr MEINS MTART NTGEW.
    LOOP AT ITAB.
    v_minopr = 0.
    v_maxopr = 0.
    read table qtymin with key aufnr = itab-aufnr binary search.
    if sy-subrc = 0.
    loop at qtymin from sy-tabix.
    if qtymin-aufnr = itab-aufnr.
    V_MINOPR = V_MINOPR + itab-gmnga.
    else.
    exit.
    endif.
    endloop.
    endif.
    read table qtymax with key aufnr = itab-aufnr binary search.
    if sy-subrc = 0.
    loop at qtymax from sy-tabix.
    if qtymax-aufnr = itab-aufnr.
    V_MaxOPR = V_MaxOPR + itab-gmnga.
    else.
    exit.
    endif.
    endloop.
    endif.
    V_QTY = V_QTY + V_QTYMIN - V_QTYMAX.
    At new itab-matnr.
    if sy-tabix = 1.
    continue.
    endif.
    itab2 = itab.
    itab2-stock = v_qty.
    append itab2.
    V_QTY = 0.
    endat.
    ENDLOOP.
    itab2 = itab.
    itab2-stock = v_qty.
    append itab2.
    LOOP AT ITAB2.
    WRITE:/ ITAB2-MATNR,ITAB2-STOCK.
    ENDLOOP.

Maybe you are looking for

  • Restore entire Mail and Address Book files

    Hi, I reformatted my computer (erase and reinstall) to clear out all the clutter. I figured I could use the Time Machine records to restore whatever files I needed. I have encountered 2 problems: I have consulted this Apple article for assistance: ht

  • InDesign CS6 OSX linked fonts not recognized

    I am using InDesign CS6 on Mountain Lion and I received a document from a PC InDesign user with a linked AI image and document fonts folder included. When I launch the idd file the fonts are "missing". OSX does not seem to recognize the font files in

  • Aperture - library management and external HDD question

    Hi all.  I have just graduated from a point and shoot to a Panasonic GH2 (love it), and have now begun using Aperture 3 rather than iPhoto on my early 2008 MB Pro to manage my photos going forwards.  Of course, I've now discovered that Aperture is qu

  • Always plays the same song

    When I want to listen to one of my play list (on shuffle or not) it always plays the same song over and over and does not go to the next song in the list. I tried re-initiating my ITouch but it has not solved the problem. I also downloadeded the 3.o

  • Enormous acount of archive log produced for inserts

    Hi there, This is my first post on a forum ever. I have set up a test database that we will be installing on a customer site soon. One table is going to be very large (about 520 million rows). It is partitioned by range (on date) 53 ways (one for eve