Double entry of component in BOM

Good Day..,,
I'd like to make a query (StoredProcedure) that will restrict the double entry of same component in BOM. I created a script but it doesn't work. Below is the script i made.
If @object_Type ='66' and @Transaction_Type in ('A','U')
Begin
Declare @Component NVARCHAR (20)
Set @Component= (Select isnull(T0.Code,'')From Itt1 T0 where t0.Father = @list_of_cols_val_tab_del)
If @Component= '' and Exists (Select T0.Code From Itt1 T0 where T0.Father = @Component and T0.Father!= @list_of_cols_val_tab_del)
Begin
Set @error=1
Set @error_message = N'Component Already exist!!'
End
End
Your help will be very much appreciated. Thanks.
Regards,
Ardie

Hi Ardie,
Of course, use this
IF @object_type='202'AND @transaction_type IN('A','U')
  BEGIN
     IF EXISTS
     (SELECT ItemCode,COUNT(ItemCode)FROM WOR1 WHERE DocEntry=@list_of_cols_val_tab_del
      GROUP BY ItemCode HAVING COUNT(ItemCode)>1)
       BEGIN
          SET @error=-123
          SET @error_message='Duplicate raw material exist'
       END
  END
Best Regards,
Hendry Wijaya

Similar Messages

  • Settings for a component of BOM

    Dear guru ,
    For a component of bom with material type quantity and value updating I want to make these settings :
    -     relevant for costing
    -     not relevant for mrp dependent requirements
    -     only for information purpose for production order
    -     not a non-stock item
    How can I make these setting for a component of bom ?
    Thanks in advance.

    Dear
    Please find the answer of your question :
    - relevant for costing : In BOM  Select the component line item and double click .Goto Status Tab , you  have un-check the Check Box -Relevent for Costing
    - not relevant for mrp dependent requirements  :- Goto MM02 with item code  and select MRP4 view -Keep the seting 1 -Dependent Reuirement not relevent for planning in MRP
    At the same time u can keep the MRP Type : ND  in MRP1 View in case if u do not want to plan through MRP .
    - only for information purpose for production order : The will be copied with this item automatically or manually based on the configuration u have kept in OPL8-Order Type dependent parameters for your Production Order Type (pp01) .Here in BOM Selection -Automatic -1/Manual -2  should be kept in order type dependent parameters.
    - not a non-stock item  : Keep the item categoery in BOM as N  while creation of BOM in CS01.
    Hope this will fullfill your requirement .
    Regards
    JH

  • Restrict Double entry of condition type

    Hi All,
    How to control double entry of condition type at Item & header level in sales order????....any solution
    Thanks & best regards
    Umed

    Condition type settings V/06, Changes which can be made section maintain B- Automatic entry has priority , if condition record exist then system will not accept to enter manually.(If yours is autoamatic condition type.)
    If your condition type is manual and if you maintain 'C' - Manual entries has been priority or Blank - No lomitations, then i think we can not stop this.
    Regards,
    Ramesh

  • How do I get rid of double entries in my Contacts?

    I sync a 3rd party software, DejaOffice, from my iPad to my PC via Outlook. (DejaOffice is an integrated program with Calendar, Contacts, To-do List, and other features.) DejaOffice allows for syncing to Apple Calendar & Contacts. (Synicing to Contacts is especially important on my iPhone so it recognizes incoming calls in call display.) When I sync to Apple Calendar & Contacts, I often get double entries in both the Apple software, and DejaOffice. So, I have turned off syncing to Apple Contacts and Calendar from DejaOffice. I have just spent an hour deleting the double/triple entries in Contacts in my iCloud from my PC, and want to push the corrected list to my iPad & iPhone 5. I can't see how to delete the contacts in iPad or iPhone (which still have double & triple entries). If I turn on iCloud Contacts and Calendar in either device, it tells me it will merge the data, and I don't want the double entries any more, so I'd like to delete all contacts on iPad & iPhone, and then push the corrected iCloud list to both devices so they are all on the same page. I can't seem to figure out how to delete my Contacts or Calendar entries on iPad or iPhone so the merge only contains the corrected list from the iCloud. Can anyone help me with this?

    First, export your contact from iCloud.com and save them on your computer in a safe spot some where (like you desktop).  Use this to help you do this: http://support.apple.com/kb/PH3606
    Next, on both of your devices, go to Settings > iCloud and turn on contacts and select Merge. Then turn off contacts and select 'Delete form my [device]' when prompted.
    Now go back to iCloud.com and select a contact (yes they will all be messed up again) and select Command+A on a Mac or Control+A on a PC to select all of the contacts.  Tap the delete key on your keyboard (or right click /control click a contact and select delete).
    You iPhone, iPad and iCloud.com should not be empty for contacts.
    Go back to Settings > iCloud on both devices and turn on contacts again (you should not see merge this time).
    Next, go back to iCloud.com and import your contacts (those exported .vcards).  You can either drag and drop them into the empty contacts list in your web browser, or you can use the gear icon to import.
    You cleaned up contacts should import correctly into iCloud.com and sync to both of your devices.
    Good luck.

  • Automatic change of component in bom

    After certain perion of time if i need to change a component in bom automatically ..is this possible..?
    if yes pls help  guru.....

    In mateial mastr in MRP4 there is a section i.e
    Discontinued Part (Under this)
    Discont in
    eff out
    follow-up mtl
    similarly there is in bom cso2 in
    select the component component & click the button item icon or F7
    u get the button disconti data
    here i need to linkage material master & bom .
    here i reqd help how to linkage & create a folow up grp & discont grp.

  • Mail OS Snow Leopard: Double entry of email-address in column "sender"

    I just downloaded my mails from my google imap-account.
    In the column "sender" certain mails appear with a double entry in the following way:
    <[email protected]> <[email protected]>
    This behavior occurs for certain mails, independent if the senders are in the address book.
    Surprisingly, if you open the mail you find only one entry in the header. For those senders listed in the address book the name is listed correctly.
    Please let me know if you have an idea how to make the program only show the sender once.
    I hope that one of you can help me with this problem, thanks.

    Hi,
    hope it works that way:
    *Return-Path: <[email protected]>*
    *From: <[email protected]>*
    *To: <[email protected]>*
    *Subject: =?iso-8859-1?Q?Schl=FCsselbestellung?=*
    *Date: Thu, 27 Nov 2008 14:58:08 +0100*
    *Message-ID: <002a01c95098$3c894550$[email protected]>*
    *MIME-Version: 1.0*
    *Content-Type: multipart/mixed;*
    * boundary="----=NextPart_000_002701C950A0.8F6E26C0"*
    *X-Mailer: Microsoft Outlook Express 6.00.2800.1506*
    *X-GMX-Antispam: -2 (not scanned, spam filter disabled)*
    *Thread-Index: AclQmDyt8JNE3pZJSoWCwDb05OmyHQ==*
    *X-Flags: 0000*
    *X-GMX-UID: spUdfYwhX1VoBiAQNGByJY13SDc4NMx8*
    *X-GMX-Antivirus: 0 (no virus found)*
    *X-OlkEid: 2D643A205454AB0E3C1E844BA67D6A4989DF42D5*
    *X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506*
    *X-MS-TNEF-Correlator: <002a01c95098$3c894550$[email protected]>*
    *This is a multi-part message in MIME format.*
    ------=NextPart_000_002701C950A0.8F6E26C0
    *Content-Type: text/plain;*
    * charset="iso-8859-1"*
    *Content-Transfer-Encoding: 8bit*
    *Sehr geehrter Herr xxx,*
    (Text Start)
    (Text End)
    Thanks, Mathias

  • Component in BOM with Split Valuation

    Hi all,
    Can anyone tell me how to assign component in BOM for which split valuation is activated.
    Example:
    Material ABC has two source 1) Domestic and 2) Import
    Now for production material ABC is used in following ratio:
    Domestic 10 kg
    Imported   5 kg
    Now as stock of material having valuation split will be handled individually i.e. domestic stock and imported stock, how it is to be differentiated in BOM?
    Thanks and regards

    Hi,
    What kind of differentiation you are looking for?
    If the stocks (of Domestic and Imported Product) are maintained at different storage locations, you can give two line items (with same material code) in the BOM.
    Now in the item details for components, you can specify the respective storage locations. Then while GI the system would pick accordingly.
    Hope that helps.
    regards,
    Rohit.

  • MI07,Physical Inventry posting can hit dual G/L or Double Entry posting

    HI Experts,
    At the time of Physical Inventry posting, we are using Tcode-MI07. After that normally two documents are generated. One is accounting document and another is material posting document. Then we hit two G/L in Accounting document, one is Inventry and  another is Offsetting Entry. After that can we do posting in Increment/Expense G/L , separately or at the time of MI07 posting we need to customized that thing. Mean we have to enter double entry system in SAP. If it is possible in SAP standard then can anyone share the configaration of that?
    Edited by: Babai82 on Aug 9, 2011 4:20 PM
    Edited by: Babai82 on Aug 9, 2011 4:23 PM

    Dear Praveen,
    Could u pl let me know why a Machine should itself Stop a Manual Entry when there is a no Logical Instruction given to it?
    SAP does provide contols for Entry like
    - Document Principle which allows u to generate  Acc Doc only if DR=CR
    -Posting Keys which take you to  G/L ranges or Account Types
    -Validations where Logical Validations can be  provided to check the Entry.
    On the lighter side if there will be no error what will our Auditors DO?
    HNY 2007,
    Sudhanshu
    Pl assign my  points
    Message was edited by:
            Sudhanshu Shekhar Tiwary

  • F110 and ff_5 double entry

    hi,
    1) may i know what is the double entry posting when executing f110?
    dr creditor cr bank clearing?
    2) when do bank recon ff_5 the double entry is
    dr bank clearing cr main bank?
    please help to clarify.
    thanks

    1. when we pay the vendor thru f110 the entries are:
    Dr Vendor
    Cr Check clearing a/c
    but vendor can encash the check at any time untill then the above entry will b open. when the vendor encashes the check then the entries r:
    Dr Check clearing a/c
    Cr Bank
    Now the check clearing a/c will clear automatically
    Please remember that clearing a/c shld always b maintained as an open item manage.

  • [Request] SQL Ledger - double entry accounting system

    Hi, has anyone tried a package for this?
    SQL-Ledger is a double entry accounting system. Accounting data is stored in a SQL database server, for the display any text or GUI browser can be used. The entire system is linked through a chart of accounts. Each item in inventory is linked to income, expense, inventory and tax accounts. When items are sold and purchased the accounts are automatically updated.
    With the assembly feature you can build manufactured goods from parts, services, labor units and assemblies. When the assembly is sold all the accounts linked to the individual parts, services, labor units and assemblies are updated and stock levels adjusted accordingly.
    Invoices, Packing List, Income Statement, Balance Sheet, Sales, Work and Purchase Order, Statements, Receipts and Checks are generated from templates and can be changed to suit your needs. Templates are provided in html, tex and text format. The tex templates are processed with latex to produce postscript and PDF documents. Documents can be sent to a printer, file or fax, displayed with a PDF viewer or sent by email...
    More info at: www.sql-ledger.org
    Thanks.

    You're making me feel very reckless here. You don't package because you don't know C? I don't even know bash (not very well anyway), let alone C, perl, python, or anything else. I do know how to cog from other PKGBUILDs though, which accounts for all 14 of my AUR submissions, and a few strays that didn't meet the guidelines (they're around here somewhere...).
    If you reckon ledger is OK, I'll AUR it - not being an accountant myself, I wouldn't know.
    Re the programming comp, I appreciate the invite, but bearing in mind my lack of ability (see above), I plan to "nod along" for most of it - if I pick something up, that's a bonus.

  • Entry in ical like -1 effects double entries on other devices after sync through icloud

    Entry in ical like -1 effects double entries on other devices after sync through icloud

    First check that all your settings are correct, that calendar syncing is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
    Make sure the calendars you are using are in your 'iCloud' account and not an 'On My Mac', 'On My Phone' or other non iCloud account (you can do this by clicking/tapping the calendar button in the top left corner of the application ), non iCloud calendars will not sync.
    If you are sure that everything is set up correctly and your calendars are in the iCloud account, you might try unchecking calendar syncing in the iCloud settings, restarting your device and then re-enabling calendar syncing settings.

  • Double entry for details from draft to invoice

    Hi..
    im doing a draft to invoice uploading via SDK, my problem , when im doing the uploading of components and changing the profit cost center and warehouse code, the original warehouse and cost center also  affair on the invoice, which in return, the invoice created had a double entry the stock movement also recorded this transaction.
    thanks
    loren

    Hi Gordon
    Thank you for your response, that exactly what i did, change the warehouse and profit cost center from the draft before the uploading into the invoice, I do also the checking if the  data (odrf, drf1 table)  for double entry and output from the drafts standard form (display) change the warehouse and profit cost center. Result show the ideal result no duplicate data , warehouse and profit cost center where correct, but still when uploading the data from the draft into the invoice via sdk , the default warehouse and profit cost center where also created and included on the new invoice. So i would like to know what will be the correct procedure or way to transfer this data corrently using SDk
    thanks
    loren

  • Double entry

    Dear friends
    What is difference between
    single entry and double entry
    double entry which is used
    for condition type of pricing procedure dtermination
    with regards
    Sankalp singhai

    Hi Sankalp Singhai,
    May I check with you where is these setting? Please let us know the transaction code so that we could advise accordingly.
    Thank you.
    Best rgds,
    HC.

  • Address book has a secret life? Double entries.

    I notice that quite a few of my records now have double entries — not for ALL of the info, but like just for mobile phone numbers or work numbers. And not all records have these. Strange. Anyone else seeing this?

    This can happen if you sync 2 address books for the following reason:
    In establishing Address Books on 2 computers or editing any item the 2 AB's will have part of the entry different if a different typing of the info occurs, eg one phone no has international format, the other doesn't or one has spaces between numerals, the other doesn't. This is because the computer reads them as being different information. Hence in the syncing process it will add the 'different' information. I'm not aware of a technique other than great care in entry of info of avoiding this.
    Neville

  • Problems in CS4: Double entries while indexing

    How to prevent double entries from occuring while indexing in CS4, please comment
    Audacity
         Audacityabout  8
         Audacityalign tool  116, 118
         Audacityamplify effect  160-162
    How to prevent the double entries of Audacity
    Thanks

    If the cursor is the only problem, my guess is that you haven't updated your video card drivers.

