Validation for issue for production not working

hi all,
i have designed database validation for issue for production  .
by default SAP gives error  if instock is less than the quantity to be issued.
My Clients requierment is whlie issuing item for production, row level item quantity should not be greater than the instock of a warehouse selected for that item in row level.
while in case of sap default validation it considers all the instock of item from all the warehouse and i want to consider only those stock  of warehouse whih is selected for the item at row level.
my validation is as follows but it gives error for all cases.
IF @transaction_type in ('A','U') AND @object_type = '60'
BEGIN
declare @line as numeric(4)
declare @dline as numeric(4)
declare @ritem as nvarchar(50)
declare @bref as nvarchar(50)
select @bref= T1.[BaseRef] from OIge T0 left outer JOIN
Ige1 T1 ON T0.DocEntry = T1.DocEntry
left outer join oitm t2 on t2.itemcode=t1.itemcode
left outer join  OITW T3 on t3.whscode=t1.whscode and t3.itemcode = t1.itemcode
where T1.docentry=@list_of_cols_val_tab_del
set @dline=0
select @line= isnull(max(t1.linenum),0)
from OIge T0 left outer JOIN
Ige1 T1 ON T0.DocEntry = T1.DocEntry
left outer join oitm t2 on t2.itemcode=t1.itemcode
left outer join  OITW T3 on t3.whscode=t1.whscode and t3.itemcode = t1.itemcode
where t1.docentry= @list_of_cols_val_tab_del
while @dline<=@line
begin
select @ritem= t1.itemcode from OIge T0 left outer JOIN Ige1 T1 ON
T0.DocEntry = T1.DocEntry
left outer join oitm t2 on t2.itemcode=t1.itemcode
left outer join OITW T3 on t3.whscode=t1.whscode and t3.itemcode = t1.itemcode
where T0.DocEntry = @list_of_cols_val_tab_del and
t1.linenum=@dline
if exists (SELECT T0.DocEntry
from OIge T0 left outer JOIN Ige1 T1 ON T0.DocEntry = T1.DocEntry
left outer join oitm t2 on t2.itemcode=t1.itemcode
left outer join OITW T3 on t3.whscode=t1.whscode and t3.itemcode = t1.itemcode
where T0.DocEntry = @list_of_cols_val_tab_del and
t1.linenum=@dline and t1.itemcode in (@ritem) and t3.onhand < t1.quantity )
BEGIN
SELECT @Error = 1, @error_message = 'less quantity'
END
set @dline=isnull(@dline,0)+1
set @ritem=' '
end
END
pls suggest solution...

Iu2019m sorry. The error was that the tables contain the data after the transaction. So try this:
IF @object_type = '60' and @transaction_type= 'A'
and (Select top 1 j.BaseType from IGE1 j
      Where j.DocEntry = @list_of_cols_val_tab_del)=202
BEGIN
if exists
(Select i.DocEntry from IGE1 i
   Where i.DocEntry = @list_of_cols_val_tab_del
    and (select w.OnHand from OITW w
        where w.ItemCode=i.ItemCode and w.WhsCode=i.WhsCode)<0 )
Begin
set @error =1
set @error_message = 'Less quantity in the warehouse !'
End
END

