Stock posting query

Dear all,
I would like to have a formatted search on the difference field of the stock postings form whereby it should automatically populate the difference field with the negative amount of the in whse field. Please assist with a suitable query for the formatted search.
Kind Regards,
Monil

FMS will be not possible to get into line details.  You may use a query report to find the On Hand on any specific day.
Check this query to see if that could meet you need:
Select T0.ItemCode, sum(T0.InQty - T0.OutQty) as "Qty In/Out" from dbo.OINM T0
Where T0.DocDate <= '[%0\]' and T0.InQty != T0.OutQty and T0.WareHouse = '[%1\]'
Group by T0.ItemCode
Order by T0.ItemCode
If the result is ok, the sum of all on hand qty could be easily found by Ctrl+Click on the column header.

Similar Messages

  • Stock Posting does not tally with Journal Entry

    Hi Mentors,
    I currently trying to see the cause of a particular issue with the JE being created by Stock Posting.
    After scavenging the forums, I came across SAP Note 1525960.
    Symptom
    On creating Inventory Posting in locked Posting Period, system gives error message 'Period is
    locked for new data [Message 131-107]'. Keep the window open, go to Posting Periods to
    change the Period Status to 'Unlocked', and then click on 'Reconcile' again. Inventory Posting
    is successfully added.
    The Transaction Value in the Inventory Audit Report is correct. However the Debit / Credit
    amounts in the Journal Entry of Inventory Posting are doubled.
    The note was created in 2010, filed under SAP Business One 2007. I tried to replicate it, and it holds true for our system, which is currently 2004B.
    When I tried to explain the SAP note to our accountant, she said that she did not encounter the error message, since she was the one controlling the period.
    So my question is, if there any other factors that could influence the change in the posting of the JE such that the variance being posted in the JE is more than the actual amount(as verified against "Inventory Posting List" and OINM)? 
    Some facts about our Finance department's practices.
    They enter the "Stock Posting" a month later.
    E.G. Stock Posting for Oct2011 Stock Variance
    System Date: Nov 16, 2011
    Stock Posting - Posting Date: Oct 31, 2011
    Thanks in advance!
    Sean

    Hi Sir Gordon,
    I already checked using your suggested query:
    SELECT * from oinm
    WHERE NegInvAdjs != 0
    found in this [thread|Re: Diffe Amount posting in Same document].
    Unfortunately, 2004B does not have the column "NegInvAdjs". The query failed to execute.
    Thank you for the guidance,
    Sean

  • Stock Posting List - Negative Value when Different Currency in PO

    Hi experts,
    We would like your help on the following scenario.
    A Purchase Goods Receipt PO and a Purchase Invoice are added in SAP 9.0, on the same date, in a different currency from the system's currency; system's is Euro and Purchase documents are added in JPY (Japanese xen), i.e. 300 JPY. When checking the "Stock Posting List" report for a number of goods that were purchased with the above documents, the report presents the line of the Goods Receipt PO with the value of 270 JPY, and the line of the Purchase Invoice with  a negative value, i.e.-15 Euro.
    Has anyone faced the same issue?
    Thank you in advance.
    Kind Regards,
    Vassilis Korolis

    Both queries have the default value of  "Only Posted Values for Navigation".
    As I was looking at this, I did realize the following though.
    Remember, I mentioned that my zcurrency_mand field has a Reference Characteristic of 0currency.
    Query 1:  The key figure that is being converted is tied to 0currency in the back end. (this is the query that works).
    Query 2:  The key figure that is being converted is tied to 0inv_curr in the back end.
    Both of the currency conversions are using zcurrency_mand.  Should query 2 be using a new variable similar to zcurrency_mand, but with a Reference Characteristic of 0inv_curr?
    If the answer is yes, I tried creating ZINV_CURR_MAND with Reference Characteristic of 0inv_curr, but am getting the following error when I try to save the changes to Query 2
    [E117(BRAIN)] Errors: Variable ZINV_CURR_MAND2 is not permitted for the target currency. 
    Thanks,
    Jennifer

  • ERROR IN STOCK POSTING

    while doing stock posting I am getting the bellow error T.code:MB1C
    (Period 004/2014 is not open for account type S and G/L 799999)
    Discussion locked.
    Reason:
    1. Basic question. Please put some effort in search & trail, before you post your query as discussion and explain your effort & understanding on that. Don't treat SCN as training center or help center.
    2. Don't post all CAP in subject title
    Please review SCN Rule of Engagement(RoE) and adhere them in your future post/conduct in SCN.
    Message was edited by: Jyoti Prakash

    MATERIAL 419 DOES NOT EXIST IN WAREHOUSE AP " this error  is generated when you make a transfer posting from material to material in inventory management and simultaneously change the plant.
    Solution: Maintain the Material master record of the material in the current plant only. Please also check the warehouse assigned to the plant and whether it has multiple assignments.
    award points if helpful

  • UD - Stock posting of materials handled with HU

    Hello Masters,
    I have one scenario and need your help for same.
    Material will be received in storage location with HU management active. (Example: 60 pcs are received as GR against PO) According to HU definition, system will create handling units (2 HUs are created, one with 50 pcs and another with 10 pcs). As material master will have inspection type 01 active, system will create inspection lot. After quality inspection I found 5 pcs with defects and needs to be scrapped but when I go for 'Inspection Lot Stock' tab in UD there is no option of splitting HU. I can post goods only in term of HU and not material quantity.
    So my query is, how inspection lot quantity can be splited and posted partially into scrap and unrestricted?
    I hope I was clear enough in explaining my query but in case any other information is required then please let me know.
    Thanks in advance.
    Best Regards,
    Devang

    Thanks Luke for your reply.
    Is there any exit available which can allow splitting of HU during UD-stock posting?
    As there can be many instances where material will be handled with HU and though in actual material will be removed (unpacked) from HU for inspection, to perform same in sytem can be skipped if system split HU during UD-stock posting and create new HU in background according to qty moved to different stocks.
    I hope I was able to explain possible scenario.
    Please let me know if you any such exit which can help in mapping such scnarios.
    Thank you in advance,
    Devang

  • Stock Posting List and Quantity in Warehouse show different quantities

    Hi all,
    I have an implementation running on 2007 Edition.
    The case is that there is one item that shows different quantity on Stock Tab of Item Master Data and on Stock Posting List for a specific warehous*e. Specifically, on Stock Data of Item Master Data it shows 100 units and on Stock Posting List shows 254 as current Balance. So there is a difference of 154 units
    I checked "Expanded" Menu of Stock Posting List in case any special selection was made but no transaction was excluded.
    The only extra hint I have is that the difference of 154 is equal to a Stock Reconciliation Transaction that was made (without being sure that this is the cause).
    From my point of view, Stock Posting List has the correct quantity and Onhand on Item Master Data shows 154 units less than the correct one
    Has anyone faced this one before?
    Thanks in advance
    Gerasimos

    Hi,
    Please check Note No. :   1503919. A detect query is mentioned in the Note.
    Kindly check the results obtained and if the Item detected is shown in the result obtained, you need to report the issue to SAP Support.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Stock Posting to New Material

    Hello Experts,
    The key user of QM module want that the QA11 transaction will suggest the same batch number when he is
    gonna to do the stock posting to new material, because they dont change the
    batch number when do this procedure.
    I want your advise, because i dont find any User Exit  or set up to do that.
    Check the attach file.
    Thank you

    Hi,
    please go through the below links, it may help you out to resolve the query,
    Post to new material in QA11 and inspection lot creation
    Inspection lot creation for posting to new mate... | SCN
    Regards,
    Narresh

  • Error while stock posting through template

    Hi
    im using stock taking tamplate for posting stock.after importing dtw shows no error, but  when i observe the stock then the stock is not inserted.Whats the reason?how to solve it?
    Thanks

    Hi Krishna,
      Actually when you import the data thru the oStock taking, then the data features in the
    Inventory> Inventory Transactions> Initial Quantities......
    in the Inventory Tracking tab page wih the counted check box ticked.
    Then you update that and then open the same thru the stock posting tab and post by clicking on reconcile.
    Now as a prior activity you should have the price list imported in the system. Before you update the counted quantities in inventory tracking, go to the initial quantities tab page and select the price list. The system will then take this price as the item cost to post in the inventory.
    As a an activity to proceed, generally I would suggest that you take the item cost from the client, make a price list name "Item cost" and then import the price values for all the items.
    Then you start the quantity import. So this price list is only for the stock posting purpose.
    so to put in in a step wise schedule
    1. Import price list and price values
    2. go to Inventory> Inventory Transactions> Initial Quantities......
    3. Initial quantities tab> and select the required price list for inventory posting
    4. Import thru DTW (oStocktaking)
    5. go to Inventory> Inventory Transactions> Initial Quantities......
    inventory tracking tab> update
    6. Inventory> Inventory Transactions> Initial Quantities......
    stock posting tab> Reconcile
    Then there will be a posting in the inventory gain which is an ofset entry for the import of opening balance. The same way you create an offset account during the update of BP opening balance. You may change the name to Opening balance offset and map that account during the time you reconcile the stock posting.
    I hope this answers your query.
    Regards,
    Raj.

  • General stock statement query.

    hi ,
         can anybody help me in getting stock statement query.... no selection criteria it has to disply all the ware house with Opening stock......inward qty, outward qty,closing stock . (this general) and like this i have to get stock details date wise

    Hi Vignesh......
    I'm in confusion. You are asking the same question with different meanings.
    As you are already suggested to use Inventory Posting List. You get all of your answers to your question.
    It will give you the stock Opening, In, Out, Closing Warehouse Wise (Particular/All), Date wise, Transaction wise...
    Please check this path to refer This Report.
    Inventory->Inventory Reports-->Inventory Posting List......
    If you have different requirement then please do mention.
    Regards,
    Rahul

  • Stock statement query--- help

    Have any one got the stock statement query report in the folowing format....
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    3.Posting Date
    from wh
    to wh
    help me in making stock statement query
    regards,
    Vignesh

    Hi
    Check This
    select w0.itemcode, i0.docdate, w0.whscode, w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0), 0
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) >= 0
    union
    select w0.itemcode, i0.docdate, w0.whscode, 0, -(w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0))
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) < 0
    or
    SELECT T0.ITEMCODE, T0.DSCRIPTION,T0.OPENQTY, T0.OPENVALUE, T0.INQTY, T0.INQTY*T0.PRICE AS 'RCPT VAL', T0.OUTQTY,T0.OUTQTY*T0.PRICE AS 'ISS. VAL', T0.INQTY-T0.OUTQTY AS 'CLOSING STOCK QTY',((T0.INQTY-T0.OUTQTY)*(T0.CALCPRICE)) AS 'CLOSING STOCK VAL' FROM OINM T0 WHERE T0.DOCDATE >=[%0] AND T0.DOCDATE <=[%1]
    Thanks
    Kevin
    Edited by: Kevin Shah on Oct 23, 2010 5:37 PM

  • Automatically printing result of Stock Posting

    Hello all,
    In the tab Stock Posting in Stock Mangament\Stock transactions\Stock posting you can add the figures of the stock count per item.
    A list of the differences can be printed, however id these differences are reconciled, is it possible to get a print of this reconciliation automatically just like the goods issue or goods recept postings?
    We can ofcourse print the stocktacking update list, but you can change the figures after printing this list, so a print after pressing the reconcile button should be better.
    Please advise.
    Best regards,
    Carl Verhagen

    Thanks Gordon for your answer.
    We also can push the printbutton as a difference report will be printed then.
    We just want some prove that the differences are booked just financial report or something like that.
    I can ofcourse write a query over the OINM table that they can run to create some report, but I think it's still the same as printing the difference report.
    But thanks for your suggestion.
    Regards,
    Carl Verhagen

  • No Stock posting before usage decision

    Hi,
    I am in process of implementating QM Module.
    I want to block stock posting from Inspection lot to unrestricted use (or any other use) before Usage Decision for the lot is taken.
    Can anyone give my solution for the same? Are there any SPRO settings for the same?
    Regards,
    Prashant Kolhatkar

    Hi Prashant,
    You must implement the User Status profile QM_L_003  No Stock Posting Before UD.
    Herewith I am pasting the ready made solution hoe to prevent UD before RR is done. What you need to do is change the Business transaction as per your requirement to this status profile.
    You can refer wither this [THREAD |DOCUMENTATION FOR THE BENIFIT OF ALL QM CONSULTANTS u2013USER PROFILE;or this [wiki |https://www.sdn.sap.com/irj/scn/wiki?path=/display/plm/setupofauserprofiletoavoidtheUDpriortoRR]to know the process step by step.
    If any query, pls revert with your detailed configuration of the status profile.
    Regards,
    Shyamal

  • A/P invoice and stock posting

    Hi
    I have some issues with understanding the following:
    I have received some item without having issued a PO for them. For these items, master data exists .
    As common practice with a lot of suppliers, there is no Invoice attached to the shipping, only a delivery note.
    If I post the items to stock using 'Goods receipt' and use A/P invoice some days after when the invoice arrives, I have doubled the received quantity by posting the items to the stock twice.
    What is the solution to have the items posted to stock immediately for further usage and adding the A/P invoice later but without stock posting?
    Thanks
    Franz

    Hi Franz,
    When an AP Invoice is based on a Goods Receipt PO there will be no double posting, not for Warehouse quantites or in the accounting.
    An AP Invoice that is based on a Goods Receipt PO where nothing was changed between the Goods Receipt and the Invoice the AP Invoice will NOT post to stock. The stock posting was already done on the Goods Receipt.
    Most documents can be cancelled, either by basing a reverse documents or by cancelling. For every each one of them the quantities and accounts postings follow the logic of continuous stock.
    Goods Receipt PO -> Reversed by a Goods Return
    AP Invoice -> Reversed by an AP Credit Note.
    Please note that there are NO double entries anywhere when a document is based on another.
    I hope it helps.
    Jesper

  • Inspected stock posting to multiple storage location without batch

    Hi,
    At the time of Usage Decision, I want to post the inspected stock to multiple storage location i.e., Rejected Stock to Scrap Storage Location, Qualified Stock to Unrestricted Use Storage Location.
    Quick response will be appreciated.
    Anandkumar KS

    The scrap line has no storage location since that stock is typically written off and scrap cost center is defined in configuration.
    A possible alternative is to set up VMENGE08 and VMENGE09 with the same material movements you want to use.  You obviously aren't using the 553 movement type as that writes off the material.  That could give you two lines to use for your scraping.  I can't remember if these stock posting lines give you the storage location option or not and I don't have a sandbox available to test today.  If you need to post more then two grades in one inspection lot, you'll have to do the first two postings, save the UD, then come back in and do a second posting for the next two grades.
    Read the configuration help file you'll find in confg for "Define Inventory Postings" under the QM config.
    You can also change the displayed names of the stock posting lines.  That's explained in the config file as well.
    Craig

  • How to change the posting date in UD stock posting for a HU managed item?

    Hi,
    We are using Handling Unit managed items with QM activation. For a specific HU managed material, we wanted to post the stock on a previous date. We have created PO on a back date and made GR also on a back date. Now the problem is, the system has generated an inspection lot. Now while trying to do UD and stock posting, I do not see the "Doc" tab which we normally see in UD stock posting for normal inspection lots (non-HU managed items) for changing the date.
    I don't see any other way to change the posting date for the HU managed item in UD stock posting. Anyone can help please?
    Thanks & Regards,
    Madhavan Krishnamoorthy.

    I don't think you can.
    Craig

Maybe you are looking for