Notification Query for Item Group

Dear Experts,
Please Guide me for a Notification Query for this Scenario :
I want to put a Notification Query for a  Group i.e. when any user do transactions in any form or any Particular form using items
of this Group than if the Item Quantity is in Decimal then he can not do that Transaction and Get Error Message.
Thanks in Advance.
Atul Chakraborty

Hi Atul,
to achieve this you have to write SPTN at the back end
under databases node select your live database.
Select programability
select stored procedure
select db.sbo.SP_Transactionnotification
and paste your code into
ADD YOUR CODE AREA
If (@object_type = '17') and (@transaction_type in ('A', 'U'))
BEGIN
     Declare @ItmGrpCode as int
     Declare @Qty as int
     set @ItmGrpcode = (select oitm.itmsgrpcod from oitm inner join rdr1 on oitm.itemcode = rdr1.itemcode inner join ordr on   
        rdr1.docentry = ordr.docentry where  ordr.docentry=@list_of_cols_val_tab_del)
        set @Qty = (select quantity from rdr1 inner join ordr on ordr.docentry = rdr1.docentry where ordr.docentry =
        @list_of_cols_val_tab_del)
     BEGIN
                    if @ItmGrpcode = 10 and @qty = 0
                    Begin
                         set @error = -1
                         set @error_message = 'Invalid Input'
                   End
       End
END
Like wise by capturing object type and dml mode you have to write code for every document that you want to check.
For example I've given code for Sales Order.
hope this will help you
Thanking you
Malhaar'

