ME21N specific check at the beginning of PO creation (check PR doc type)

Hello experts,
We have a requirement whereby in PO creation t-code of ME21N, there should be validation on PR document type linked to the PO. If certain PR document type is used then it should not allow creation of PO using ME21N.
However, when PO is changed usinf ME22N, this check is not applicable i.e. one can change PO which has PR belonging to that specific document type.
Any clues on how to implement this; if anyone has done such validations exclusvely for ME21N; but no such validation should happen when used ME22N; please send in your replies.
Thanks,
Prakash

Hi,
Maybe you can use BAdi ME_PROCESS_PO_CUST and only perform the check when sy-tcode is ME21N.
/Martin

Similar Messages

  • What is the purpose of using  credit process sales  doc type?

    what is the purpose of using  credit process sales  doc type?

    hi,
    A transaction that reduces Amounts Receivable from a customer is a credit memo.
    Credit memo request is a sales document used in complaints processing to request a credit memo for a customer. If the price calculated for the customer is too high, for example, because the wrong scale prices were used or a discount was forgotten, you can create a credit memo request. The credit memo request is blocked for further processing so that it can be checked. If the request is approved, you can remove the block. The system uses the credit memo request to create a credit memo.
    CHAN

  • What is the purpose of using  debit process sales  doc type?

    what is the purpose of using  debit process sales  doc type?

    hi,
    A debit memo is a transaction that reduces Amounts Payable to a vendor because; you send damaged goods back to your vendor.
    Debit memo request is a sales document used in complaints processing to request a debit memo for a customer. If the prices calculated for the customer were too low, for example, calculated with the wrong scaled prices, you can create a debit memo request. The debit memo request can be blocked so that it can be checked. When it has been approved, you can remove the block. It is  like a standard order. The system uses the debit memo request to create a debit memo.
    CHAN

  • What is the purpose of using  return process sales  doc type?

    what is the purpose of using  return process sales  doc type?

    hi,
    There is the standard process
    1)Order type( RE) VA01
    2)Delivery( LR)Vl01n with reference to return order
    i)if the movement is 651then system will not generate accounting document upon doing Post goods Receipt ,the stock will be in the return location
    then you use movement type 453 to get the stock in UN restricted
    ii)if the movement type 653 the system generates accounting document and stock posts in unrestricted use
    3)With reference to Delivery raise Credit memo (RE) with transaction VF01
    CHAN

  • Check payment- doc type

    hi all,
    can anyone please tell me how can i identify a check  payment in table regup and reguh?
    what is the doc type for check payments?
    thanks,
    Mirit

    Hi,
    To identify the payment document in these two table regup and reguh, first we need to identify the payment document type in FBZP. So please goto T.Code FBZP and then click on Payment method in country --> select the relevant country --> select the relevant payment method --> Check Posting Details block and see which document type we assigned over there Usually we assigned Document type for payment = ZP and Clearing document type ZV. Now you can give the same document type in selection screen of Display table of REGUP. In table REGUH document type and document number field is not available in selection screen so you can view the payment document through Payment method for whatever you assigned at the time of running payment run via F110.
    R.k

  • How to make repricing for specific conditions at the time of billing?

    Hello
    I'm SD Pricing person. Let me ask here experts below my concern.
    In EU countries, there is recycling fee in sales of electronics or Note PC with batteries....to keep our earth clean.
    So when customers buy such products, they have to pay more as recycling fee including invoice amount.
    My question is... we want to make repricing for recycling conditions when the billing is created.
    Based on our configuration, recycling condition is not defined as a kind of tax condition.
    So this value is just copied from sales order.
    (pricing type in copy control is 'G' which means repricing for tax condition.)
    In this situation, we want to make repricing for those conditions during operating system.
    Is there any easy way to cover this?
    As I think, this is not easy because the system is already operated.
    To change condition attribution is really risky. If we dare do, we have to migrate all open orders.
    So I want to put this way to the end of my choice.
    For this requirement,
    1. We have to change condition class or category or calculation type in order to be repriced based on pricing type 'G'.
        (ex. Set the condition category as 'I' inter-billing or 'L' always repricing.)
        But transaction data are created now and all open orders will be affected.
    2. To create new conditions are not easy because these conditions are mapped to the CO-PA value field and the values are posted in FI doc.
    3. To change pricing type in copy control is almost impossible because of the impact.
    What can I do this in this situation?
    What I want to do is just to make repricing for specific conditions at the time of billing in case that pricing type of copy control is 'G'.
    Thank you in advance.

    Let me ask agagin to all experts.
    I want to make A condition to be repriced at the time of billing.
    For this, I have to set condition category as 'L' (Generally new when copying).
    But I do not want to do in that way becauuse I am maintaining big operated system now.
    In addition, though I migrate open orders after changing config. as 'L', it is almost impossible for use to migrate because we have more than a thound open orders per a DAY as Globalized system.
    That is why I am asking.
    Simply I can create new condition but as I mentioned, there are various recycling fee so we already created about 10 conditions. And this recycling conditions are linked to REA package of SAP. So creating another 10 more conditions can not be a way for us.
    At last, what I want is not to be shown this condition only in billing doc.
    'A' condition should be displayed in both Sales order and Billing doc.
    And simultaneously, when the billing is created and if user changed 'A' condition master, then new value which is different from sales order have to be reflected in billing doc.
    Thank you in advance.

  • Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?

    Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?
    A little background info. I use Captivate 7 and currently have over 100 projects that I maintain on a quarterly basis. I publish using the SWF format and upload the swf/htm files to a server where they are then accessed from a few locations (within our online documentation, in our software product, on two different websites). Many of the projects are linked so some will be viewed as a series and others viewed as a standalone video. Each video uses the same template and includes an intro and end slide. Now my organization wants to implement a new intro to all videos (those I publish and those from several groups across the organization). My current intros provide overview material for the specific video so the new intro, which is an animation with audio in mp4 format, would need to be placed at the start of each project. The issue is, the intro adds 9 seconds to every video and in many cases doesn’t add any value (say, if a user accesses the video from within our product or views the videos as a series). I’ve talked it over with my boss and we want to try to add the intro only to videos accessed from site X, not any other location. So now to my question. Is there a way to play an external mp4 file (intro) only when the published project is accessed from a specific site, therefore eliminating the need to update each project? Maybe there's a way to add a parameter or variable to the URL or the html code?
    Thanks in advance for your suggestions. Please let me know if you need additional information.

    AimeeLove,
    I have a solution for you.  You may have to modify the code a little bit based on how long the timeline animation is for your clock.  I based mine on 3 seconds to complete a minute hand sweep around the clock.
    Milliseconds for each point on the clock:
    12 = 0
    1 = 250
    2 = 500
    3 = 750
    4 = 1000
    5 = 1250
    6 = 1500
    7 = 1750
    8 = 2000
    9 = 2250
    10 = 2500
    11 = 2750
    In the mouseover section for 12 o' clock, put this code...
    myVar = setInterval(function(){
         var pos = sym.getPosition();
         if (pos > 0 && pos < 50){
              sym.stop(0);
              clearInterval(myVar);
    },10);
    When you point to the time, the setInterval method loops every 100th of a second and checks the current position of the timeline.  When the timeline reaches the range between 0 and 50 milliseconds (almost impossible to hit 1 specific point), the timeline will stop at 0.  Also, the clearInterval will be fired to stop the loop.
    In the mouseout section, put this...
    sym.play();
    clearInterval(myVar);
    It start the clock again, and it also clears the loop in case you mouseout before you reach the range.
    Make sure that myVar is a global variable so you can clear it from the mouseout section.
    Repeat this for each point on the clock.  To avoid potential conflicts, you may want to use my12, my1, my2, etc. instead of myVar.  I put the milliseconds at the top that you would use as the beginning of the range.  50 milliseconds should be enough to catch it.  So, for 5 o' clock, you would make your range between 1250 and 1300.
    Let me know if you have any questions.  Thanks!
    Fred

  • How to create links that guide you to a specific title on the page and not the beginning of the page?

    I'm trying to create links so that when you click on a title in the table of contents it guides you to the title on the specific page. However, when I do that it always sends me to the beginning of the page even if the title is in the bottom. Anyone knows how to do if I want to get to the title and not to the beginning of the page? When I use Finereader it create links from the table of contents automatically and those links send me to the title no mater where it is on the page. I've tried do edit the settings to look like those links created in Finereader but it doesn't work.
    I'm using Adobe Acrobat XI on a Mac Book Air.
    Regards,
    Andreas

    In you first query you can only have 1 column listed in your subselect, used ResourceID.
    http://www.enhansoft.com/

  • I am purchasing a apple iphone 4 16 gb - model no. MC318LL, version 5.1.1 (9B206) CAN ANYBODY TELL THAT HOW OLD THE PHONE IS AND WHERE TO CHECK THAT IF I AM PURCHASING A RIGHT MODEL. SPECIFICATIONS CHECK ALSO REQUIRED

    I am purchasing a apple iphone 4 16 gb from a local second hand seller - model no. MC318LL, version 5.1.1 (9B206) CAN ANYBODY TELL THAT HOW OLD THE PHONE IS AND WHERE TO CHECK THAT IF I AM PURCHASING A RIGHT MODEL. SPECIFICATIONS CHECK ALSO REQUIRED - its looks are like a new phone.

    http://www.gazelle.com/how-to/iphone/model-identification
    Turn off your Caps Lock - all caps is considered shouting and rude.
    Many will not read your post if suject/body is in caps.

  • User-Specific Check-box is greyed out in the SAVE LAYOUT popup screen

    Hi Experts,
    I have created  a custom program and used the ALV grid.
    In the ALV grid I have included the Layout options menu. (Choose, Select, Save, Manage).
    When i try to save the layout, I cannot make it User-Specific. The User-Specific Check box is greyed out.
    Please let me know how to enable it.
    Appreciate you answers.
    Thanks,
    Jaffer Ali.S

    Did you set the attribute I_SAVE to 'A' ?

  • Ive been having issues checking individual categories in the itunes store. All i get is a blank screen when I select a specific category. The only thing I can see is the initial apps store when I select apps. Whats going on?

    I get a blank screen in  my apps when I select a specific category in the app store in itunes. whats going on?

    The same for me.
    Bug is reproduceable.
    Greetings, Anakonda

  • Search for records in the event viewer after the last run (not the entire event log), remove duplicate - Output Logon type for a specific OU users

    Hi,
    The following code works perfectly for me and give me a list of users for a specific OU and their respective logon types :-
    $logFile = 'c:\test\test.txt'
    $_myOU = "OU=ABC,dc=contosso,DC=com"
    # LogonType as per technet
    $_logontype = @{
        2 = "Interactive" 
        3 = "Network"
        4 = "Batch"
        5 = "Service"
        7 = "Unlock"
        8 = "NetworkCleartext"
        9 = "NewCredentials"
        10 = "RemoteInteractive"
        11 = "CachedInteractive"
    Get-WinEvent -FilterXml "<QueryList><Query Id=""0"" Path=""Security""><Select Path=""Security"">*[System[(EventID=4624)]]</Select><Suppress Path=""Security"">*[EventData[Data[@Name=""SubjectLogonId""]=""0x0""
    or Data[@Name=""TargetDomainName""]=""NT AUTHORITY"" or Data[@Name=""TargetDomainName""]=""Window Manager""]]</Suppress></Query></QueryList>" -ComputerName
    "XYZ" | ForEach-Object {
        #TargetUserSid
        $_cur_OU = ([ADSI]"LDAP://<SID=$(($_.Properties[4]).Value.Value)>").distinguishedName
        If ( $_cur_OU -like "*$_myOU" ) {
            $_cur_OU
            #LogonType
            $_logontype[ [int] $_.Properties[8].Value ]
    #Time-created
    $_.TimeCreated
        $_.Properties[18].Value
    } >> $logFile
    I am able to pipe the results to a file however, I would like to convert it to CSV/HTML When i try "convertto-HTML"
    function it converts certain values . Also,
    a) I would like to remove duplicate entries when the script runs only for that execution. 
    b) When the script is run, we may be able to search for records after the last run and not search in the same
    records that we have looked into before.
    PLEASE HELP ! 

    If you just want to look for the new events since the last run, I suggest to record the EventRecordID of the last event you parsed and use it as a reference in your filter. For example:
    <QueryList>
      <Query Id="0" Path="Security">
        <Select Path="Security">*[System[(EventID=4624 and
    EventRecordID>46452302)]]</Select>
        <Suppress Path="Security">*[EventData[Data[@Name="SubjectLogonId"]="0x0" or Data[@Name="TargetDomainName"]="NT AUTHORITY" or Data[@Name="TargetDomainName"]="Window Manager"]]</Suppress>
      </Query>
    </QueryList>
    That's this logic that the Server Manager of Windows Serve 2012 is using to save time, CPU and bandwidth. The problem is how to get that number and provide it to your next run. You can store in a file and read it at the beginning. If not found, you
    can go through the all event list.
    Let's say you store it in a simple text file, ref.txt
    1234
    At the beginning just read it.
    Try {
    $_intMyRef = [int] (Get-Content .\ref.txt)
    Catch {
    Write-Host "The reference EventRecordID cannot be found." -ForegroundColor Red
    $_intMyRef = 0
    This is very lazy check. You can do a proper parsing etc... That's a quick dirty way. If I can read
    it and parse it as an integer, I use it. Else, I just set it to 0 meaning I'll collect all info.
    Then include it in your filter. You Get-WinEvent becomes:
    Get-WinEvent -FilterXml "<QueryList><Query Id=""0"" Path=""Security""><Select Path=""Security"">*[System[(EventID=4624 and EventRecordID&gt;$_intMyRef)]]</Select><Suppress Path=""Security"">*[EventData[Data[@Name=""SubjectLogonId""]=""0x0"" or Data[@Name=""TargetDomainName""]=""NT AUTHORITY"" or Data[@Name=""TargetDomainName""]=""Window Manager""]]</Suppress></Query></QueryList>"
    At the end of your script, store the last value you got into your ref.txt file. So you can for example get that info in the loop. Like:
    $Result += $LogonRecord
    $_intLastId = $Event.RecordId
    And at the end:
    Write-Output $_intLastId | Out-File .\ref.txt
    Then next time you run it, it is just scanning the delta. Note that I prefer this versus the date filter in case of the machine wasn't active for long or in case of time sync issue which can sometimes mess up with the date based filters.
    If you want to go for a date filtering, do it at the Get-WinEvent level, not in the Where-Object. If the query is local, it doesn't change much. But in remote system, it does the filter on the remote side therefore you're saving time and resources on your
    side. So for example for the last 30 days, and if you want to use the XMLFilter parameter, you can use:
    <QueryList>
    <Query Id="0" Path="Security">
    <Select Path="Security">*[System[TimeCreated[timediff(@SystemTime) &lt;= 2592000000]]]</Select>
    </Query>
    </QueryList>
    Then you can combine it, etc...
    PS, I used the confusing underscores because I like it ;)
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Make an alert box at the beginning of every month

    I'm writing a budgeting tool and at midnight at the beginning of every month I want to pop up an alert saying it is the start of a new month and enable a button in jsp.
    I have tried a couple ways to do this. First I wanted to keep creating a calendar and check if the date was 1. But then this would be much more work than is needed.
    Next I tried to use the TimerTask class and set a boolean to true at the first of every month, but then I couldn't figure out how to make the javascript run when the run method of that thread executes. I tried using a while loop in the jsp page itself to check the boolean but this just caused the page to hang.
    A third idea I was trying is to have an invisble form with a hidden field using this boolean. I was trying to figure out a way to use onChange to trigger the javascript, but this would only work for some sort of visible input.
    Anyone have any exprience on scheduling a task like this at the beginning of every month or about how to force a page to reload at a specific time? Thanks.

    You could even put that in a frame with a form to navigate a seperate frame:
    //frameset
    <html>
    <frameset frameborder="0" framespacing="0" rows="26px,*">
    <frame scrolling="no" frameborder="0" marginheight="0"
        marginwidth="0" name="frameA" noresize src="testingB.jsp" />
    <frame scrolling="no" frameborder="0" marginheight="0"
        marginwidth="0" name="frameB" noresize src="http://www.google.com" />
    </frameset>
    </html>
    //then your time-important page (called testingB above)
    <html>
    <body>
        <script type="text/javascript">
            function navigate() {
              var navigateTo = document.forms[0].address.value;
              if (navigateTo.toLowerCase().indexOf("http://" == -1)) {
                  navigateTo = "http://"+navigateTo;
              parent.frameB.location.href = navigateTo;
              return false;
            function doAlert() {
                alert("Time to do Something");
                window.location.reload(); //so it will happen again next month.
    <%
        //When first created, the calendar points to now.
        Calendar cal = Calendar.getInstance();
        long curTime = cal.getTimeInMillis();
        //then, lets set it to the 1st day of the month, at 00:00:01.00 (1 second after midnight
        cal.set(Calendar.DAY_OF_MONTH, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 1);
        cal.set(Calendar.MILLISECOND, 0);
        //finally, add a month to get the first second of next month
        cal.add(Calendar.Month, 1);
        long triggerTime = cal.getTimeInMillis();
    %>
            //set the doAlert to occur after the # of milliseconds between now and
    next month.
            setTimeout("doAlert()", <%= (triggerTime - curTime) %>);
        </script>
        //form will read address you type in input, and navigate the other frame there.
        <form onSubmit="navigate();" name="nav">
          <input type="text" name="address" size="100" style="margin:3px" />
          <input type="submit" name="Go" value="Go" style="margin:3px" />
        </form>
    </body>
    </html>

  • Removing punctuation from the beginning and end of a string

    I am working on a project for a "spell checking" program. So far the StringHash class is made, and the dictionary is read into a hash table. Then the document to be checked is specified via command line, the document scans through each word and checks to see if it is in the dictionary, if it is do nothing, if it is not then display it to console. The problem I am having is with a method in the main class. The method (I will post what I have so far) is called removePunct. The method should remove any punctuation from the beginning and the end of the string, nothing from the middle. Here is what I have so far:
    public static String removePunct(String word){
              StringBuilder wo = new StringBuilder(word);
              int x = (word.length()-1);
              if(!Character.isLetter(wo.charAt(0)))
                   wo.deleteCharAt(0);
              if(!Character.isLetter(wo.charAt(x)))
                   wo.deleteCharAt(x);
              return wo.toString();
    Any help would be much appreciated, I'm pretty certain the solution is either something completely different, or something so simple that I just missed it.

    The easiest way to do this is to just show you the actual file to be spell checked:
    -- outline --
    This directory contains Bison skeletons: the general shapes of the
    different parser kinds, that are specialized for specific grammars by
    the bison program.
    Currently, there are only three supported skeletons:
    - yacc.c
    It used to be named bison.simple: it corresponds to C Yacc
    compatible LALR(1) parsers.
    - lalr1.cc
    Produces a C++ parser class. It is still very experimental, and not
    yet supported. Please, subscribe to [email protected].
    - glr.c
    A Generalized LR C parser based on Bison's LALR(1) tables.
    These skeletons are the only ones supported by the Bison team.
    Because the interface between skeletons and the bison program is not
    finished, we are not bound to it. In particular, Bison is not
    mature enough for us to consider that ``foreign skeletons'' are
    supported.
    Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of GNU Bison.
    GNU Bison is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
    GNU Bison is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with Bison; see the file COPYING. If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
    What I need the spell checker to do is read each word, and strip any beginning or ending punctuation, e.g. (c) would become c. Pretty much punctuation consists of anything that is not a letter, hence the use of isLetter. I can easily modify the method to remove all punctuation using regular expressions, but I only want the beginning and end characters removed.
    Example of words:
    -yacc.c would become yacc.c and is not in the dictionary so it would be printed.

  • Unwanted pausing and freezing at the beginning - Flash player problem - Need help

    Hi everybody,
    I have got the following problem: the problem occurs especially on youtube.com.
    Every time when I open a video, the adobe flash player buffers the video a little bit and suddenly the grey line, which means the buffering on youtube video, stops. Then video plays only until the end of the grey buffer line. Then it freeze and I have to wait until 10-20 seconds until the grey line continues moving forward and at the same time the video continues to play.
    But I don't want to have that freezing problem at the beginning of each video.
    The important thing to know is: when I used a very old version of the flash player (the version 9 or 10) then every video on youtube worked very well without any freezing problems at the beginning
    What is the solution. Can you please help me?
    Here is what I have done so far:
    I updated my flash player to the latest version.
    My internet speed is very fast.
    When I click right on the youtube video screen in order to go to the settings: then I unchecked "active hardware acceleration, I changed the temporary storage limit to "unlimited".
    My global settings looks like the following: I checked "allow websites to save information on your computer" and "ask if a website wants to use a peer assisted network".
    My OS: Windows 7 (64)
    Current version of firefox, chrome and IE. I have the problem in every browser.
    In the attachment you can see 2 screenshots of my problem: One where you can see the grey buffer line. and the 2nd: where you can see that the video stopped loading and buffering and the video stopped playing.
    Unfortunately, I don't get money from the company for advertising its product *sigh*. ;-)

    Just because your internet connection is fast doesn't mean that the route from the specific server to you is also equivalently fast.  You can get some additional information by right-clicking the YouTube video and choosing Stats for nerds.  That information would be interesting.
    If video plays back fine once it actually buffers successfully, then there's probably not a lot you can do.  You might take a look at a different browser.  Google Chrome will probably use HTML5 playback on YouTube, and Internet Explorer will use the ActiveX control on Flash, which is significantly different from the NPAPI Flash Player used in Firefox.

Maybe you are looking for