Similar Messages

  • ITunes 7.0.2 Error - ""This action is only valid for products..." message

    Hi,
    I see other folk are having problems upgrading to iTunes 7.0.2 but I've had a read of some recent posts and can't find a problem quite like mine...
    OK, so I decided to say yes to the "upgrade to iTunes 7.0.2?" prompt when I turned iTunes 7 on this afternoon. I followed all the prompts correctly and allowed the computer to re-start when installation was complete.
    My iTunes "i" icon has disappeared from the QuickLaunch bar, and has been replaced by a Windows application blue and white square-window icon. When I click on it to run iTunes I get an error message prompt:
    "This action is only valid for products that are currently installed."
    I click "OK" and then nothing happens, iTunes (niether 7 nor 7.0.2) does not load and there is no way to get into iTunes. Going through the menu bar results in the same error message.
    I am not sure what to do. I don't want to wipe iTunes and start again because I have quite a few purchased tracks that may be lost, and I doubt I would be able to get them back.
    Does anybody have any advice?
    Many thanks.
    (I have tried playing a QuickTime movie file and that works fine).
    QuickTime 7.1.3 seems to be working fine.

    Remove the shortcut that is in the QuickLaunch bar.
    Go to C:\Program Files\iTunes\ and make a new shortcut for iTunes.exe and put it in the QuickLaunch bar.
    That should resolve the issue.
    Hope this helps,
    Nathan C.

  • Office 2013 - Excel 2013 - "This action is only valid for products that are currently installed."

    I had Office 2010 starter and Outlook 2010 installed.  I recently purchased the Office 2013 click to run version (paid monthly subscription) and installed Office 2013.  After installing 2013 I noticed that when I opened up Excel files they would
    still open in Office 2010.  I uninstalled Office Starter 2010 and uninstalled Outlook 2010.
    I then manually fixed the file associations for Word, PowerPoint, Publisher and such, however I could not manually fix the Excel file association. 
    Excel documents show the correct icon however when I double click on them the following error appears "This action is only valid for products that are currently installed."
    I have used the Office 2013 repair process, I have uninstalled and reinstalled Office 2013, I have manually uninstalled office 2013 using KB 2739501 (
    http://support.microsoft.com/kb/2739501/en-us ) and I still can not open Excel documents. 
    Recently I found that I can not do mail merges either using Excel documents as the data source and I believe the two items are related.
    Any suggestions?

    Hi,
    Please try to turn off compatibility mode and then check the issue again. To do this, please follow:
    1. Open this folder location:
    For Windows 32-bit: C:\Program Files\Microsoft Office\Office15
    For Windows 64-bit: C:\Program Files (x86)\Microsoft Office\Office15
    2. Find Excel.exe, right-click it, and choose Properties.
    3. Click on the Compatibility tab and ensure that all of the boxes are
    un-checked.
    For more information, please refer to this:
    http://support.microsoft.com/kb/2674519/en-us
    Thanks,
    Steve Fan
    TechNet Community Support

  • Logging for AS not working

    Hi,
    In sm21, I cannot see any logs from the AS. I can only see the ones from CI.
    Any ideas how to solve this issue ?
    Anything is welcomed,
    Thanks.

    Hello
    This thread was locked for the following reasons:
    1) the topic does not relate to PI. This forum is for PI technical issues only.
    2) it is against forum rules to post the same issue on multiple forums - Re: Logging for AS not working
    Regards
    Moderator

  • 'this action is only valid for products that are currently installed'

    hi im new to discussion groups so i might be a little slow... i came aross a problem a couple of days ago where when i clicked on itunes this came up'this action is only valid for products that are currently installed' im not really sure what to do about it!i have tried to uninstall it but it wont let me i have also tried to install a new itunes but it gets stuck and never finishes the install. i have done some research on the net about it and i think it may have occured due to deleting mcafee of my computer however there are no solutions to this problem.
    can anybody help?
    thanks!

    Every time I try to open iTunes a pop up opens
    that says "This action is only valid for products
    that are currently installed."
    that's actually an installer error equivalent
    to the InstallShield 1605 error:
    Error 1605: This action is only valid for
    products that are currently installed
    ... when you go to launch itunes, are you opening it
    via the start menu, or are you clicking on a desktop
    icon? if you are clicking on a desktop icon, what is
    it called, and what does the icon look like?
    Never Mind! But Thanks any way

  • Save for web not working in Photoshop element 6

    Save for web not working in Photoshop element 6. I am using Mac os x version 10.5.8   Anyone know how to fix that please tell me. Thanks

    I just copy the preferences from my computer for you to see what are shown about adobe
    file:///Users/raymondsmith/Library/Preferences/Adobe/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Illustrator%20CS2%20Settings/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20CS2%20Paths
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20CS2%20Settings/
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20Elements%206%20Paths
    file:///Users/raymondsmith/Library/Preferences/Adobe%20Photoshop%20Elements%206%20Settings /
    file:///Users/raymondsmith/Library/Preferences/AdobeUM/
    file:///Users/raymondsmith/Library/Preferences/AppleWorks/
    file:///Users/raymondsmith/Library/Preferences/ByHost/
    file:///Users/raymondsmith/Library/Preferences/CD%20Info.cidb
    file:///Users/raymondsmith/Library/Preferences/CDDB%20Preferences
    file:///Users/raymondsmith/Library/Preferences/cfx%23FBSxPfw
    file:///Users/raymondsmith/Library/Preferences/com.adobe.acrobat.90.sh.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Acrobat.Pro7.0.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.acrobat.sh.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Acrobat.Uninstaller.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Adobe%20Help%20Viewer.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.ami.installer.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.bridge2.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.mediabrowser.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.PhotoshopElements.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Reader_ppc_9.0.plist
    file:///Users/raymondsmith/Library/Preferences/com.adobe.Reader.plist
    file:///Users/raymondsmith/Library/Preferences/com.aol.aim.plist

  • [svn:fx-trunk] 13257: Fix for @inheritDoc not working on a setter, but works on a getter

    Revision: 13257
    Revision: 13257
    Author:   [email protected]
    Date:     2010-01-04 10:49:13 -0800 (Mon, 04 Jan 2010)
    Log Message:
    Fix for @inheritDoc not working on a setter, but works on a getter
    QE notes: None.
    Doc notes: None
    Bugs: SDK-24727
    Reviewed By: Paul
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24727
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java

    steabert wrote:
    Hi,
    I had a similar problem with my Dell Latitude E4310, and apparently also the E6410, E6510.
    The solution for me was to add the following line to /etc/modprobe.d/modprobe.conf:
    options snd-hda-intel model=dell-s14
    I tried that, unfortunately it does not work with this chipset. I do get a different set of channels though but it still cannot record anything. Maybe this chipset is too "new" for alsa. The latest release dates back from the end of January. Support for it is explicitly stated in the changelog to 1.0.24 but perhaps the recording part of it slipped through the cracks. ALSA bug tracking system seems quite closed.

  • ICloud for pc not working tried everything

    iCloud for pc not working tried everything ( uninstall - reinstall - delete files - old versions ) nothing helps it just downloads a couple of photos and off again my iPhone uploads perfectly as all the pics goes to the iPad seamlessly, Please Help i'm on windows 8.1 x64, Thanks

    I think that the card reader may in fact be defective, but it just doesn't make sense if I have already used it fine before. I've tried everything on this Apple support page, thank you though.
    Does anyone have any suggestions?

  • Skype 6.3 upgrade for Mac not working

    [Topic title updated by moderator to be more descriptive. Original topic title was: "Skype upgrade for Mac not working"]
    BE WARNED - just because you are being asked to upgrade your Skype, it does not mean it will work on your machine. I am a fairly regular user of Skype and this morning was unable to log-in, being told that I needed to upgrade. I did so to 6.3.0.602 but I was unable to log-in once the software had downloaded. After some research on the forums and finally a text chat with Support, I was told that Skype 6.3.0.602 requires a Mac OSX of 10.9 or above - I have 10.5.8
    "So what can I do", I asked the tech support. The answer is nothing (unless I get new OS X software) - there is no Skype software programme that supports my operating system and no timeframe for when it might be available.
    Huh? That's right. It's just not available. So for now, users with less than OS X 10.9 will be unable to use Skype when they are instructed to upgrade. It really doesn't make sense. But just so you know....

    jessicaed wrote:
    BE WARNED - just because you are being asked to upgrade your Skype, it does not mean it will work on your machine. I am a fairly regular user of Skype and this morning was unable to log-in, being told that I needed to upgrade. I did so to 6.3.0.602 but I was unable to log-in once the software had downloaded. After some research on the forums and finally a text chat with Support, I was told that Skype 6.3.0.602 requires a Mac OSX of 10.9 or above - I have 10.5.8
    "So what can I do", I asked the tech support. The answer is nothing (unless I get new OS X software) - there is no Skype software programme that supports my operating system and no timeframe for when it might be available.
    Huh? That's right. It's just not available. So for now, users with less than OS X 10.9 will be unable to use Skype when they are instructed to upgrade. It really doesn't make sense. But just so you know....
    Please look at the top of the community page, and you will find a box "Search:". Write your problem here "Upgrade not working" and see what crops up. Most likely you will be taken somewher like here: http://community.skype.com/t5/Mac/quot-We-ve-signed-you-out-because-your-using-an-outdated-version/m...  
    Here you will read that the latest versions of Skype will not work on some of the versions of MacOS, and that PPC requires one version, Leopard another, Snow leopard another, Mountain Lion another. They are indoctrinated with a stamp in their forehead to enforce their congregation of true believers to install the latest with all "security fixes" or death is looming. They are not used to software that is 2 years old. 
    So, with Mac, we have different operating systems and different sets of libraries - and things may go belly up if you upgrade - a OS feature is done differently, a libary has been placed inside the OS, and is no longer needed - and if you try to use it, you will be trapped.
    Install the latest version that works for your Mac, and make sure to freeze this. Update the "info.plist" file and tell Skype that you use their latest should they pry. As long as it works, do not change anything!
    And make the change to stop Skype from checking every time you start.

  • Default them for Mac not working firefox 4 beta 1

    Default them for Mac not working Firefox 4 beta 1
    == This happened ==
    Every time Firefox opened
    == I first opend FF4 beta 1 for the first time

    '''Ritrup''':
    Create a new profile as a test to check if your current profile is causing the problems
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Validation of existing certificate does not work since release 9.3.3

    Hi everyone,
    Since I updated to Adobe Reader 9.3.3 the validation of digital signatures does not work properly anymore. Though I try to validate the certificate that used to be OK before the upgrade to 9.3.3 I now get an error on the same document and signature that used to work before. In the signature details Adobe Reader now states that "The certificate ...is not trusted...". This has to do with the new Adobe Approved Trusted list (AATL) I assume since nothing else changed.
    Does anybody know a workaround or is anybody aware of a bugfix that will be released in the near future?
    Thanks in advance,
    Mike G

    Works for me.
    What OS/JDK etc are you using?

  • After installing Lion all Adobe products not working will and to slow

    After installing Lion all Adobe products not working will and to slow
    Like the photoshop is to slow to work on it
    Please I need to now what's the problem and how can I solve it
    Best regards

    Yeah Im at a loss too for what is going On here I Do Audio video Editing On the PC side till Now Just got a Not even 6 mo old Mac book pro Dual core 2.5 Ghz 17 in 160 Gb HD 2 GB Ramm did fresh reinstalled of tiger Patched to 10.4.11 then asked the tech at apple store best way to go for Installing my Adobe CS3.3 Master Suite for windows on Here As I said I did not want to go with Lepord as well as I do not use vista yet on PC side with my audio video Apps Abelton live 7.0 Reason 4 Pro tools 7.4 M powered Avid media Composer 3.0 and everything Adobe Makes now he says 2 ways to go VM fusion Or Parallels He likes the Parallels I go that route I install it realize to make Adobe suite work I have too do a custom Virtual machine with 1.5 GB ramm instead of default 512 MB and I create virtual HD at 60 GB instead of default 32 GB which The first time i Installed the master Collection at the 32 GB setting I think it ran out of disk space on the install so i increased the VM to the current settings went to Adobe to Parallels site and Got updates and windows and apple removal tools and ran them here goes reinstall # 3 it takes about 1 1/2 Hrs then at end give ya the error 19-20 errors and when you go look into the folders in Program files adobe there are no Icon launch files and in your programs tab under adobe suite all you see is 2 icons that do not launch anything ? any help is greatly appreciated new to Macs Like them but a lil discouraged !!!!

  • While updating 4.0 version to 5 version system shows sim card is not valid. My iphone is not working .Please help me

    while updating 4.0 version to 5 version system shows sim card is not valid. My iphone is not working .Please help me

    I would imagine your iPhone was hacked to make it work on your local carrier.
    Updating the iOs to 5.xx will lock it back to the original carrier .The carrier holding the lock are the only
    entity able to authorise the unlock .You will have to contact them and see if they unlock and the terms the apply

  • HELP - Edge Animate issues - buttons/symbols not working/disappearing in portrait mode on mobile devices

    Edge Animate - Issues - buttons/symbols not working/disappearing when in portrait mode on iPad and mobile devices, but in landscape version everything is fine.
    Everything works cross broswer on Desktop - Safari, Chrome, Explorer and Firefox - mobile devices prove glichy... anyone else experience this?
    It's a regular issue of mine, particularly with complex animations. Symbols disappear
    - is it something to do with overflow?
    - responsive scaling?
    I have no idea.

    Since no one has answer this post, I recommend opening  a support case with CSS as they can work with you to solve this problem.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Calendar Issues - "Repitition is not working for the item you tried to access"

    I ran into an interesting error when troubleshooting a calendar issue today, wondering if anyone has seen it.
    Exchange 2010 SP2 latest RU, Outlook 2010
    User changes then start time for a recurring meeting, changes in everybody's calendar but hers 9still shows in her calednar as the original start time)
    Logged into OWA to see if her claendar reflected the correct start time there - no, still  shows the old start time.  So I open the meeting, have a quick look, and the following error pops up:
    "Repitition is not working for the item you tried to access.  It's possible either the start or end date are not correct"
    Has anyone seen this error in OWA before?
    TAG

    Hi,
    Please double check whether the updated start time and end time are changed properly in attendees’ calendar. Also confirm whether the updating message is in the organizer’s sent items both in OWA and Outlook.
    Thanks,
    Winnie Liang
    TechNet Community Support

Maybe you are looking for