Similar Messages

  • Query for user group

    Dear Team,
    When I am creating  Query for user group via T-code  SQ01.
    Query     ZDEMO1    then Create
    This messege is comming .
    System setting does not allow changes to be made to
    object AQQU /ISDFPS/OM  ZDEMO1
    Why this messege is comming .
    Thanks
    manu

    Dear Manu,
    Please check in SE06 >> change system options >> if the system and the relevant object is in modifiable status.
    Cheers,
    Jazz

  • NOTIFICATION QUERY FOR UDF COLUMN

    Dear experts,
    I want notification query for delivery should not be add without fill up the information in  machine number column (UDF Column- U_MCnumber)
    Please do needful.
    Thanks & Regards,
    Akshata

    Dear all,
    I have got query ...........
    If @object_type = '15'and @transaction_type= ('A')
    BEGIN
    If Exists (Select T0.DocEntry from ODLN T0 Inner Join DLN1 T1
    On T0.DocEntry=T1.DocEntry INNER JOIN OITM T3 ON T3.ItemCode = T1.ItemCode
    Where (T1.U_MCnumber Is Null and T3.ITMsgrpcod='119')
    And T0.DocEntry = @list_of_cols_val_tab_del  )
    BEGIN
    Select @error = -1,
    @error_message = 'Please fill up machine number!!!'
    End
    End
    Thanks & Regards,
    Akshata

  • Notification mail for particular group of users

    Hi,
    How to configure notification mail for particular group users in the portal, some circular posted in the KM.
    Please advise.

    Dear  kumargopalc,
    The best way to do this, is create a folder in km where you upload your files o news to this user and then create a km navigation iview to give to the user the possibility to subscribe to it, the service subscription give to the users notifications on the amendment of the folder.
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/798e04b33b11d5993800508b6b8b11/frameset.htm
    Regards.

  • How to create sql query for item master with operator LIKE with variables?

    hi all,
    How to create sql query for item master with
    operator LIKE(Contains,Start With,End With) with variables using query generator in SAP B1 ?
    Jeyakanthan

    Hi Jeyakanthan,
    here is an example (put the like statement into the where field)
    SELECT T0.CardCode, T0.CardName FROM OITM T0 WHERE T0.CardName Like '%%test%%'
    The %% sign is a wildcard. If you need start with write 'test%%' and otherwise ends with '%%test'. For contains you need '%%test%%'. You also could combinate this statements like 'test%%abc%%'. This means starts with test and contains abc.
    Regards Steffen

  • Query for item master data

    hi all,
    i want to create a query for items in the item master data that shows the changed field, the old value, the new value, user name and the date it was changed .
    can anyone help please.
    ciao

    thanks for the reply
    my clients internal auditors require that they have Exception Reports in SAP , i.e reports that can show changes made, date and by which user etc...
    1. changes made to item master data
    2. changes made to business partner master data
    3. changes made to invoices, purchase orders etc..
    this reports can be set in query form or xl reporter..
    i tried but couldent find the tables ....
    any sugestion will be appriciated..

  • Query for Item wise sales report

    Hi Guys,
    Below is the query i have used to run Sales Register.
    But we need Item wise sales register  and those Excise Duty calculations are needed for item wise instead of total document wise. Pls update the query ...
    SELECT M.DocNum AS 'Inv.No ', M.DocDate as 'Date', M.CardName as 'Customer Name',L.Dscription,L.Quantity,L.Price,
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Avg(TaxRate) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as ' VAT% ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as 'VAT12.5 ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST 2% ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST @2 ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess% ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess ',
    (SELECT Avg(TaxRate) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' HCess % ',
    (SELECT Sum(TaxSum) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' Hcess ', L.LineTotal as 'Row Total (Rs.)',M.DocTotal as 'Doc Total'
    FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND TargetType ! = 14
    GROUP BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal
    ORDER BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal

    Hi experts..
    Pls   Update the Query

  • Re:Query for Item and its first child Itemcode from BOM...!!!

    Dear SAP Members,
    I need a query that contains
    ItemCode,ItemDescription from oitm table and its first child item code,Item Description,Quantity,currency and price from itt1 table.I have taken all the datas but there is no ItemDescription from itt1 table.How to join all these datas.
    Please Give suggestions or query for this issue.
    With Regards,
    Revathy

    Hi try this
    Declare @BOMDetails table(TreeType Nvarchar(MAX),PItem NVARCHAR(Max),PName NVARCHAR(MAX),CItem  NVARCHAR(Max),CName NVARCHAR(MAX),Comment NVARCHAR(MAX),onHand Numeric(18,0),[Committed] Numeric(18,0),FreeStock Numeric(18,0),[Status] NVARCHAR(MAX),Quantity numeric(18,0),Price numeric(18,0),Warehouse nvarchar(MAX),Currency nvarchar(MAX))
    INSERT Into @BOMDetails
    SELECT T1.TreeType ,T0.Father AS [Parent Code], T2.ItemName AS [Parent Description], T0.Code AS [Child Code],
    T1.ItemName AS [Child Description], T0.Comment, cast((T1.OnHand ) as Numeric(18,0)) as [Un-Committed Stock],
    cast(T1.IsCommited as Numeric(18,0)) AS [Committed Stock], cast((T1.OnHand - T1.IsCommited)as Numeric(18,0)) AS [Free Stock], T2.FrgnName AS [Status],T0.Quantity,T0.Price ,T0.Warehouse,T0.Currency
    FROM ITT1 T0 INNER JOIN OITM T1 ON T0.Code = T1.ItemCode
                 INNER JOIN OITM T2 ON T0.Father = T2.ItemCode
    WHERE T0.ChildNum=1
    Union All
    SELECT ' ',T0.Father as [Parent Code], T2.ItemName AS [Parent Description], '', '', '', 0,0,0 , '',0,0,'','' FROM ITT1 T0 INNER JOIN OITM T1
    ON T0.Code = T1.ItemCode INNER JOIN OITM T2 ON T0.Father = T2.ItemCode
    Group By T0.Father,T2.ItemName
    ORDER BY T0.Father, T0.Code
    update @BOMDetails set PItem='' ,PName='' where TreeType='N' or TreeType='P'
    Select PItem as[Parent Code] ,PName as [Parent Description],CItem as [Child Code],CName as [Child Description],Comment,Quantity,Price,Warehouse,Currency   from @BOMDetails
    thanks,
    Neetu

  • Query for Item wise Sales.......

    *Hi Guys, Below is the query i have used to run Sales Register. But we need Item wise sales register and those Excise Duty calculations are needed for item wise instead of total document wise.
    Pls update the query ...*
    SELECT M.DocNum AS 'Inv.No ', M.DocDate as 'Date', M.CardName as 'Customer Name',L.Dscription,L.Quantity,L.Price, (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)', (SELECT Avg(TaxRate) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT ', (SELECT Avg(TaxRate) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as ' VAT% ', (SELECT Sum(TaxSum) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as 'VAT12.5 ', (SELECT Avg(TaxRate) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST 2% ', (SELECT Sum(TaxSum) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST @2 ', (SELECT Avg(TaxRate) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST ', (SELECT Avg(TaxRate) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED ', (SELECT Avg(TaxRate) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess% ', (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess ', (SELECT Avg(TaxRate) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' HCess % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' Hcess ', L.LineTotal as 'Row Total (Rs.)',M.DocTotal as 'Doc Total' FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND TargetType ! = 14 GROUP BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal ORDER BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal

    Closing this ...
    Edited by: Parimis on Jun 25, 2010 5:44 PM

  • Sales Analysis query per item group summarized per BP Group

    Dear experts,
    My client is requiring me to create a query that when i select a certain item group it returns a sum/total of sold items in that group per BP group
    format:
    parameter: Item Group A
    BP Group A    1,000
    BP Group B    2,000
    BP Group C   1,000
    I have managed to get total sales per BP Group but i cant seem to figure how to break it down per Item Group
    here is my query:
    SELECT T2.[GroupCode], SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) as "Amount(LC)" FROM JDT1 T0  INNER JOIN OJDT T1 ON T0.TransId = T1.TransId and T0.TransType IN (13,14)
    INNER JOIN OCRD T2 ON T2.CardCode = T0.ShortName
    WHERE T1.[RefDate]  BETWEEN [%0] and [%1]
    GROUP BY T2.[GroupCode]
    how can I link Item Groups to JDT1?

    Hi Carlo
    Try This
    SELECT t5.ItmsGrpNam AS ItemGroup,
       t7.GroupName AS BPGroup,
       SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) AS "Amount(LC)"
    FROM JDT1 T0
    INNER  JOIN OINV T1 ON T0.transid = T1.transid
    LEFT OUTER JOIN INV1 T3 ON T1.docentry = T3.docentry
    LEFT OUTER JOIN oitm T4 ON t4.itemcode = T3.itemcode
    LEFT OUTER JOIN oitb T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod
    INNER  JOIN ocrd T6 ON T0.ShortName = T6.CardCode
    INNER JOIN OCRG T7 ON t7.GroupCode=t6.GroupCode
    WHERE T1.DocDate BETWEEN [%0] AND [%1]
    GROUP BY t5.ItmsGrpNam,
       t7.GroupName
    Rgds

  • Price uplift for item groups

    I want to uplift my selling price by some percentage based on the purchase price list for a group of items. When I try to do this under price list, I get the following error
    Unable to update basic price list or rounding method for selection criteria item [Message 3506-11]
    Can this be achieved using special pricing? If yes, then How?
    Any suggestions are appreciated
    Regards,
    Mohan

    Hi Gordon,
    Thanks!
    Are you referring to Special prices for Business partner --Add items using the items groups or properties and copy discount to all customers?
    If yes, I also setup discount based on the customer property and item property and this will not work if the Special prices for Business partner applies?
    Any suggestions?
    Regards,
    Mohan

  • Expense Account for Item Group

    Dear All,
    I have a question for the G/L account of Item Group.
    If we purchase something from our vendor, the first account 'Expense Account' should be increase. Is that correct?
    But our customer would like to have a Asset Account increase because that item group is for Fixed Asset (something like the computer they purchase for their employee, etc).
    What account should I choose for this Item Group to let the Asset Account increase when I purchase something?
    Thanks a lot.
    Regards,
    yuka

    Hi
    I read all the post
    I may be wrong but
    I think just change the Inventory account for that item group if the G/L Accounts are set by item group
    If it is by warehouse change Inventory account there ,or if by item level change there
    I donu2019t know where expense account comes
    I will explain in full
    For GRPO the JE is
    Inventory account Dr.    100
    To Allocation Account Cr.             100
    For A/P IN it is
    Allocation Account Dr.    100
    To Vendor Account                        100
    So it simple if you change inventory account (instead of raw material ) to any  Asset Account
    The asset account will be updated with every purchase of that item
    Please let me know if I am right or wrong so that I  can also upgrade  my knowledge
    Thanks
    Avtar Singh

  • SNMP query for multicast group count

    I want to get the total number of multicast groups on a switch. Is there an oid that will give me the info (ie. the number that's given by "show ip igmp snooping groups count")? If there is no oid, is there a way query the  groups (show ip igmp snooping groups)? I'm thinking with the 2nd option I might be able to count the number of entries returned by an snmpwalk or something and turn that into a number.
    Right now i'm logging into the switch with a script and running the command but that might be a problem with all those logins (only every 5 minutes though) so I'd like to do this via SNMP if possible.
    Any ideas?
    Thanks

    Works just fine!!!
    Thanks!
    LA$$E
    Hi,
    Well, at the very least, you can create a formula
    column in your break group using a combination of the
    same where clause as your original query and the
    break values for the group so that you are getting
    the correct records. If you have it in the break
    group, then it will execute for each record in that
    group.
    Hope that helps,
    Toby

  • CFL For Item groups

    hi,
    I need to set a item groups in cfl for  user defined form
    thanks & Regards
    B.Lakshmi Narayanan

    HI ,
    First u create UDT for Itemgroup and put value in UDT.
    And UDT table assign in Form when open Item group.
    Regards
    kalpen

  • Query for items on hold and items that are inactive for past 18 months.

    Hi Experts,
    We are on the process of initializing a new database due to database size, our client requested that we extract items from the current live database but only those items that are not On Hold and has been active for past 18 months. Those items that does not have transaction for the past 18months and currently on hold will be dropped. What will be the query to extract based on this filter? Please help. Thank you.
    Regards

    Hi,
    You may try this first:
    Select  t0.itemcode, t0.itemname, t0.onhand
    from dbo.oitm t0
    where t0.itemcode not in
    (select distinct itemcode from dbo.oinm  where DateDiff(DD,DocDate,GetDate()) < 548 group by itemcode)
    and t0.InvntItem = 'Y' and t0.Frozenfor = 'Y'
    Thanks,
    Gordon

Maybe you are looking for

  • Sending Details -- URGENT HELP REQUIRED! ! !

    Hi, I have a programming problem which I need urgent help with.... 1.) I firstly have a HTML file which a user will fill out 3 fields on and submit. 2.) A servlet will get these parameters, validate some information and update a database. Problem Par

  • F.05 doubt in Open Item and balance managed

    Hi, I noticed that we have the option to valuate open items and G/L balances for the same account number's in F.05 If suppose, an open item managed account was entered and checked in both places (Open item and G/L balances), will the system do both?

  • Stuck with a blank ipod

    I am stuck with a blank ipod and I am fresh out of ideas. I have and older ipod, a 15 gb with a touch wheel, and I use itunes on a windows xp computer. I have roughly 9 gb of music on itunes and my ipod. I woke up a couple of weeks ago and found my i

  • Special characters broken in Pages

    Hi all, I upgraded from Snow Leopard to Mavericks last week (very happy with the decision) and from Pages '09 to Pages 5. I soon moved from Pages 5 back to Pages 09 as it broke all my ToCs and had various other nuisances. However, I've come to write

  • HP Folio 13-2000 B0N00AA

    Hello, is there anybody who have this ultrabook? I need Clone of Recovery Partition. Could someone create (Todo EasyUS backup or Macrium Reflect) and save it on rapidshare? HP does not yet have these recovery CDs... Many Thanks.