Query On Goods Issue

Hi experts
I have Issued one item (ex.x) on 10/07/2011 with same quantity ,dept ,mach,sub machine,
and i dont know  that i have issued that item on 10/07/2011
but  again  I have Issued same item (ex.x) on 12/07/2011 with same quantity ,dept ,mach,sub machine
Now i want track those records  can anyone help me with a Query i have written one query but its not working just check my query r write a new query and iam pasting my query
Query----
SELECT  x.docnum,x.SERIES,x.docDate,x.ref2,y.[ItemCode],
y.[Dscription],y.U_dept, y.U_SubMach, y.U_machine,y.quantity,y.price
from  oige x inner join ige1 y on x.docentry = y .Docentry
where  x.SERIES in ('222')
and X.DocDate >='2011/07/09' and X.DocDate <='2011/07/12'
AND   y.whscode ='GS-01'
AND y.[ItemCode]>='SS-000800109' AND y.[ItemCode]<='SS-05100001'
Group by x.docnum,x.SERIES,x.docDate,x.ref2,y.[ItemCode],y.[Dscription],y.U_dept,
y.U_SubMach, y.U_machine,y.quantity,y.price
having count(*) > 1
Regards
Jenny

Hi experts
I have Issued one item (ex.x) on 10/07/2011 with same quantity ,dept ,mach,sub machine,
and i dont know that i have issued that item on 10/07/2011
but again I have Issued same item (ex.x) on 12/07/2011 with same quantity ,dept ,mach,sub machine
Now i want track those records can anyone help me with a Query i have written one query but its not working just check my query r write a new query and iam pasting my query
my output should come like dis i dont want other records  which have come one time
Document    Date                       itemname                 Qty      dept                 mach                        sub machine
1                 10/07/2011                    X                        1          B&F                CBR                          M13
2                 12/07/2011                    X                        1          B&F                CBR                          M13
Regards
Jenny

