Approval procedure on item groups

Hi All
I would like your assistance on this query, I need a query that will execute an approval procedure when an item with item group name contains or part of the word software is used on the sales quote . 
I need to know how can i pull the item group from a selected item and display that on a udf and use info on that udf to trigger an approval .
Thanks
Bongani
Edited by: Bongani Dlamini on Jul 13, 2009 1:25 PM

hai Bongani Dlamini
   Row level approval is not possible in SAP B1,as a work around try this query in approval template,this will help u to check
only first item,other wise u have to write stored procedure
SELECT DISTINCT 'True' FROM QUT1 T0 WHERE $[$38.1.1]  =
(select distinct  itemcode from oitm o1,oitb o2  where
o1.itmsgrpcod = o2.itmsgrpcod and o1.itemcode = (select $[$38.1.1] ) and o2.ItmsGrpNam like '%Software%'  )

Similar Messages

  • Approval procedure for item and for business partner

    Hi
    Anyone has done somekind of approval procedure for an item or for a business partner?
    Is there anyway to make this? Or just for documents?
    Regards,
    Vasco

    You can only use SAP approvals for documents. You can construct a less controlled approval method for master items by first creating a BP mandatory "Approved" UDF", and using an auto refresh FMS to set it to blank unless "on hold" is checked when the BP record is created. This will prevent it from being used in documents. Then another UDF for an authorised user to initial the BP record as authorised and uncheck the hold flag. There is nothing to stop this method from being abused but you do have the History log so that you know who did what. I have not tested the exact procedure described but have done similar for documents (to force a save as draft) when the SAP Approval has been too restrictive. Otherwise it's SDK.

  • Approval Procedure for Items

    Hello  experts,
    During my operation some users creates Items in, u201CItem Master Datau201D, but they make mistakes, so I want to approve if they are doing that right.  But there is no option for that in u201CApproval Procedureu201D any idea how can I Approve the creation of an Item, or something like that.
    As Example:     
    Choose an u201CItem Groupu201D
    Leave blank the check box in u201CWithholding Tax Liableu201D, etc

    HI Carlos,
    Approvals are for documents in Business One.
    You can use Alert or Transaction Notification. Alert will only tell you after the entry is done while Transaction Notification can actually block the entry.
    Hope it helps,
    Jesper

  • How to start approval procedure

    how to start approval procedure on item master data????
    Edited by: VINAYAK CHA on Feb 21, 2012 8:56 AM

    when person goin to add item master data ,so before adding, it shoud be approval by senior person.
    I have a scenario where 2 level of approval stages to be configured. For Example : A is originator, B is first level authoriser and C is 2nd Level authoriser. Now, A originates document as it goes for approval to both B & C simultaneously. what I want is that A originates the document as it goes to B for approval. After B approves then only go to C for apporval otherwise not. Is it possible to map in system ?? Please guide...
    Edited by: VINAYAK CHA on Feb 21, 2012 11:45 AM

  • Approval procedure based on item category

    Dear All,
    I have a scenario where all my sales items will be categorized under two broad heads: Bulk & Non Bulk. So there will be a UDF where every item will be mapped to one of these values. I want to apply an approval procedure where I am able to raise an approval to different set of people for Bulk Items and different set of people in case of Non Bulk items. Kindly help me how I can do the same.
    Regards
    Kapil Kapoor

    Hi,
    It's not possible to create approval procedure based on item level. So if in a single document you have different types of (bulk/non-bulk) items you can't trigger different approval procedures.
    In case you select the item type in a UDF in header level of a document, then it will be possible to send approval to different users based on the UDF value selected bulk/non-bulk.
    Regards
    Sibasish S.

  • Approval procedure for the creation of a new item

    I would like to have an approval procedure for the creation of new items. In that when one gets added, it gets placed on hold immediately and an alert gets sent to a manager.
    thx, Richard

    The solution would be the combination of SBO_SP_TransactionNotification stored procedure allowing only for some authorized persons to add an item with not ‘On Hold’ status, and an alert to the authorized persons.

  • Approval Procedure to change the price of items

    Hi!
    i 'm trying to create a query to an Approval Procedure to change the unit price in the Purchase Order  i create this query:
    SELECT DISTINCT 'True' FROM POR1 T0 INNER JOIN OITM T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE T1.[ItemCode] = $[$38.1.0] AND T1.[LastPurPrc] <> $[$38.14.0]
    as you see this query compare is the Last Purchase Price is different than the actual unit price, and these for each line of item.
    I think this is correct, and i configure the Approval Procedure, but when i check the AP in the Purchase Order changing the Unit Price, it gets me an error that says
    1) [Microsoft][SQL Native Client][SQL Server] Error converting data type nvarchar to numeric.
    What happend?
    Am i doing something wrong ?
    In easy term, i just want to execute an approval procedure when the user change the unit price in the purchase order.
    Hope you can help me !
    Thanks in Advance
    Best Regards !

    Xavier,
    maybe you are with a problem thar you dont' know, i can to expain this point,
    1. if you want one approval at level line (comparing prices), not possible to make this way the approval, because you don't have control at level line while the document isn't in database.
    2. i bealeve that the better way is to make a store procedure for to insert each record into temp table while to add line in purchase order without (formatead seaches), now, when you create a purchase orden you need create a query for to search record in the temporal table with the condicion that you needed.
    3. now, if you want to call a value on the screen (money), the better way is $[$38.1.number]
    Good look,
    OSCAR KLENNER
    > Hi!
    > i 'm trying to create a query to an Approval
    > Procedure to change the unit price in the Purchase
    > Order  i create this query:
    > SELECT DISTINCT 'True' FROM POR1 T0 INNER JOIN OITM
    > T1 ON T0.[ItemCode] = T1.[ItemCode] WHERE
    > T1.[ItemCode] = $[$38.1.0] AND T1.[LastPurPrc] <>
    > $[$38.14.0]
    > as you see this query compare is the Last Purchase
    > Price is different than the actual unit price, and
    > these for each line of item.
    >
    > I think this is correct, and i configure the Approval
    > Procedure, but when i check the AP in the Purchase
    > Order changing the Unit Price, it gets me an error
    > that says
    > 1) [Microsoft][SQL Native Client][SQL Server] Error
    > converting data type nvarchar to numeric.
    >
    > What happend?
    > Am i doing something wrong ?
    >
    > In easy term, i just want to execute an approval
    > procedure when the user change the unit price in the
    > purchase order.
    >
    > Hope you can help me !
    > Thanks in Advance
    > Best Regards !

  • Query that will run on the items matrix and trigger Approval procedure

    Hello,
    We are trying to design an approval procedure whenever an item code appears in a certain UDT.
    For example, we have many items in OITM.
    We have 50 of those items also in @BIN.
    The approval procedure should be triggered only when the document lists one of the items that appear in @BIN.
    I am using the following query:
    SELECT 'TRUE'   where $ [$38.1.0]  IN (Select code from [@BIN] )
    The problem is that the query would only search on the first row and wouldnu2019t continue to the next rows.
    Do you have any idea how to bypass this limitation?
    Thanks in advance
    Revital
    SELECT 'TRUE'   where $[$38.1.0]  IN (Select code from [@BIN] )

    Hi Revital,
    One way to implement this functionality would be to use a UI API that verifies the values while filling the items in the Matrix. For this you would need a little programming knowledge but no extra license.
    There is a lot of information including Code Samples in the SDK Package delievered with every patch of Business One.
    Kind Regards,
    Friederike Mundt

  • Approval Procedure should be triggred for discount given in line item

    Hi All,
    I want the approval procedure to be triggred when the discount given in the line item per row exceed 20%. Can any one give me the query for it .
    Thanks,
    Gopal

    Hi,
    There is any other option for it, pls help me
    I will explain the concept again.
    In Sale quotation if the discount % given in the line item greater than 20% then while posting the saleQuotation document the particular document should go for approval, else it should not trigger the approval.
    Its possible ? or any other aleternate solution  
    Thanks,
    Gopal

  • Approval procedure if user change in the unit price at Purchase Order

    Dear Experts,
    I have defined purchase price list in the item master data. I want an approval if there is any devaition in the purchase price list and unit price which is defined in the purchase order. It will always go for the approval.
    Regards,
    Ravindera

    Dear Ravindera,
    Approval is only working on the header level. Unless you just care about the first line, no approval procedure can be built for other lines.
    You can block those PO by SP_TN instead.
    Thanks,
    Gordon

  • Req approval process with Purchasing groups

    Hi Gurus,
    Can anybody please help me with this. I need to setup the req approval process with purchaisng groups. how do i do that? The scenario is this: 1) A computer is requested and it is worth 1200 USD and the requestor puts the pur grp in the PR. since this is level 1 the email should only go to one person. ( The levels are 1000 -4999 - level1, 5000 - 9999 level2, 10000 and above level3). Can anybody please help me with this. Quick response is greatly appreciated
    thanks
    Anusa
    Edited by: anusha vemulapati on Mar 10, 2009 9:44 PM

    Hi,
    The steps are as follows:
    Create Characteristics & link to comm. structre (CEBAN for PR)
    Create Class & link to characteristic
    Create Release Groups & link to class
    Create Release Codes
    Release Indicator
    Set up strategies
    - Strategies & Codes
    - Prerequeirements
    - Status
    - Assign values for strategies
    Set overall / item for doc type (PR only)
    Create and allocate autorisation profiles
    You can see the same in SAP123.com with screen shots.
    REgards
    Ram

  • Query for terms in approval template of approval procedure

    dears
    i need to write  a user query for approval template terms that chek for any price zero in invoice items .
    i tried the true query
    select 'true' from inv1 where $[inv1.price]=0
    however the invoice executed without asking for approval procedurs.
    any help will be appreciated!!
    talal

    Hi,
    Its not possible on row level Price.
    Try to Document total procedure, it will work.
    SELECT Distinct 'True'  FROM OINV T0 WHERE $[OINV.DocTotal]='0.00'
    Thanks,
    Madhan.

  • UDF mandatory based on item group?

    Hello -
    Can someone help me make a user defined field in the BP mandatory only when certain item groups are selected on a sales order? The idea is that we have some products that we sell which require a license to obtain. I would like to force my employees to enter that information (license number and expiration) in the BP if one of those items is selected, knowing just eh groups of items is enough.  Ultimately it would be even much better if the expiration date of said license was check for validity as well...but I'd be happy enough knowing that the license was at least referenced.
    Looking forward to your help!
    Best regards,
    Rob

    I assume the UDF-s are row level UDF-s, because they are connected to the item.
    You need two FMS to set the row level UDF-s according to the item and partner and some code in the SBO_SP_TransactionNotification procedure to prevent adding the document, if it contains an overdue expire date.
    With your real UDF names try to connect the next queries to the U_expiredate and U_licencenumber  fields autorefresh according to the itemcode:
    IF (Select i.ItmsGrpCode from OITM I Inner join OITB g
          on i.ItmsGrpCod = g.ItmsGrpCod Where i.ItemCode=$[$38.1.0]) in ('zyx','xyz')
       Select p.U_bpexpdate from OCRD p where p.CardCode=$[$4.1.0]
    IF (Select i.ItmsGrpCode from OITM I Inner join OITB g
          on i.ItmsGrpCod = g.ItmsGrpCod Where i.ItemCode=$[$38.1.0]) in ('zyx','xyz')
      Select p.U_bplicensenumber from OCRD p where p.CardCode=$[$4.1.0]
    Else Select u2018000000u2019
    and insert this in your  SBO_SP_TransactionNotification stored procedure after the line
    --     ADD     YOUR     CODE     HERE )
    IF @transaction_type IN (N'A', N'U') AND @object_type = '17'
    BEGIN
    If exists
    (Select t.Price From RDR1 t
       Where datediff(d,t U_expiredate,getdate())> 0 and U_licencenumber != u2018000000u2019
            and t.DocEntry=@list_of_cols_val_tab_del)
    Select @error = 1,
       @error_message = N'Licence expired ! '
    END

  • Link Query to Approval procedure

    Hi
    I need to create approval procedure based on query. The gist is: we have some marketing documents with the same BP. When total sum of them amounted to 10000, then approval must launch. I can't create query? moreover I can't create query for one document with over 10000. Could you send me the one with ODPO and DocTotal
    With regards
    Partner / Customer Contact: OOO Turing Consult
    English handling an option?
    Name: Maxim Groonis
    E-mail address: [email protected]
    Phone number

    Hi, Douglas.
    Thanks, you helped a little.
    Could you solve the whole problem.
    Approval procedure must launch if sum in one month (e.g. March, April not a span of 30 days)  in ODPO for one BP more than 10000.
    I insert a code (it doesn't working) only for logic
    SELECT 'TRUE' WHERE
    (SELECT SUM(DocTotal)
    FROM ODPO
    WHERE CardCode = $[ODPO.CardCode]
    and ( month(Docdate)=month($[ODPO.DocDate]) )
    and ( year(Docdate)=year($[ODPO.DocDate]) )
    GROUP BY CardCode)
    >10000
    With regard
    Maxim Groonis

  • Approval Procedure - how to pass value to query

    I want to do an approval procedure for checking GRPO Qty which greater than PO OpenQty by Query.
    How to pass the GRPO DocEntry and LineNum to the query, and how can check the passing value is correct or not?

    I have tested one row only, but also not work.
    Here is the query I used.
    select case when (t1.openqty < $\[PDN1.Quantity.0]) then 'TRUE' ELSE 'FALSE' END as RESULT from pdn1 t0
    right outer join por1 t1 on t1.docentry = t0.baseentry and t1.linenum = t0.baseline
    where t1.docentry in ($\[PDN1.BASEENTRY.0])
    group by t1.docentry, t1.linenum, t1.quantity, t1.openqty
    having (sum(isnull(t0.quantity,0))  < t1.quantity)
    order by t1.docentry, t1.linenum, t1.quantity, t1.openqty
    If the pass value is correct, the result should be like this.
    TRUE
    Is the query wrong? Any suggestion?
    Thanks.

Maybe you are looking for