Negative DocEntry

Hi experts,
I have read the SAP Note 1310893 regarding the negative DocEntry for Incoming Payment, it says if we are using overlapping DocNum we will get negative DocEntry even though we specified different Period Indicators. I did not get any negative DocEntry previously but not for this month.
Any solution for this issue?
Please advice.
Thank you.
Regards,
Lim

Hi Gordon,
I have overlapping numbers for few months back, ever since July 2009.
Different period indicators and number starts with 1001. It was working fine from July 2009 till February 2010 but not on this month.
I really do not think SAP will have solution for this issue.
Thank you.
Regards,
Lim

Similar Messages

  • Outgoing Payment Generates Negative Docentry

    After creating New  financial year ,Outgoing Payment Docentry generated is Negative.
    What could be the problem for negative Docentry generation.

    Hi,
    As per Mr.Jitin's  reply, if any overlapping, document entry will be in negative.
    Why DOCENTRY is not continuing from last years no. like other documents like OINV?
    If you change document numbering, new document entries will be created.
    why docentry filed is not there in VPM1 & RCT1  like INV1 & others?
    Because incoming payment (ORCT) table is common to check, invoice, account, vouchers. These tables are linked with document number.
    ORCT.docentry = RCT1.Docnumber
    Hope you understand.
    Thanks & Regards,
    Nagarajan

  • Outgoing payment & Incoming payment are generated negative docentry in new year

    After creating New  financial year , Outgoing Payment and Incoming Payment Docentries are generated from beginning (1) but in Negative  why?.  In all documents the same is generated continuous nos from last years. why in OP & IP generated in different way.  If we create in next financial year 15-16 how the they generate.

    Hi,
    As per Mr.Jitin's  reply, if any overlapping, document entry will be in negative.
    Why DOCENTRY is not continuing from last years no. like other documents like OINV?
    If you change document numbering, new document entries will be created.
    why docentry filed is not there in VPM1 & RCT1  like INV1 & others?
    Because incoming payment (ORCT) table is common to check, invoice, account, vouchers. These tables are linked with document number.
    ORCT.docentry = RCT1.Docnumber
    Hope you understand.
    Thanks & Regards,
    Nagarajan

  • Negative Document Entry in Incoming Payment Form

    Hello All,
    I have faced an unique problem in Incoming Payment Form  in SAP while entering the document for the Period 2014 the document is getting saved but while checking it from the table the DocEntry field is getting added in Negative values like '-1','-2' and soon .Document No. is getting added in normal manner this peculiar thing is happening in this specific Period not for the other period.
    Negative DocEntry will create any problem or not ?? How to resolve this problem.
    Thanks ,
    Rajeev

    Hi,
    Please check SAP note:
    1310893 - Negative docentry is used when there are overlapping
    numbers
    Thanks & Regards,
    Nagarajan

  • Negative Balance in Opening Stock & Closing Stock

    Dear Experts,
                        Below the query which i used to get the Opening Stock,Purchase,Issue,Return and closing stock. Here i face some problem that i get negative inventory for some items and the same has been checked in inventory audit report but there it is showing correct value.And also i understand that those items which shows negative inventory in Opening and closing is previously got changed in Item group after some transactions.Can any one help me to sort out this issue ?
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @ItmsGrpNam varchar(100)
    select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >= '[%0]'
    select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <= '[%1]'
    select @ItmsGrpNam = max(s2.ItmsGrpNam) from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]'
    Select distinct a.Itemcode, max(a.Dscription) as ItemName, (Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM,a.InvntAct,
    (isnull(( Select distinct sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.DocDate<=@FromDate ),0)- isnull(( Select sum(isnull(outqty,0)) from OINM O1
      where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct and O1.DocDate<=@FromDate),0)) as [Opening Stock],
    (isnull((Select distinct isnull(sum(round(TransValue,0)),0) from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.DocDate<=@FromDate ),0)) as [Opening Stock Value],
    isnull((Select ISNULL((sum(isnull(inqty,0))),0) from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.transtype in (20,18)),0) as [Purchase Quantity],
      isnull((Select isnull(sum(round(TransValue,0)),0) from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.InQty>=0 and O1.JrnlMemo not like '%cancellation%'
      and O1.transtype in (20,18)),0 ) as [Purchase Value],
    isnull((Select sum(isnull(OutQty,0))from OINM O1 where O1.itemcode=a.ItemCode AND O1.InvntAct = a.InvntAct
      and  O1.ApplObj = '202' and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.OutQty>0 and
      O1.transtype = '60'),0) as [Production Issue Quantity],
    isnull((Select isnull(sum(round(TransValue,0)),0)from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
            and  O1.ApplObj = '202' and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.OutQty>0
             and O1.transtype  = '60'),0) as [Production Issue Value],
    isnull((Select sum(isnull(Inqty,0)) from OINM O1 inner join OIGN G1 on O1.BASE_REF = G1.DocNum inner join IGN1 G2 on G1.DocEntry=G2.DocEntry
            where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct and O1.ItemCode = G2.ItemCode
            and  G2.BaseType = '202' and G2.TranType is null and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.Inqty>0 and O1.transtype = '59'),0) as [Goods Receipt Return Quantity],
    isnull((Select sum(isnull(Inqty,0)) from OINM O1
      inner join OIGN G1 on O1.BASE_REF = G1.DocNum
      inner join IGN1 G2 on G1.DocEntry=G2.DocEntry
      --inner join OITM a on a.itemcode= o1.ItemCode
      --inner join OACT c on c.AcctCode = o1.InvntAct
      where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct and O1.ItemCode = a.ItemCode
      and G2.LineNum = O1.DocLineNum and G2.BaseType = '202' and g2.TranType is null
      and O1.docdate >= @FromDate and o1.DocDate <= @ToDate
      and O1.Inqty>0 and O1.transtype = '59'),0)as [Goods Receipt Return Quantity_1],
    isnull((Select sum(round(TransValue,0))from OINM O1 inner join OIGN G1 on O1.BASE_REF = G1.DocNum inner join IGN1 G2 on G1.DocEntry=G2.DocEntry
            where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct and O1.ItemCode = G2.ItemCode
            and  G2.BaseType = '202' and G2.TranType is null and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.Inqty>0 and O1.transtype = '59'),0) as [Goods Receipt Return Value],
    (isnull((Select distinct isnull(sum(isnull(inqty,0)),0)from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.DocDate<=@ToDate),0)- isnull((Select isnull(sum(isnull(outqty,0)),0) from OINM O1
      where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct and
      O1.DocDate<=@ToDate),0)) as [Closing Stock],
    (isnull (( Select distinct isnull(sum(round(TransValue,0)),0)from OINM O1 where O1.itemcode=a.itemcode AND O1.InvntAct = a.InvntAct
      and O1.DocDate<=@ToDate),0)) as [Closing Stock Value],
    (Select distinct i.LastPurDat from OITM i where i.ItemCode=a.Itemcode) as 'Last Purchase Date',
    (Select distinct b.ItmsGrpNam from OITB b where b.ItmsGrpCod = I1.ItmsGrpCod) as 'Group Name'
      from (Select distinct N1.Itemcode, N1.Dscription, isnull((sum(N1.inqty)),0)-isnull((sum(n1.outqty)),0) as OpeningBalance,
      isnull((sum(N1.Transvalue)),0) as OpeningValue,n1.InvntAct,0 as INq,
      0 as OUT From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
      inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
      inner join OACT c on c.AcctCode = n1.InvntAct
      Where N1.DocDate <=@FromDate and i.ItemCode = n1.ItemCode and b.ItmsGrpNam = @ItmsGrpNam and N1.Transtype <> '67'
      Group By N1.ItemCode,N1.Dscription,n1.InvntAct
    Union
      select distinct N1.Itemcode, N1.Dscription, 0 as OpeningBalance,0 as OpeningValue,
      n1.InvntAct,sum(N1.inqty) , 0 as OUT From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
      inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
      inner join OACT c on c.AcctCode = n1.InvntAct
      Where N1.DocDate >= @FromDate and N1.DocDate<= @ToDate and N1.Inqty >0 and n1.ItemCode = i.ItemCode
      and b.ItmsGrpNam = @ItmsGrpNam and N1.Transtype <> '67'
      Group By N1.ItemCode,N1.Dscription,n1.InvntAct
    Union
      select distinct N1.Itemcode, N1.Dscription, 0 as OpeningBalance,0 as OpeningValue,n1.InvntAct,0,sum(N1.outqty) as OUT
      From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
      inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
      Where N1.DocDate >= @FromDate and N1.DocDate <=@ToDate
      and N1.OutQty > 0 and  b.ItmsGrpNam = @ItmsGrpNam and n1.itemcode = i.itemcode and N1.Transtype <> '67'
      Group By N1.ItemCode,N1.Dscription,n1.InvntAct)a,dbo.OITM I1 ,OITB b1
      where a.ItemCode=I1.ItemCode and I1.ItmsGrpCod = b1.ItmsGrpCod
      Group By a.Itemcode ,I1.ItmsGrpCod , b1.ItmsGrpNam,a.InvntAct
      Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0
      Order By a.Itemcode
    Thanks & Regads,
    Bhoopathi.K

    Hi,
    Please check SAP notes for why negative values appeared above report.
    2003493 - Stock Ageing Report Displays Negative Inventory
    Values
    1407192 - Negative Stock Handling
    Thanks & Regards,
    Nagarajan

  • Item's onorder qty is negative.

    hi experts,
    I saw some items in my SBO have negative OnOrder quantities. i checked inventory status report and it also shows negative OnOrder quantity, but when I double click the row number to get the detailed information, there are no any quantities in OnOrder column. it's weird.
    is this normal or abnormal? how to improve? Thanks....

    Hi,
    This except is take from the Support Self Help and Library which is located on main support page in the SMP for partners
    https://websmp108.sap-ag.de/~sapidb/011000358700000622642008E
    NCORRECT COMMITTED/ORDERED QUANTITY
    Influence: DB Corruption
    Symptoms
    Customer might experience one or more of the following scenarios:
    Open quantity in Sales order is incorrect
    Negative / incorrect quantity in u2018Committedu2019 or u2018Orderedu2019 fields in Item Master Data
    Wrong results given by MRP
    Available quantity in Pick and Pack manager is incorrect
    Cannot issue from WH as going under Minimum Inventory level due to Available quantity is wrong as a result of corrupted Committed / Ordered quantity
    Sales / Purchase Analysis for orders give wrong figures
    The Orders Balances on the BP Master Data could display negative / incorrect balance
    The Open Items List report might show negative / incorrect amounts
    The Inventory status report can show differences between the summary and the detailed report (when double-clicking on the row number)
    Reason
    Incorrect Committed / Ordered quantity of an item is an application error in SAP Business One. The application was fixed in patches.
    What to check?
    In order to identify affected records, please run the queries below:
    Resolution
    This is an application error in SAP Business One. The application was fixed in patches.
    Please upgrade to the latest available patch and only then contact SAP Support in order to have the Customer data fixed.
    Additional Reference Material
    Please find more information and scenarios causing this issue in the following SAP notes:
    Incorrect Committed / Ordered quantity when changing orders Note 999124
    Missing link between base and target documents 1006339
    Open items list of orders shows negative / incorrect amounts Note 1020017
    Changing quantity of partial delivered Sales order causes incorrect open quantity Note 1027184
    Restore Item Balances updates Drop Ship warehouse Note 1042833
    Open Quantity in Purchase order after closing a row Note 1050749
    Wrong Open Quantity when changing purchase order Note 1053665
    Open items list of orders with negative / incorrect values Note 1056987
    Incorrect Committed Quantity after Sales Order changes Note 1068929
    Incorrect Committed Quantity when changing Sales Order header and row Note 1076849
    Incorrect value after Production order updated via DI API Note 1085905
    Incorrect Ordered quantity after Receipt from Production Note 1137673
    Incorrect Committed quantity after Issue for Production Note 1232036
    There are two queries you can run to check this issue:
    QUERY 1----
    CREATE TABLE temp_calc
    (ItemCode nvarchar (20) NOT NULL,
    WhsCode nvarchar (8) NOT NULL,
    calc_committed numeric(19,6) NOT NULL,
    calc_onorder numeric(19,6) NOT NULL,
    DECLARE @count_commited numeric(19,6)
    DECLARE @count_ordered numeric(19,6)
    DECLARE @itemcode nvarchar(20)
    DECLARE @whscode nvarchar(8)
    DECLARE @buy_number numeric(19,6)
    DECLARE @sale_number numeric(19,6)
    --create and fill temporary table that holds all BOM ancestors
    select i.code as itemcode, father as ancestor, quantity, warehouse
    into ancestors
    from itt1 i, oitt o
    where i.father = o.code
    and o.treetype = 'A'
    while exists (select 1
                     from ancestors a INNER JOIN itt1 i
                     ON a.ancestor = i.code
                     INNER JOIN  oitt o
                     ON i.father = o.code
                     where not exists (select 1
                                            from ancestors b
                                            where b.itemcode =a.itemcode
                                            and b.ancestor = i.father
                                            and b.warehouse = i.warehouse
                    and o.treetype = 'A'
    begin
    insert into ancestors
    select a.itemcode, i.father, i.quantity*a.quantity, i.warehouse
    from ancestors a INNER JOIN itt1 i
    ON a.ancestor = i.code
    where not exists (select 1
                          from ancestors b
                          where b.itemcode =a.itemcode
                          and b.ancestor = i.father
                          and b.warehouse = i.warehouse
    end
    declare MyCursor      CURSOR
    for
    select i.ItemCode,i.WhsCode, t.NumInBuy, t.NumInSale
    From oitw i, owhs w, oitm t
    where i.whscode = w.whscode
    and i.itemcode = t.itemcode
    and w.dropship <>'Y'
    and t.invntitem <> 'N'
    order by i.ItemCode,i.WhsCode, t.NumInBuy, t.NumInSale
    Open MyCursor
    Fetch next From MyCursor
    Into @itemcode, @whscode, @buy_number, @sale_number
    While ( @@Fetch_Status = 0)
    Begin
    set @count_commited = 0
    set @count_ordered = 0
    set @count_commited = 
              --Sales order for not BOMs and sons of Sales type BOMs
                   ISNULL((select sum(openqty * (case when r.UseBaseUn = 'Y' then 1 else ISNULL ( @sale_number, 1) end))
                   from rdr1 r, oitm t
                   where r.itemcode = @itemcode
                   and r.whscode = @whscode
                   and r.linestatus = 'O'
                   --and r.treetype in ('I', 'N')
                   and r.itemcode=t.itemcode
                   and t.treetype not in ('S','A')
                   group by r.itemcode, r.whscode),0)
                   --AR Reserved Invoice for not BOMs and sons of Sales type BOMs
                   +ISNULL((select sum (i.openqty* (case when i.UseBaseUn = 'Y' then 1 else ISNULL ( @sale_number, 1) end))
                   from inv1 i, oinv o, oitm t
                   where i.itemcode = @itemcode
                   and whscode = @whscode
                   and i.docentry = o.docentry
                   and o.updinvnt = 'C'--reserved invoice
                   and i.openqty > 0
                   and i.invntsttus = 'O'
                   and i.itemcode=t.itemcode
                   and t.treetype not in ('S','A')
                   group by i.itemcode, i.whscode),0)
                   --Sales order for Assembly type BOMs sons
                   + ISNULL((select sum (comittedqty)
                              from (select sum(r.openqty/t.qauntity)*i.quantity
    (case when r.UseBaseUn = 'Y' then 1 else ISNULL((select t.NumInSale
                                                                                                   from oitm t
                                                                                                   where r.itemcode = t.itemcode), 1)end) as comittedqty
                                       ,i.itemcode as itemcode
                                       from rdr1 r, ancestors i, oitt t
                                       where i.itemcode = @itemcode
                                       and case isnull(r.ChgAsmBoMW,'') when 'Y' then r.whscode else i.warehouse end = @whscode
                                       and r.itemcode = i.ancestor
                                       and linestatus = 'O'
                                       and t.code = r.itemcode
                                       and t.treetype = 'A'
                                       group by  i.quantity ,r.itemcode,r.whscode,i.itemcode,r.UseBaseUn) as t
                             group by t.itemcode), 0)
                   --Reserve Invoice for Assembly type BOMs sons
                   + ISNULL((select sum (comittedqty)
                             from (select sum(r.openqty/t.qauntity)*i.quantity
    (case when r.UseBaseUn = 'Y' then 1 else ISNULL((select t.NumInSale
                                                                                                   from oitm t
                                                                                                   where r.itemcode = t.itemcode), 1)end) as comittedqty
                             ,i.itemcode as itemcode
                             from inv1 r, ancestors i, oinv o, oitt t
                             where i.itemcode = @itemcode
                             and case isnull(r.ChgAsmBoMW,'') when 'Y' then r.whscode else i.warehouse end = @whscode
                             and r.itemcode = i.ancestor
                             and r.docentry = o.docentry
                             and o.updinvnt = 'C'
                             and r.openqty > 0
                             and r.invntsttus = 'O'
                             and t.code = r.itemcode
                             and t.treetype = 'A'
                             group by  i.quantity ,r.itemcode,r.whscode,i.itemcode,r.UseBaseUn) as t
                        group by t.itemcode), 0)
                   --Planned/Released Production orders (not Disassembly) for production    --type BOMs sons
                   +  ISNULL ((select sum (comittedqty)
                                  from      
                                       (select CASE
                                       WHEN isnull(w.issuedqty,0) > w.plannedqty THEN 0        
                                      ELSE w.plannedqty-isnull(w.issuedqty,0)
                                       END as comittedqty , w.itemcode as itemcode
                                       from owor o, wor1 w
                                       where o.docentry = w.docentry
                                       and o.status in ('P', 'R')
                                       and o.type <> 'D'
                                       and w.plannedqty >= 0
                                       and w.warehouse = @whscode
                                       and w.itemcode = @itemcode
                                       group by w.itemcode, w.docentry,w.linenum, w.issuedqty, w.plannedqty)as t
                                  group by t.itemcode), 0)
                   --Planned/Released Disassembly Production orders for production type
                   --BOMs father
                   +  ISNULL ((select sum (comittedqty)
                                  from      
                                       (select CASE
                                       WHEN (o.cmpltqty+o.RjctQty) > o.plannedqty THEN 0        
                                      ELSE o.plannedqty-(o.cmpltqty+o.RjctQty)
                                       END as comittedqty , o.itemcode as itemcode
                                       from owor o
                                       where o.status in ('P', 'R')
                                       and o.type = 'D'
                                       and o.warehouse = @whscode
                                       and o.itemcode = @itemcode
                                       group by o.itemcode, o.docentry,o.cmpltqty , o.plannedqty,o.RjctQty)as t
                                  group by t.itemcode), 0)
    set @count_ordered =
                   --Purchase order for not BOMs
                   ISNULL((select sum(openqty * (case when r.UseBaseUn = 'Y' then 1 else ISNULL ( @buy_number, 1) end))
                   from por1 r, oitm t
                   where r.itemcode = @itemcode
                   and r.whscode = @whscode
                   and r.linestatus = 'O'
                   and r.itemcode=t.itemcode
                   and t.treetype not in ('S','A')
                   group by r.itemcode, r.whscode),0)
                   --AP Reserved Invoice for not BOMs
                   + ISNULL((select sum (i.openqty* (case when i.UseBaseUn = 'Y' then 1 else ISNULL ( @buy_number, 1) end))
                   from pch1 i, opch o, oitm t
                   where i.itemcode = @itemcode
                   and i.whscode = @whscode
                   and i.docentry = o.docentry
                   and o.updinvnt = 'O'
                   and i.openqty > 0
                   and i.invntsttus = 'O'
                   and i.itemcode=t.itemcode
                   and t.treetype not in ('S','A')
                   group by i.itemcode, i.whscode),0)
                   --Planned/Released Production orders (not Disassembly) for production
                   --type BOMs (fathers)
                   +  ISNULL ((select sum (orderedqty)
                                  from      
                                       (select CASE
                                       WHEN (o.cmpltqty+o.RjctQty) > o.plannedqty THEN 0        
                                      ELSE o.plannedqty-(o.cmpltqty+o.RjctQty)
                                       END as orderedqty , o.itemcode as itemcode
                                       from owor o
                                       where o.status in ('P', 'R')
                                       and o.type <> 'D'
                                       and o.warehouse = @whscode
                                       and o.itemcode = @itemcode
                                       group by o.itemcode, o.docentry,o.cmpltqty , o.plannedqty,o.RjctQty)as t
                                  group by t.itemcode), 0)
                   --Planned/Released Disassembly Production orders for production type
                   --BOMs sons
                   + ISNULL ((select sum (orderedqty)
                                  from      
                                       (select CASE
                                       WHEN isnull(w.issuedqty,0) > w.plannedqty THEN 0        
                                      ELSE w.plannedqty-isnull(w.issuedqty,0)
                                       END as orderedqty , w.itemcode as itemcode
                                       from owor o, wor1 w
                                       where o.docentry = w.docentry
                                       and o.status in ('P', 'R')
                                       and o.type = 'D'
                                       and w.warehouse = @whscode
                                       and w.itemcode = @itemcode
                                       group by w.itemcode, w.docentry,w.linenum, w.issuedqty, w.plannedqty)as t
                                  group by t.itemcode), 0)
                   --Planned/Released Production orders (not Disassembly) for production
                   --type BOMs negative qty sons
                   + ISNULL ((select sum (orderedqty)
                                  from      
                                       (select (CASE
                                       WHEN isnull(w.issuedqty,0) < w.plannedqty THEN 0        
                                      ELSE abs(w.plannedqty-isnull(w.issuedqty,0))
                                       END) as orderedqty , w.itemcode as itemcode
                                       from owor o inner join wor1 w
                                       on o.docentry = w.docentry
                                       where o.status in ('P', 'R')
                                       and o.type  <> 'D'
                                       and w.plannedqty < 0
                                       and w.warehouse = @whscode
                                       and w.itemcode = @itemcode
                                       group by w.itemcode, w.docentry,w.linenum, w.issuedqty, w.plannedqty)as t
                                  group by t.itemcode), 0)
    Insert into temp_calc
    select @itemcode, @whscode,@count_commited,@count_ordered
    Fetch next From MyCursor
    Into @itemcode, @whscode, @buy_number, @sale_number
    End
    Close MyCursor
    select t.itemcode, t.whscode, t.calc_committed as IsCommited_calculation, o.IsCommited as IsCommited_system,
    t.calc_onorder as OnOrder_calculation, o.OnOrder as OnOrder_system, o.onhand as OnHand_system, i.canceled ItemCanceled,
    (select isnull(max(1),0) from aitm a where a.itemcode = t.itemcode and a.invntitem= 'N') invntItemStatus_changed
    from temp_calc t, oitw o, oitm i
    where t.itemcode = o.itemcode
    and t.whscode = o.whscode
    and t.itemcode = i.itemcode
    --the line below can be marked as comment in order to see results for all items
    and (calc_committed <> o.IsCommited or calc_onorder <> o.OnOrder)
    drop table ancestors
    drop table temp_calc
    DEALLOCATE MyCursor        
    QUERY 2----
    SELECT DOCENTRY                               
    FROM WOR1                                     
    WHERE ISSUEDQTY IS NULL OR COMPTOTAL IS NULL 
    I think you will need to contact SAP support, however an upgrade is recommened to prevent this from happening in the future, but SAP can correct the data.
    Regards,
    Paul

  • SP_Transaction notification for Cash account non negative value

    Hi I wrote the following  SP_Transaction notification when cash account is going negative in outgoing payment.its working fine in 2005B.
    But it is not working in 2007B.pl any one help me.
    IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'46')
    BEGIN
         if  Exists ( select t0.currtotal from oact t0 inner join ovpm t1 on t0.AcctCode=t1.CashAcct
         where  t0.currtotal <=0 and t1.docentry=@list_of_cols_val_tab_del)
    BEGIN
    SELECT @Error = 1, @error_message = 'Cash account should not be negative!'
    END
    END
    Edited by: ArulPrakasan P on Nov 21, 2008 1:42 PM

    No , ia m not getting any error message in 2007B.
    then i tried the following... I restored the 2005B database to 2007B.then it got upgraded to 2007B,then i tried to add the out going payment with the above SP_transactionnotification.
    now i got the following error msg...
    [microsoft] [sql native client] [sql server] : conversion failed when converting the varchar value '@list_of_cols_val_tab_del' to datatype int
    Edited by: ArulPrakasan P on Nov 24, 2008 9:14 AM
    Edited by: ArulPrakasan P on Nov 24, 2008 9:15 AM

  • Negative Balance with cash account not allowed

    Dear Expert,
    I want to stop transaction with negative cash balance in Cash account.
    How do I do it? Please help me.

    Hello sujankjana ,
    Please try this in SP_Transactionnotification procedure.
    IF @transaction_type = 'A' ANd @object_type ='46'
    Begin
    Declare @Amount decimal(10,3)
    Set @Amount = (Select T3.CurrTotal from OACT T3  where  T3.AcctCode  = (Select CashAcct from OVPM where DocEntry = @list_of_cols_val_tab_del ))
    if @Amount < 0
    Begin
    Select @error = 17 ,@error_message =N'We have not sufficiant Cash Amount '
    end
    end
    if any query kindly revert back.
    Thanks & Regards
    Manvendra Singh Niranjan

  • How can I deal with negative marking in a quiz marking scheme?

    I wonder if anyone can help me with a problem I have in developing the 'code' for a marking scheme for an exam in Captivate 8. I would be very grateful for pointers towards a viable solution. At the moment I am just thrashing around.
    My background is in C++ and I think part of my problem is in trying to find analogues of functions I would use in that environment. My experience with Captivate is limited to developing fairly simple training courses but now I need to put an existing exam on line, maintaining its relatively complicated marking scheme, which is as follows:
    The paper is multiple choice, each question having four statements, one (or at the most two) of which is true. A completely correct answer gets 4 marks so where there are two correct statements each gets 2 marks. So far, so easy.
    The difficulty arises from an element of negative marking. If 3 or more statements are selected, the score is 0 marks. If there is a single correct statement and it and an incorrect statement are selected, the score is 2 marks. If there are 2 correct statements and one of them is selected, the score is 2 marks. If an incorrect statement is selected as well, the score is 1 mark.
    I had assumed I could use conditional logic and user variables on a slide-by-slide basis to provide a score value and then assign it to the appropriate system quiz variable, but it seems I can't assign values to variables in a quiz slide. That would have been too easy...
    So, can anybody advise me on an approach that keeps the advantages of using the quiz framework, including the use of the Review function?
    Any help very gratefully received.

    If you use SCORM 1.2 for reporting, negative scores will be converted to zero, because it doesn't allow negative score.
    If you want to keep to Review functionality, you need to stay with the default question slides. There are some tweaking possibilities but changing the score is not one of them.
    Question Question Slides in Captivate - Captivate blog
    Question Question Slides - Part 2 - Captivate blog
    I think the only possible way is to use JS, but then you'll not be able to keep the functionality of the Question slides, you are in custom question slides. Plenty of examples of custom questions can be found on my blog as well.

  • Move negative sign (minus) to left side of value in gui_download

    Hi,
    While downloading data using gui_download I want to bring the negative sign to the left side of the value. Is this possible?
    Regrads,
    Madhu

    Hi,
    Use FM
    CALL FUNCTION  'CLOI_PUT_SIGN_IN_FRONT'
    Regards.
    Eshwar.

  • GRC: Negative ack; PI: End tag 'enviNFe' does not match the start tag 'NFe'

    Bom dia SAP Boosters!
    Como muita gente estou aqui brigando com o GRC NFe. Esse forum tem resolvido meus problemas, até agora. Por isso inicio um novo tópico pois estou tendo o seguite problema que nao encontrei resposta:
    O grc e o pi estao em servidores separados. Do lado do grc, na sxmb_moni mostra para a interface BATCH_nfeRecepcaoLote_OB erro no acknowledgement status. abrindo o item error do ack msg id aparece:
    <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="BPE_ADAPTER">NEGATIVE_ACKNOWLEDGEMENT</SAP:Code>
      <SAP:P1></SAP:P1>
      <SAP:P2></SAP:P2>
      <SAP:P3></SAP:P3>
      <SAP:P4></SAP:P4>
      <SAP:AdditionalText></SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace=""></SAP:ApplicationFaultMessage>
      <SAP:Stack>Negative acknowledgment triggered by a process</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    No lado do PI, ao consultar esta interface e abrir o payload do item Request Message Mapping, aparece a mensagem de erro: End tag 'n0:enviNFe' does not match the start tag 'NFe'. e todo o xml fica em uma linha só.
    Voltei entao no xml do sender e de fato encontrei a tag NFe, onde deveria constar os dados das notas fiscais, sendo aberta mas nao sendo fechada, e sem dados, desse jeito.
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:nfeRecepcaoLote2 xmlns:n0="http://sap.com/xi/NFE/006">
      <n0:cUF>35</n0:cUF>
      <n0:tpEmis>1</n0:tpEmis>
      <n0:tpAmb>2</n0:tpAmb>
    - <n0:nfeDadosMsg>
    - <n0:enviNFe versao="2.00" xmlns:n0="http://www.portalfiscal.inf.br/nfe">
      <n0:idLote>000000000000025</n0:idLote>
      <n0:NFe asx:root="" xmlns:asx="http://www.sap.com/abapxml"></n0:NFe>
      </n0:enviNFe>
      </n0:nfeDadosMsg>
      </n0:nfeRecepcaoLote2>
    Alguém já viu esse bug? estou com grc 10 e SP 08 e das notas que sairam depois nenhuma fala disso.
    Obrigado.

    Fiz um teste que parou de dar erro de acknowledgement e chegou a enviar o lote para a sefaz, que retornou erro de schema porque o xml continua vazio:
    Na interface determination gerada quando criei o cenário NFE_BATCH_WebAS_Outbound_Batch, a que contém a interface BATCH_nfeRecepcaoLote_OB, tirei o operation mapping BATCH_nfeRecepcaoLote2_TO_nfeRecepcaoLote2. Embora não seja mais retornada a mensagem de erro na tag, o payload continua no mesmo formato postado acima. Entao coloquei de volta.
    Bem, pesquisando vi que a função que gera o xml é a  /XNFE/006_SIGN_NFE_OUT. As notas aparecem como assinadas no monitor do grc, mas vou ter que ver entao como esta ocorrendo a geraçao do xml por esta funçao, certo?

  • How to find Negative number

    can any one pls tell me how to find negative number ?
    Thanks

    1. One easy method is to look for the giveaway dash in front of the number, e.g. "-1" is a negative number, given the "-" instead of the "1."
    2. Negative numbers can also sneakily be found by multiplying i by itself: i^2^ is a negative number.
    3. Negative numbers can hide in the exponent of e as complex numbers. e.g. e^i*pi^ is a negative number.
    4. If we're referring to Java here, perhaps the following could be of some use:
    final int ZERO = 0;
    public static void main(String[] args) {
    int a = 3;
    int b = -13;
    System.out.println(a + " is negative? " + lessThanZero(a));
    System.out.println(b + " is negative? " + lessThanZero(b));
    boolean lessThanZero(int n) {
    return n < 0;
    }

  • ML81N Negative Quantity Posting for Credit or Difference Adjustments.

    ECC 5.0 - DIMP
    This is a VERY, VERY common situation at nearly all companies where a credit or small difference may occur between the invoice amount and the SES.  Reversing / canceling and reentering documents, along with all of the additional accounting documents created is not an appropriate option.
    =========================
    I have a situation with Service Entry Sheets where a vendor delivers services for a PO line item.  There can be MANY service entries, and MANY invoices for a single PO Line item.
    Invoices are posted against the open GR SES amount on the PO Line Item and not specifically to the service entry sheet.  As a result there may be more than one invoice tied to a single service entry sheet.  The reversal option would requie
    When credits come in, or when vendor discounts are taken the SES amount does not match but there is a need to ensure that the SES amount matches the vendor credit amount (whether credit memo or discounts taken). 
    NUMEROUS SAP OSS Notes say that Negative Service Entry Sheet Amounts are possible, and in the first step I even get an SE042 warning message about the negative quantity.  However, when I press ENTER to go past the warning I then get messgae SE396 as a hard error and the dialog box for the error has JUST an exit button causing the entire transaction to exit the process.
    Has anyone ever worked successfully with negative service entry sheet quantities?
    If so, what were your lessons learned?
    Here are some of the notes I have reviewed, and the ability to do the negative SES quantity goes back to 4.6:
    365648
    375799
    411262
    455707
    1068156
    1166693

    Hi Bill,
    If you try to save an SES with ONLY a negative quantity you will receive               
    the following error Value of specs. less than zero (function cannot be                 
    performed) Message no. SE396.
    You can enter negative VALUES based on the               
    following rules:                                                                               
    The service specifications contain lines with negative values.                         
    Service lines with negative values are only allowed if the following                   
    conditions are fulfilled:                                                                               
    The total value of the specifications is positive.                                     
    The total value of each account assignment is positive.                                                                               
    Please see other notes attached.                                                       
    354903 Postings: Invoices for services                                                 
    499575    FAQ: Invoice verification/goods receipt in service                           
    1174830 FAQ: Invoice cancellation for services       
    Regards,
    Edit

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

  • MC.9 - Negative value

    Hi Sapians,
    While running MC.9 report we are getting negative value for a particular stock even when there is a positive stock. But in MB5B we are getting the correct output.
    By debugging we found that there is a negative value in S032 table. But we could not understand how we got negative value in S032.
    Could any one through some light on where it could went wrong?
    Thanks,
    Sukumaran.E

    Hi Sukumaran,
    Negative stocks in your case is due to inconsistencies in the Info structure tables.
    The report from MC.9 is calculated on runtime, taking the current stock position from stock database tables and adjusting the goods receipts and issues backwards. The goods movement data are from the info-structure tables. If there are inconsistencies in this data, you get negative stock figures or different figures compared to MB5B report. (MB5B runs the same way but uses MSEG table instead of ifo structure tables). This explanation is for understanding the cause of the problem.
    The remedy is, updating the info structure table. This update is for correcting the data in info-structure tables. You can delete the entries in these tables and re-build them. It has to be done during a period when there are no material movement postings happening - like after office hours or holidays.
    You can refer to SAP note 79083 for detailed step by step procedure for updating info structure tables.
    Hope you are able to correct the inconsistencies!!
    Best Regards,
    Siva

Maybe you are looking for

  • How do I create a track with just controller MIDI data in it?

    How can I create a track with just MIDI controller data in it?  For example: I'd like to create a track that issues a bank change/patch change and sets the default volume for that track, and that's it. I can then use this setup as a template for futu

  • My sent mail does not show in the sent folder

    I can send mail but the mail doesn't show in the Sent mail folder...why is that? I am a Verizon user.

  • HT1212 how do you enable ipad 3 without losing any data?

    i have forgotten my password to my ipad 3. it now says to connect to itunes, but i have never connected it to a computer or itunes account on the computer before. i have some important information for school on there, and i really need it. does anybo

  • Port Replicator 40Y8132 Compatibility

    Greetings, Does anyone know for certain if USB Port Replicator 40Y8132 can work with ThinkPad Edge E420? I know it's a discontinued replicator but I don't see a reason why it wouldn't work, it's just a USB connection. I read something about compatibi

  • Scripts for Purchase Requisition

    Hi Kindly suggest is there any SAP standard Scripts for PR print preview Like PO print preview, our client requires  PR print preview Regards Amuthan M