Maybe you are looking for

  • ITunes Store connection

    Suddenly I can no longer connect to the iTunes Store. I have accessed the Windows firewall and checked off iTunes. I have downloaded the latest software numerous times and restarted my computer.I still can not connect. Any ideas?

  • 17" CRT monitor snaps and flickers

    For the past week or so, when I've been using my G4 mac, the 17" CRT would periodically make a soft snap followed by the display pulsing (image getting bigger, then smaller, then settling out). The other day, I booted up the computer, and the monitor

  • GRC AC RAR: Comprehension question Mitigating Controls

    Hello all, I have a small comprehension question regarding Mitigating Controls. Situation: We have identified some authorization roles that contained lots of risks and we decided that they should not be used anymore. I therefore had our admins remove

  • Satellite P10: Which Wifi card will fit?

    HI Im looking to fit a mini pci wifi card to my P10 model PSP10E-0RCJM-EN trouble is I don,t know which type will fit I seen several cards offerd that involve doing away with the wifi on off switch I would prefer to keep this feature so need to know

  • Kernal panic/ won't boot from hard drive or installation disc/ error type 1

    Friends PowerBook seems to be dying or is possibly dead. PowerBook G4 model A1138 or M9969LL/A: 15 inch/ 1.67 ... http://support.apple.com/specs/powerbook/PowerBookG4_15-inch_Double-LayerSD.html K, so my friend's powerbook is in my possession... and