Similar Messages

  • Goods Issue based on Goods receipt.

    Hello,
    Can any body suggest query on "Goods Issue based on Goods receipt."
    Scenario :
    Suppose P.O has been created @10/- for 100 Quantity . GR has done for 100/-in Month of June, now another P.O has created @12/-  for 100 Quantity in Month of July  and GR done for the same , I want to Isuue Goods in Month of july and expect system should take price of @10/- for first 100 Quantity and @12/- for the rest quantity.
    Could you advise.?
    Thanks & Regards
    Sudhansu

    Hi,
    For FIFO Configuration,
    1. Ensure FIFO is active tcode OMWE
    2. FIFO maintained at company code or plant level T code: MRLH
    3. Movement type settings for FIFO T code OMW4
    4. Preparation of FIFO in MMR T code: MRF4
    5. Run the FIFO valuation T code MRF1

  • Goods Issue - SQL Query will not sum

    I have 3 Goods Issue documents with Document Total for each document 10,000 / 20,000 / 30,000 subsequently.
    I want to make query so that it will display like below - where it shows BOTH each of 3 document value (10000/2000/30000) AND the sum of the 3 documents (60000) like below.
    Doc 1 - 10,000
    Doc 2 - 20,000
    Doc 3 - 30,000
    Total = 60,000
    In addition, I would like the ability to choose date range. Basically, something like
    SELECT Document_Total
    FROM Goods_Issue table
    WHERE the_document_date is between 1-SEP-2011 and 31-SEP-2011
    AND the_reference_is _________________
    I have tried many SQL queries, but it displayed either:
    Doc 1 - 10,000
    Doc 2 - 20,000
    Doc 3 - 30,000
    OR
    Total = 60,000
    Please help.

    @Hendry Wijaya      @GordonDu   @malhaar
    Thanks for helps. The SQL query you provided solved 99% of the problem. I just need to make a tweak on the SQL so that it could display the total on the footer. See screenshot below - I uploaded the pics at imageshack as I don't find a way to attach pics in here.
    [See here - Total_at_Footer|http://i129.photobucket.com/albums/p213/whitesnowbear/AAAA/Untitled-2.jpg]
    Thanks a bunch.

  • Idoc to post goods issue against an outbound delivery

    We happened to simulate both the idocs 'WPUWBW01' and 'MBGMCR02' for posting goods issue for an outbound delivery but failed.
    Request you people to help us on this. Is there another idoc that we have to use to post GI... if so please let us know... and if we are using the right one, guess we are not executing it in the right way... in such a case please guide us with the steps...
    Thanks
    Arun
    We got hold of the Idoc type 'DELVRY03 PGI SHPCON' we are able to post the Idoc but we are able to do the packing only or we are able to change the deliveries but the PGI is not happening..
    please help us on this.. is there some condig that updates the delivery with the PGi or is there something else do be done in the Idoc....
    will provide additional details if required.
    Thanks

    Hi Arun,
    There are no configuration settings in this. It is development that your abaper need to carry out.
    Explain to him that this is the func module. And intrun it has to either trigger a BDC or BAPI for creating packing and PGI.
    He should then do the recording of that and will assign the program pertaining to BDC with in the function module.
    One more suggestion is to put the same query in ABAP section too. U will definitely get a positive response.
    Hope this helps.
    Kind Regards
    Chakradhar

  • Check a UDF of batch number when I create Goods Issue or Delivery

    Hello,
    I manage my items with batch number and I want to block the creation of all  Goods Issue or Delivery in function of the value of a UDF (created the OIBT table).
    I think I can achieve this by using the stored procedure SBO_SP_TransactionNotification, but I never used it and I don't know if (and how) I can retrieve the selected batchnumbers of my documents.
    Is it possible to do so, or do you have any better suggestions???
    Thank You,
    Xavier.

    Hi Xavier,
    You can find some additional information about the SBO_SP_TransactionNotification stored procedure here:
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
    The stored procedure only returns the following;
    - Object type
    - Transaction type
    - Num_of_cols_key (number of columns in the primary key of the object)
    - List_of_key_cols_tab_del (the list of the columns in the primary key)
    - List_of_cols_val_tab_del (the values of these columns)
    So the stored procedure doesn't directly return the information you want. You would have to link this with a DI application to access the document in question using the value of the primary key returned by the stored procedure. (Or through using an SQL query also using the primary key returned by the SP).
    Please note however, that SBO_SP_TransactionNotification is designed for notification purposes only. SAP can only support any issues arising out of use as a notification mechanism; the use of this stored procedure to block transactions or work as an authentication step are not supported. Please see SAP note 1011154 for more information.
    Regards,
    Niall

  • Internal error (-2014) Goods Issue with Batch Items added through UI

    Hello Experts,
    I've added a button to my Production Order screen labeled 'Issue Components' that is meant to streamline the process, and it works, except when the ProdOrder has Batch controlled items on it. When that happens it returns Internal error (-2014)<br><br>
    I've tried stepping through the code and it doesn't error until the final Add
    Here is my function, Thanks for the Help!<br><br>
    I'm using CitiXSys Inventory Pro and am pulling the items from the Picked table, that's what that sQuery does. It returns correctly. I've also set everything to 'Manual' instead of 'Backflush'<br><br><br>
    <pre>
    Private Sub IssueComponents(ByVal iDocNum As Integer)
            Try
                'Declaring the needed variables'
                Dim oRec As SAPbobsCOM.Recordset
                Dim oGoodsIssue As SAPbobsCOM.Documents
                Dim bIssueLineAdded As Boolean = False, sQuery As String = "", x As Integer = 0, iCode As Long = 0, sErrorMessage As String = ""
                Dim tmpLot As String = ""
                'Instanciating the Goods Issue'
                oGoodsIssue = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
                'Initialzing the SBO object'
                oRec = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                'Assing the header of the Goods Issue'
                oGoodsIssue.DocDate = Date.Now
                oGoodsIssue.DocDueDate = Date.Now
                'Getting the entire "Manual" components for this production order to issue them'
                sQuery &= "Select PK1.U_DocNo, KI.U_ItemCode, KI.U_BseLnNo, OW.DocEntry, KI.U_Quantity, KI.U_WhsCode, KI2.U_BatSrlNo, KI2.U_LotNo from [OWOR] OW (NOLOCK) INNER JOIN [@ctx_pkin] PK ON OW.DocNum = PK.U_BaseDoc," & vbNewLine
                sQuery &= "[@ctx_PKIN] PK1 (NOLOCK) INNER JOIN [@CTX_KIN1] KI (NOLOCK) ON PK1.U_DocNo = KI.U_DocNo," & vbNewLine
                sQuery &= "[@ctx_KIN1] KI1 (NOLOCK) INNER JOIN [@CTX_KIN2] KI2 (NOLOCK) ON KI1.U_DocNo = KI2.U_DocNo and KI1.U_BseLnNo = KI2.U_BseLnNo" & vbNewLine
                sQuery &= "where OW.DocNum = '" & iDocNum & "' and PK.U_BaseType = 202 and PK1.U_DocNo = PK.U_DocNo and KI1.U_DocNo = PK.U_DocNo and KI1.U_BseLnNo = KI.U_BseLnNo" & vbNewLine
                'Executing the query'
                oRec.DoQuery(sQuery)
                'Looping through the "Manual" components'
                For x = 0 To oRec.RecordCount - 1
                    'Prompting the user'
                    oAppl.StatusBar.SetText("Issuing Components...(" & x + 1 & " of " & oRec.RecordCount & ")", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
                    'Adding the previous line if applicable'
                    If bIssueLineAdded Then
                        oGoodsIssue.Lines.Add()
                    End If
                    'Filling the line information'
                    oGoodsIssue.Lines.WarehouseCode = oRec.Fields.Item("U_WhsCode").Value 'dIssueComponents(x).Item("WhsCode")
                    'oGoodsIssue.Lines.TransactionType = SAPbobsCOM.BoTransactionTypeEnum.botrntComplete
                    oGoodsIssue.Lines.BaseEntry = oRec.Fields.Item("DocEntry").Value 'oProductionOrder.AbsoluteEntry
                    oGoodsIssue.Lines.BaseType = 202                                          'Production Order Type'
                    oGoodsIssue.Lines.BaseLine = oRec.Fields.Item("U_BseLnNo").Value 'GetBaseLine(oProductionOrder.AbsoluteEntry, dIssueComponents(x).Item("Component"))
                    'oGoodsIssue.Lines.ItemCode = oRec.Fields.Item("U_ItemCode").Value
                    oGoodsIssue.Lines.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2) 'dIssueComponents(x).Item("PlanQty")
                    'Checking if the item is neither lot or serial controlled item'
                    If oRec.Fields.Item("U_BatSrlNo").Value = "" And oRec.Fields.Item("U_LotNo").Value = "" Then
                        'Nothing controlled item'
                    ElseIf oRec.Fields.Item("U_BatSrlNo").Value <> "" Then
                        'Lot controlled item'
                        tmpLot = oRec.Fields.Item("U_BatSrlNo").Value
                        'oAppl.MessageBox("Lot: " & tmpLot & ", whs: " & oRec.Fields.Item("U_WhsCode").Value & ", qty: " & oRec.Fields.Item("U_Quantity").Value)
                        oGoodsIssue.Lines.BatchNumbers.Add()
                        oGoodsIssue.Lines.BatchNumbers.BatchNumber = oRec.Fields.Item("U_BatSrlNo").Value
                        oGoodsIssue.Lines.BatchNumbers.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2)
                        'Else
                        'Serial controlled item'
                        'oGoodsIssue.Lines.SerialNumbers.SystemSerialNumber = oRec.Fields.Item("").Value
                    End If
                    'Setting the line to be added'
                    bIssueLineAdded = True
                    'Movoing to the next record'
                    oRec.MoveNext()
                Next x
                'Checking if there was any component or not'
                If bIssueLineAdded Then
                    'Adding the Goods Issue'
                    iCode = oGoodsIssue.Add
                    If iCode <> 0 Then
                        oCompany.GetLastError(iCode, sErrorMessage)
                        oAppl.MessageBox("Goods Issue Production Order: " & iDocNum & " didn't get created for the following reason: " & serrormessage)
                    Else
                        oAppl.StatusBar.SetText("Components were issued successfully.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                        'TODO: add to ProdOrder remarks field
                    End If
                End If
            Catch ex As Exception
                oAppl.MessageBox("IssueComponents() " & ex.Message)
                oAppl.StatusBar.SetText("Error in IssueComponenets() : " & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
            End Try
        End Sub
    </pre>
    Edited by: Rob Daniels on May 30, 2011 10:33 PM

    Please use the latest upgrade of Inventory Pro from CitiXsys.
    If you are using SAP Business One 2007; use Inventory Pro 5.6 series
    For SAP Business One 8.8 and up; use Inventory Pro 6.6.1 and up

  • Inventory goods issue report

    once we write of inventory. HOw can i pull a report for total inventory write off between months. Which report i can use to pull the total inventory write off.

    How do you write off them? If it is by goods issue, just create a query report. However, it will not have any automatic identification for which goods issues are for write-off.
    Thanks,
    Gordon

  • WM goods issue TO creation and TO confirmation understanding.

    Dear all,
    i am using WM in context of PP transactions.
    my transaction flow is as below
    CO01- PRODUCTION ORDER CREATION.
    CO15- ORDER CONFIRMATION (AUTO GOODS ISSUE AND GR- SLOC- 00014 wm managed) IM is executing correctly for goods movemnt.
    LB12- TO CREATION.
    REQURIED help in understanding below scenario.
    stock is available in storage bin 500 ea
    created TO for both 101 and 261 TR
    production order qnty 100 ea
    TO created and if viewed stock in LS26 it showing available stock is zero, once i confirm TO remaining stock of 400 is shown.
    my query is instead of 0 why it is not showing 400 before confirmation. 500 ea is shown in putaway after confirmation remaining stock is  available
    is any customizing remaining for same.

    Hi manish,
    pls find below details,
    Scrn-1-toce- LS26        Stock available in sloc- 0015 -  49,984
                                                                     Putaway  stock –  100,491
    SCRN-2 TR number generated for GR and GI.
    TO  created with LB12 
    SCRN-3- .NOW before confirmation TO (LT12)checking goods issue stock it is ‘0’and
      entire stock is moved to putaway stock.
      Stock available in sloc- 0015 -    0
               Increased putaway stock - 150,455.
    Due to this next TO is not created for 261 as stock is zero.

  • Views Table (Goods Issue & Goods Receipt)

    hi experts,
    i need to create a report on goods issue & goods receipt (from inventory module)...i have create a views on sql server to merge the two table IGN1 & IGE1 but to update this report i need to alter the views to update the reports...
    How can i do this automatically at crystal report....
    Thanks a lot...
    john

    Hi Jon,
    Please post your query in the SAP Business One Reporting & Printing forum
    [Reporting and Printing;
    Regards,
    Rakesh N

  • BADIs used in VL01n transaction ( for post Goods issue)

    Hi,
    The requirement I have is to substitute the transaction type field (BSEG-BEWAR)based on the mapping to movement types.
    The first step, in case of a Goods issue is to look into table LIPS, field BWART to get the movement type. However, since the outbound delivery has not been created, I cannot query this table on the basis of VBELN.
    Is there any BADI which will help me get the value BWART(movement type)?
    Any help/documentation will be greatly appreciated.

    Hi,
    VL01N has one BAdi called "DELIVERY_PUBLISH".
    Why don't you use User exit for solving your problem?
    Following are the user exits availble for the transaction:
    V53W0001  User exits for creating picking waves                  
    V53C0002  W&S: RWE enhancement - shipping material type/time slot    
    V53C0001  Rough workload calculation in time per item                
    V50S0001  User Exits for Delivery Processing                         
    V50R0004  Calculation of Stock for POs for Shipping Due Date List    
    V50R0002  Collective processing for delivery creation                
    V50R0001  Collective processing for delivery creation                
    V50Q0001  Delivery Monitor: User Exits for Filling Display Fields    
    V50PSTAT  Delivery: Item Status Calculation                          
    V02V0004  User Exit for Staging Area Determination (Item)            
    V02V0003  User exit for gate + matl staging area determination (headr)
    V02V0002  User exit for storage location determination               
    V02V0001  Sales area determination for stock transport order         
    VMDE0004  Shipping Interface: Message SDPACK (Packing, Inbound)      
    VMDE0003  Shipping Interface: Message SDPICK (Picking, Inbound)      
    VMDE0002  Shipping Interface: Message PICKSD (Picking, Outbound)     
    VMDE0001  Shipping Interface: Error Handling - Inbound IDoc          
    Regards,
    Dharitree

  • Standard Report check whether Goods Issue has been performed for DN

    Hi All,
    My users is having a list of DNs where they would like to check if Post Goods Issue has been performed for them.  I would like to ask is there any standard reports as to check if a Delivery Note has PGI performed?
    I have tried report VL06G but in this report we cannot give the DN No. as the key. 
    Thanks.

    There is no standard reports to check GI by DN number.
    You have to find out the Outbound Number first then check by Outbound number.
    In SE16N, key VBFA table
    Pump in your DN number under "Follow-on doc."
    Under "Prec.doc.categ." select "J".
    with the outboud number, you can proceed to check using above report suggested.
    Alternatively, using same VBFA table. Pump in list of outbound number under "Preceding Doc." and select "Subs.doc.categ." as "R".
    If you can set-up query reports, you can also get all the information directly with the DN Numbers.

  • Goods issue accounting document

    Hello All,
    I have a sales orderand Billing invoice number, What i need is Goods issue delivery document number and the goods issue accounting document number.
    Please let me know the tables and mapping condition to get goods issue Accounting document number.
    Thanks
    Raghuram

    HI,
    As i understand Your query i positing.
    Please check in VA03 the Status Overview of Order for which OBD done(Shift+F5).
    Overther you will find the OBD no. as well Goods Issue Doc no (material Doc no) and with this GI no. in MIGO display you will find the Accounting Document.
    Tables for OBD is LIKP and MIGO is MSEG. as well MBEW is for Accounting data. as well the Accounting Document will be trace out with FB03 Tcode.
    Try and reply.
    Regards,
    Ninad Kshirsagar

  • Block Goods Issue base on Projects if null

    i have this requirement in SP
    Scenario.
    i want to block Goods Issue base on the ff. requirement
    1. if Project is Null it will block adding the Goods Issue if U_Department and U_Section is empty
    2. if Project is not Null i will allow adding the Goods Issue even the U_Department and U_section is null
    base on this requirement i made an SP but it doesn't work.
    --      Make Department Mandatory in Goods Issue
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
         T1.DocEntry = @list_of_cols_val_tab_del and (T1.Project is not null and T0.U_DEPT is null or T0.U_DEPT ='' ) )
         BEGIN
              Select @error = 10, @error_message = N'Department Must be filled-up!'
         END
    END
    --      Make Section Mandatory in Goods Issue
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
         T1.DocEntry = @list_of_cols_val_tab_del and (T1.Project is not null and T0.U_SECT is null or T0.U_SECT =''))
         BEGIN
              SET @error = 10
              SET @error_message = N'Section Must be filled-up!'
         END
    END
    What seems to be wrong w/ my Code?
    Best Regards...
    Fidel

    hi Avelino Fidel try this try this final query ,it will work
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
    IF EXISTS (SELECT distinct  T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
    T1.DocEntry = @list_of_cols_val_tab_del and (isnull(T1.Project,'') = '')  or  (isnull(T0.U_DEPT,'') = '' ) )
    BEGIN
    Select @error = 10, @error_message = N'Department Must be filled-up!'
    END
    END
    Edited by: Prasanna s on Aug 29, 2009 10:20 AM

  • Goods Issue print for Pull list

    All,
    WHile doing Goods Issue by 201 mvt type one print format is coming .
    So we are designing a format for that .
    This print is coming thru output type WA03 .
    Also while doing pull list (MF60) , one print document is coming .
    Business wants a different format for that .
    And for both transactions ,output type is WA03 .
    How to tackle this situation ?
    regards

    Hello Sandeep,
    I think this query is already addressed. Follow the steps in this post, if you still have problem write to this forum.
    Goods Issue Print
    Hope this helps.
    Regards
    Arif Mansuri

  • Cummulative total for quantity in goods issue row

    Dear all,
    Please advise on how it is possible to get the cummulative total of quantity in a udf in the goods issue row. Which query will work in the formatted search in the
    Kind Regards,
    Monil

    Dear Rahul,
    I have created another udf in the row which should contain the cummulative total of the quantity entered for the same item in the rows above.
    Regards,
    Monil.

Maybe you are looking for

  • 2 ISPs with addresses /32 and PPtP Server onboard of Cisco 3825

    First of all, excuse me for my bad English, it's not my native language. A couple of years ago our company changed our central router Cisco 1841 with more powerfull 3825 ISR. Here is show ver Cisco IOS Software, 3800 Software (C3825-ADVENTERPRISEK9-M

  • Cannot connect to youtube on my home wifi

    I have no trouble connecting on other WiFi networks and on 3g.  In fact if I am watcvhing a video on 3g and then connect to the home WiFi, it will continue playing.  I cannot find any security or firewall settings that could be blocking it and it is

  • Replace function in JDeveloper 3.2

    Hi JDev Team: Are there any global replace functions in JDev 3.2, for instance I have one word, say 'aaaa', in all of my projct files, .jsp, .java, .... I like to replace with 'bbbb'. Thanks

  • -cvs, -git, -snv... is really a good naming convention?

    The unstable packages have the name of their relative stable one with added in suffix the concurrent version system installed. I think it is a bad convention since it mixes implementer choices with the the concept of lastest unstable version. I think

  • Upgrade from Panther to Leopard

    After buying an iPhone 3GS, I think it's time to finally perform a software upgrade. The newest versions of Firefox and Safari browsers don't run on Panther either. I want to hang on to my 5 year old G4 iMac for at least a couple more years and now h