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

Similar Messages

  • Commision based on item group & customer group

    Dear all,
    Does anyone have an idea about how to get commission based on item group & customer group sales?
    My customer wanted commission report based on item group or customer group & based on payment collection dated.
    Example
    Term given for customer A is 30 days.
    12/3/09 Inv 1000   RM 10,000   30 days payment
    20/4/09 Inv 2000  RM    5,000   60 days payment
    The term given is 30 days of the invoice month.
    Salesman will get commission if get the collection at May'09 for Inv 1000, & July'09 for iinv 2000 based on the invoice date month.
    The salesman get commission at any date of the month May'09. More longer collection, less commission they will get.
    Example:
    Salesman A
    Customer Group             1st of the month, 2nd of the month, 3rd of the month, 4th of the month
    Normal Dealer                         1.5%         ,  0.75%,              0.00%                   ,    -0.25%
    Sub Distributor                       0.5%         ,  0.25%,               0.00%                  ,    - 0.25%
    Any idea?
    Thanks in advance?
    Regards,
    Eric Tan

    Hi Eric
    SAP does not calculate commissions, but merely provide a mechanism to report on it. The multi level calculation you require can be achived with a custom query linked to a report layout. Standard SAP will not provide this type of calculation. You will need to look at the open transactions such as invoices and link to the relevant payment transaction to get the payment date. Then compare this date to the invoice due date to determine if the terms were adhered to or not. If not payment date - due date in number of days will be needed to calculate the effective commission percentage.
    Kind regards
    Peter Juby

  • Price list based on item group

    It would be great to have possibility to set up price lists with different factors based on item groups. Now it can be achieved by setting Period and Volume Discounts. But it doesn't allow to display correct price in Item Master Data or setup rounding.

    Hi,
    If I understand you correctly, here is the answer:
    1. An option of create new price list based on Item Cost. YES
    2. Have the ITEM COST as price list. (for AVG and STANDARD items valuation). Not sure what you exact mean. Probably not.
    3. For items with valuation FIFO, can consider other price list only for this items, that include the information over FIFO layer.  Probably not.
    Thanks,
    Gordon

  • Make field in Material master mandatory based on the material group

    Hello all,
    I need to make the field "post to inspection flag" mandatory based on the material group while creating the Material master.
    I found options for making the field mandatory based on Material type,Industry sector and plant NOT based on the material group.
    Could anyone please provide suggestions on setting up the field as mandatory based on material group while creating material master
    Thanks,
    Sre

    Hi Sre,
    You can make Material Group field as Mandatory while Creating Material Master.
    SPRO>Log General>Material Master>Field Selection>Maintain Field Selection for Data Screens
    Select Screen # 48
    In the Field selection (Field Ref.) of (MARA - MAKTL) screen , Change the settings from Optional to Required Entry for T Codes MM01, MM02 or you can select the Material Type ;
    Please note this  by choosing this selection the fields of Profit Center and  Division will also become Mandatory.
    Hope this helps,
    Best regards
    Amit Bakshi

  • Making UDF Mandatory

    Hello Experts,
    I want to make this UDF mandatory in my item master data. I was referring to: Making UDF's Mandatory .. I tried the code given there and it works!
    However, I also want to make another UDF mandatory in the Business Partner Master Data. I used the same code but it didn't work:
    IF @transaction_type = 'A' AND @object_type = '4'
    BEGIN
    If exists (SELECT T0.CardCode FROM OCRD T0 where T0.U_Telno is null and T0.CardCode=@list_of_cols_val_tab_del)
    begin
    SET @error = 10
    SET @error_message = N'Please Fill In Telephone Number'
    end
    END
    Where did I go wrong? Thanks in advance!

    After reading through some forums on SP, I went on to change the Object Type to 2 and redo the UDF and it works fine now.

  • FMS to Display Item group UDF value

    Hi,
    I have created Title level udf named U_WP in the item group table. Each group wise i have entered diferent values in this field.
    I have created one more title level UDF in item master by same name U_WP.
    I want FMS to select the UDF value from U_WP in OITB to be displayed in U_WP in OITM when when ever user select the
    respective item group in item master while adding new code.
    swap

    Hi Swap,
    I've tested the query below and it should give you what you need:
    SELECT T0.\[U_WP\] FROM OITB T0 WHERE T0.\[ItmsGrpCod\] = $\[$-39.0\]
    A couple of things, make sure both the Item Group UDF and Item UDF are setup as the same structure (type and length).
    Set the formatted search on the Item UDF so that it refreshes when the Item Group changes.
    That should give you what you need.
    Regards,
    Adrian

  • Filter list items based on security groups o365

    How to filter list items based on security groups in o365.

    Hi,
    According to your description, my understanding is that you want to filter list items based on the Office 365 security groups.
    If that is the case, I suggest you can create a data view to filter the list items with CAML Query like below:
    <Where>
    <Membership Type="CurrentUserGroups">
    <FieldRef Name="VisibleToGroup"/>
    </Membership>
    </Where>
    For more information, please refer the detailed article below:
    SharePoint - Filtering a View by Group Membership
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Automatic formatted search for row udf item group autofill

    Dear All,
    I have a field udf field in the row of marketing document named u_itemgroupcode. I want that when an item is selected in any marketing document in the above udf automatically the Item Group code should come from the corresponding item OITB table.
    How to achive this through auto refresh formatted search.
    please help....!
    regards
    kamlesh

    Hi Kamlesh,
    ItemGroup code is available in OITM table itself. You could define the formatted search on the udf field
    with this query and define auto refresh with Item No.
    SELECT T0.[ItmsGrpCod] FROM OITM T0 WHERE T0.[ItemCode] =$ $38.1
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

  • In Item groups need to be create subgroups

    Hi every one,
    In Itemgroups need to create a sud groups for example  Computers is main group under computers we have to create different sub groups like main Item Group is Computers under this group dell computers is a sub group and under dell there two more sub groups desktop and notebooks....
    if any one have Idea about how to create this that would be really helpful for me
    thank you in advance...
    Regards
    Shankar

    Hi Shankar,
    Item Group Based Sub Group Concept is not available in SAP B1,Use Item Properties or UDF .
    Check the following thread
    Re: customer/vendor specific item list
    Blocking Item for a Particular Customer
    *Close the thread if issue solved.
    Regards
    Jambulingam.P

  • Account Segmentation & GL By Item Group

    Hi,
         My Client has so many branches with them, so it is mandatory to configure and go with Segmentmentation. In all the branches they are doing same business and selling same items so item group is common for all.
         Their GL is Setted by Item Group Wise.
          But the item group is common for all.
          But my client want to see expense, revenue, assets based on group wise for each segment.
          But in our standard B1, account mapping in item group can be done with any one segment only. But they have to see CoA balance like that.
          Is there anyway to achieve this task????

    Hi,
    I can see them wanting this setup; I've seen it before. (I am assuming you are working on setting up the CoA and not modifying an existing CoA.)
    You will need a segment for item group and another for the branches. Keep in mind, the P&L and B/S reports can be run on segments, but not the Cash Flow and T/B (in 2007, not sure about 8.8).
    HTH,
    Heather

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

  • Shipping point determination based on item category

    Dear
    we have a requirment which needs to determine shipping point based on item category. anyone could share how to achieve that? I am familiar with sap standard shipping determination rule: shipping condition in sold-to-party MMD or shipping condition within sale document type + loading group + delivery plant. However those condtions wouldnt fullfill our needs. the items within a sales order are exactly same except item category, such as item 10 is TAN , item 20 is TAB item.I want the system get different shipping point for those two different item category.
    any though would be appreciated and thank you,
    best regards
    peng. tang

    As already suggested, you can consider going with differentiating the Loading Group in material master, so that via standard configuration itself, you can achieve the desired result.  On the other hand, if this is not possible, then, you can try with USEREXIT_MOVE_FIELD_TO_LIPS in include MV50AFZ1
    G. Lakshmipathi

  • PO Qty restruction based on purchase group

    Hi experts
    Can you provide me solution on this requirement that restruction on purchase order qty based on purchase group,
    in detail my user want that if i entered purchase group XYZ ,then for that purchase order po qty system should not allow more than 1 qty for 1234 company code .
    is there any solution for this requirement
    Kumar

    Hi,
    Can you please elaborate? The purchase group is on the Header of the PO. When you say that the quantity needs to be restricted to only 1, does that mean that only one item is allowed on the PO with Qty 1 or multipel items are allowed but each of the items can have quantity as 1?
    Also, the exit ME_PROCESS_PO_CUST is active only in the online mode for ME21N and ME22N. If you have any background jobs generating a PO (Planning ME59N etc.) the exit does not work.
    Regards,
    Naveen

  • F.05 - Posting Logic - How are the open items grouped?

    Hi,
    I am trying to understand how the posting logic works. We are on ECC 6, Classic Ledger and use F.05 for the revaluation. I am trying to revalue a Open Item managed balance sheet account, that has open items since 2009. It has  a total of 480 open items, but after reval system posts only 19 entries. I am trying to understand how SAP groups these open items, what criteria is used to group open items to different documents. The totals are matching, but I am failing to understand the how SAP combined these different open items into a smaller set that were actually posted. Can anyone please enlighten me with this logic?
    Regards,
    Venkat

    Hi,
    In terms of open item valuation, open items are grouped by the Vendor/customer and the transaction currency of the open item. But if corporate group of the vendor/customer are same and group vendor/customer is checked in settings of valuation method, the grouping will be based on corporate group and transaction currency of the open item.
    For example: You have 6 open items (say invoices)
    Local currency is USD
    1. Vendor ABC (GL account 160000) - 100EUR => diff 3$
    2. Vendor ABC (GL account 160000) - 150INR => diff 2$
    3. Vendor ABC (GL account 160000) - 200AUD => diff -2$
    4. Vendor ABC (GL account 160000) - 300EUR => diff 1$
    5. Vendor XYZ (GL account 160000) - 350EUR => diff 1.5$ (corporate group - A123)
    6. Vendor TTT (GL account 161000) - 200EUR => diff 0.5$ (corporate group - A123)
    If you carry out foreign currency valuation now, Assuming that each of these 6 open items gives valuation difference.
    1 & 4 will be grouped together and 5 & 6 will be grouped together.
    Once the open items are grouped, the following logic applies into each group.
    If post per line check is checked in the settings of valuation method, then each differences will be separate line item.
    If post per line check is not checked, then all the gains will be grouped as one line item and losses will be grouped as one line item.
    Thanks,
    Sukhbold
    Edited by: Sukhbold Altanbat on Oct 25, 2011 8:08 AM

  • Derivation of fund center based on purchasing group

    Hi,
    It is required to determine the fund center based on purchasing group (during PR creation). I  have gone through one thread which suggests inclusion of the field EKGRP into FMDERIVE, then to COBL.
       However I was trying to check whether it can be done through table lookup using field USERTEMP1 and assigning the same to EKGRP. But in the table lookup screen, the upper part contains the fields BANFN (Purchase Requisition Number) and BNFPO (Item Number of Purchase Requisition) which need to be assigned to source fields. I am not sure what source fields should be assigned and how it will  work.
    Request your input in this regard.
    Thanks in advance!
    Snigdho.

    Hi,
    I am trying to derive fund center based on purchasing group using field USERTEMP1. In the upper part of table lookup screen (I am using table EBAN) what should I assign to the fields BANFN and BNFPO?
    Thanks
    Snigdho

Maybe you are looking for