Regular expression not working for String.split()?

hi, i have a String variable called 'table'.
It has a bunch of chunks of data seperated by whitespace, whether it
be spaces or carraige returns. Anyways, i want to split this up using
the String.split function. i want to split it around whitespace.
here is my code:
String codes[] = table.split("\s");
However, i'm getting back all nulls in the codes variable. What am i doing wrong?
thanks

split("\\s")\ is special both in Java String literals and in regex, so you need two of them.
You'll probably also have to take an extra step it you don't want regex to stop at newlines. I forget the details, so check the docs.

Similar Messages

  • ReplaceAll string by regular expression not work for this case.

    I will delete all tag and want "pure text" but the output is delete all.
    String content = "<aaa>pure text<fff>";
    content = content.replaceAll("<.*>","");Content has output is blank because reqular expression match from begin and end of string
    But when i change
    String content = "<aaa>pure text<fff";
    content = content.replaceAll("<.*>","");The output is ==> pure text<fff
    How make req match in sequential
    Please lead me to solution

    peterdog1234 wrote:
    Thank you very much.
    I know '?' is a Quantifiers.
    I do not understand using ?
    Please lead me againSee the paragraph "Laziness Instead of Greediness" from [http://www.regular-expressions.info/repeat.html].

  • Regular expression not working for adobe forms

    Hi,
    Iam using qtp for adobe forms and for some reason if i put in regular expression for apid value it doesn't recognise the object..there is nothing wrong with the regular expression as it is evaluated using regular expression evaluator in qtp 11.0....any ideas
    I got all the addins and everything and when i used regular expression for the top window it works but for any other object it doesn't

    Please try the code and see the problem. The regular expression is fine.
    I can replace the string with these and got results like this:
    import java.util.regex.Pattern;
    public class HtmlFilter implements TextFilter {
        private static String strTagPattern = "<\\s?(.|\n)*?\\s?>";
        private static int patternMode = Pattern.MULTILINE | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE | Pattern.CANON_EQ;
        private static Pattern tagPattern = Pattern.compile(strTagPattern, patternMode);
        public String filter(String t) {
              if(t==null || t.length()==0) return "";
            String ret = null;
            return tagPattern.matcher(t).replaceAll("");
         public static void main(String[] args) {
              System.out.println(new HtmlFilter().filter(null));
              System.out.println(new HtmlFilter().filter(""));
              System.out.println(new HtmlFilter().filter("<P>abc def</P>"));
              System.out.println(new HtmlFilter().filter("<P>&#25105;&#22269;&#30707;&#27833;&#20379;&#24212;&#23433;&#20840;&#31995;&#32479;&#24433;&#21709;</P>"));
    }The results are
    abc def
    ????????????

  • CFFORM (Flash) Validation with Regular Expressions Not Working

    I am having troubles getting regular expression validation to
    work in a CFFORM. The below code is an extract of a much larger
    form, the first name and last name have a regular expression
    validation...and it doesn't work!
    I'd appreciate any comments/info for help on this, have
    searched high and low on information to get this working...but no
    joy.
    The code is:
    <cffunction name="checkFieldSet" output="false"
    returnType="string">
    <cfargument name="fields" type="string" required="true"
    hint="Fields to search">
    <cfargument name="form" type="string" required="true"
    hint="Name of the form">
    <cfargument name="ascode" type="string" required="true"
    hint="Code to fire if all is good.">
    <cfset var vcode = "">
    <cfset var f = "">
    <cfsavecontent variable="vcode">
    var ok = true;
    var msg = "";
    <cfloop index="f" list="#arguments.fields#">
    <cfoutput>
    if(!mx.validators.Validator.isValid(this,
    '#arguments.form#.#f#')) { msg = msg + #f#.errorString + '\n';
    ok=false; }
    </cfoutput>
    </cfloop>
    </cfsavecontent>
    <cfset vcode = vcode & "if(!ok)
    mx.controls.Alert.show(msg,'Validation Error'); ">
    <cfset vcode = vcode & "if(ok) #ascode#">
    <cfset vcode =
    replaceList(vcode,"#chr(10)#,#chr(13)#,#chr(9)#",",,")>
    <cfreturn vcode>
    </cffunction>
    <cfform name="new_form" format="flash" width="600"
    height="600" skin="halosilver" action="new_data.cfc">
    <cfformgroup type="panel" label="New Form"
    style="background-color:##CCCCCC;">
    <cfformgroup type="tabnavigator" id="tabs">
    <cfformgroup type="page" label="Step 1">
    <cfformgroup type="hbox">
    <cfformgroup type="panel" label="Requestor Information"
    style="headerHeight: 13;">
    <cfformgroup type="vbox">
    <cfinput type="text" name="reqName" width="300"
    label="First Name:" validate="regular_expression" pattern="[^0-9]"
    validateat="onblur" required="yes" message="You must supply your
    First Name.">
    <cfinput type="text" name="reqLname" width="300"
    label="Last Name:" validate="regular_expression" pattern="[^0-9]"
    validateat="onblur" required="yes" message="You must supply your
    Last Name.">
    <cfinput type="text" name="reqEmail" width="300"
    label="Email:" validate="email" required="yes" message="You must
    supply your email or the address given is in the wrong format.">
    <cfinput type="text" name="reqPhone" width="300"
    label="Phone Extension:" validate="integer" required="yes"
    maxlength="4" message="You must supply your phone number.">
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    <cfformgroup type="horizontal"
    style="horizontalAlign:'right';">
    <cfinput type="button" width="100" name="cnt_step2"
    label="next" value="Next"
    onClick="#checkFieldSet("reqName,reqLname,reqEmail,reqPhone","new_form","tabs.selectedInd ex=tabs.selectedIndex+1")#"
    align="right">
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    </cfformgroup>
    </cfform>

    quote:
    Originally posted by:
    Luckbox72
    The problem is not the Regex. I have tested 3 or 4 different
    versions that all work on the many different test sites. The
    problem is it that the validation does not seem to work. I have
    changed the patter to only allow NA and I can still type anything
    into the text box. Is there some issue with useing Regex as your
    validation?
    Bear in mind that by default validation does not occur until
    the user attempts to submit the form. If you are trying to control
    the characters that the user can enter into the textbox, as opposed
    to validating what they have entered, you will need to provide your
    own javascript validation.

  • Airport Express not working for MacBook Air, ok for iMac

    I connect to the internet via wireless broadband; the ethernet cable from the broadband antenna plugs into my Airport Express router.  I run both my 27" iMac desktop and my 13" Mac Book Air off the Airport Express router.  To the best of my knowledge, nothing has changed with my internet provider's settings.
    Since Friday, the MacBook Air internet connection barely works; if a page loads, it takes forever (and I have a very fast broadband connection.)  Checking the same connection on the iMac has no delay and loads instantly.  On the laptop, if the page does load, and I click a link on that page, the link takes me to a new page requesting me to log in to my internet provider, or just fails to load.  I get lots of "page failed to load; interneet connection was reset....".
    I have checked network settings on both machines and they appear to be just fine.  I have run diagnostics and it shows everything working fine.
    I ran Disk Utility (permissions repair and verify disk) and have no problems.
    I have tried restarting the laptop several times.
    Software is up to date.
    I don't think it's the internet server or the connection since it's working on the desktop Mac.
    I'd appreciate any suggestions or things to try; I read about doing soft and hard resets but am reluctant to try that since Airport is working for the desktop computer just fine.

    I have a MacBook Pro Retina display: 15.4-inch late 2015 with OS X Mavericks install, only on second week. 
    Insight works on FaceTime, Skype, but yahoo program does not show insight cam in dropped down.
    Now when I got my new MacBook Pro, I down loaded all new Skype (worked tested), FaceTime (Worked Tested), Yahoo (not worked)
    Fix:
    With the new Maverick you have to use there messager program Version 8.0 (4218). Once I add my yahoo account video works again.
    It also supported AOL, AIM, Google Talk, Jabber.
    Guess I miss it frist time... hope this helps...

  • Splitting is not working for fiscal year 2008

    hai experts,
    The splitting is not working for fiscal year 2008. This is critical for month end.
    pls explain me ful cycle and advise me what i have to do,
    thank you

    Hi
    Please check the documentation in the links below.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/1c/2ed140ed61712ae10000000a155106/content.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/87/3da04028f40160e10000000a1550b0/content.htm
    This gives yuo a brief on Document splitting. Please let me know if you need any further help. Please do award points if found useful.
    Karthik

  • Document splitting not working for customer & vendor Payment

    Hi,
    We have actived Document splitting on profit center for segment level reporting.
    In below scanario Document spliting working fine.
    Vendor Invoice (Docuement type - KR)
    General Ledger view
    Expense Dr 1000      PC1
    Vendor   Cr  1000     PC1
    At the time of Payment (General ledger view) (Document Type - KZ)
    Vendor Dr  1000        PC1
    Bank     Cr   1000       PC1
    In the above scanario we dont have any issue, Based on invoice profit center spliting automaticlly in bank in General Ledgerview.
    How ever in the below scanario Document spliting is not working in payment
    No issues in Invoice
    General ledger view
    Exp  Dr  1000 PC1
    Exp Dr   1500 PC2
    Vendor Cr 1000 PC1
    Vendor Cr 1500 PC2
    When we make payment to vendor Document splitting is not working, it get splitting in zero balance clearing account
    vendor Dr 1000 PC1
    Vendor Dr 1500 PC2
    Bank     Cr  2500  (No profit Center)
    Doc splitt A/C 1000
    Doc Split A/C  1000 PC1
    Doc Split A/C   1500
    Doc Split A/C    1500 PC2
    My Finance Team requires automatic split up in bank based on vendor profit center.
    We are using Business Transation 1000 (Payment) for document Type - KZ & DZ.
    Regards,
    Lokesh

    Can you please confirm if the following settings exist in your system in various IMG nodes.
    1. Bank G/L account is assigned to item category 04000 (IMG node: Classify G/L Accounts for Document Splitting).
    2. Document type KZ is assigned to business transaction 1000 and transaction variant 0001 (IMG node: Classify Document Types for Document Splitting).
    3. In IMG Node "Define Document Splitting Rule", under the method that is assigned to your company code, transaction 1000 and variant 0001, you see 04000 as one of the item categories to be edited.
    4. If the answer for (3) above is yes, if you double-click on 04000 item category line, the processing category is set to 1 (Splitting based on base item categories).
    5. Now when you double-click on 'Base item categories', you see 03000 - Vendor as one of the base item categories in the list there.
    Please respond with Y / N to the above questions and we can go from there.

  • How to write regular expression to find desired string piece *duplicate*

    Hi All,
    Suppose that i have following string piece:
    name:ali#lastname:kemal#name:mehmet#lastname:cemalI need
    ali
    mehmetI use following statement
    SQL> select lst, regexp_replace(lst,'(name:)(.*)(lastname)(.*)','\2',1,1) nm from (
      2    select 'name:ali#lastname:kemal#name:mehmet#lastname:cemal' as lst from dual
      3  );
    LST                                                NM
    name:ali#lastname:kemal#name:mehmet#lastname:cemal ali#lastname:kemal#name:mehmet#
    SQL> But it does not return names correctly. When i change 5th parameter(occurence) of regexp_replace built-in function(e.g. 1,2), i may get ali and mehmet respectiveley.
    Any ideas about regexp?
    Note : I can use PL/SQL instr/substr for this manner; but i do not want to use them. I need regexp.
    Regards...
    Mennan
    Edited by: mennan on Jul 4, 2010 9:53 PM
    thread was posted twice due to chrome refresfment. Please ignore the thread and reply to How to write regular expression to find desired string piece

    The approach is to do cartesian join to a 'number' table returning number of records equal to number of names in the string.I have hardcoded 2 but you can use regexp_count to get the number of occurrences of the pattern in the string and then use level <=regexp_count(..... .
    See below for the approach
    with cte as(
    select
    'name:ali#lastname:kemal#name:mehmet#lastname:cemal' col ,level lev
    from dual connect by level <=2)
    select substr(regexp_substr('#'||col,'#name:\w+',1,lev),7)
    from cte
    /

  • Match Regular Expression not returning submatches.

    I am having an issue with Match Regular Expression not returning the appropriate number of submatches.  My string is as follows:
    DATAM    995000    1.75    0.007    -67.47    24.493    99.072
    The spaces are tabs and the length is not fixed so simple string manipulation is out of the question.  The regular expression I was trying is as follows:
    (?<=\t)[0-9\.\-]*(?=(\t|$))
    It successfully returns Whole Match as the first number but no submatches are returned.  I've tried simpler expressions which work in Matlab and EditPad Pro such as [0-9.-]* but never got the same answer in Labview.
    What is going on?

    Here is an image of the VI.  The top portion is the input from our Licor 7000.  The bottom portion is the bit of code I'm having problems with.
    Attachments:
    matchregularexpression.jpg ‏336 KB

  • Cascading Select Lists - Not Working for me

    I am trying to implement Denes Kubicek's Ajax Cascading Select List solution.
    http://apex.oracle.com/pls/otn/f?p=31517:119
    But it is not working for me.
    I'm a newbie to APEX and checked the forum for advice on cascading select lists. I saw the thread for
    "Cascading Select Lists - Not Working" posted by sue and the replies by Varad Acharya, but I'm still
    having issues of not seeing the alerts, not able to run the pl/sql process in SQL Workshop, and not
    getting the expected results.
    I have a list of countries (US - USA, CA - CANADA, etc.) and a list of states for each country. When a
    user selects a country I would like to show the list of states within that country.
    This is what I've done so far:
    Defined an application process:
    Process Point: On Demand: Run ... by a page process.
    Name: CASCADING_SELECT_LIST1
    Process Text:
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    HTP.prn ('<option value="' || 99 || '">' || '- All States -'
    || '</option>'
    FOR c IN (SELECT state_code || ' - ' || state_desc d, state_code r
    FROM tbk_state
    WHERE country_code = :cascading_selectlist_item_1)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' || c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;
    defined and application item:
    Name: CASCADING_SELECTLIST_ITEM_1
    Build Option: - No Build Option -
    Created a 'Form on a table with report' as follows:
    Page 5: Report on TBK_HARDWARE_LOCATION
    Page 6: Form on TBK_HARDWARE_LOCATION
    in HTML Header of the page attributes for 'Form on TBK_HARDWARE_LOCATION' I have:
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    On Page 6: 'Form on TBK_HARDWARE_LOCATION' I have the following items (plus some others):
    Name: P6_COUNTRY_CODE
    Display as: Select List
    HTML Form Element Attributes: onchange="get_select_list_xml1(this,'P6_STATE_CODE');"
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: COUNTRY_CODE
    Named LOV: LIST OF COUNTRIES
    Name: P6_STATE_CODE
    Display as: Select List
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: STATE_CODE
    Named LOV: - Select named LOV -
    List of Values definition:
         select state_code || ' - ' || state_desc d, state_code r
         from tbk_state
         where country_code = :P6_COUNTRY_CODE
         order by 1
    LIST OF COUNTRIES is defined as:
    select country_code || ' - ' || country_desc d, country_code r
    from tbk_country
    order by 1
    Now to the problem:
    I run page 5 (the report) to see the list of locations and then I try to edit a record (page 6). When I
    try to select a different country I get the following error (on IE):
    "Problems with this web page might prevent it from being displayed properly or functioning properly.
    In the future, you can display this message by double-clicking the warning icon displayed in the status
    bar.
    Line: 17
    Char: 5
    Error: Object expected
    Code: 0
    URL: http//cmrac4.cm.timeinc.com:7777/pls/htmldb/f?
    p=114:6:1413254636072443110::::P6_HARDWARE_LOCATION_ID:2
    I don't see any of the alert messages.
    I also tried to run the application process code in the SQL - Command Processor (I replaced
    :cascading_selectlist_item_1 with 'CA' or 'US') and got the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
    button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource
    'http://cmrac4.cm.timeinc.com:7777/pls/...
    <select><option value="99">- All States -</option><option value="X1">X1 - X1</option><optio...
    Can someone help me please?

    Varad,
    First, thank you for taking the time to try to help me with this problem.
    When I view the page's source code (here are the first few lines):
    <html lang="en-us">
    <head>
    <script src="/i/javascript/core.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/i/css/core.css" type="text/css" />
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='Would you like to perform this delete action?';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    //alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    //alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue);
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    It looks like line 17 is:
    var l_Select = html_GetElement(pSelect);
    I'm still not sure why I'm getting this error and why it's not working?
    Thanks,
    Eti

  • RequestFocus() not working for JTextArea

    requestFocus() is not working for JTextArea.
    A validation message is displayed and when clicked on 'ok', requestFocus() does not work. Cursor is not shown in the text
    area.
    Any suggestions/solutions pls?

    here is the sample code:
    public boolean checkData()
    String comment = commentArea.getText().trim();
    if( comment.length() < MN_COMMENT || comment.length() > MX_COMMENT )
    showError(COMMENT_ALERT);
    commentArea.requestFocus();
    return false;
    return true;
    Focus is lost. TextArea is in scroll pane. Scroll pane is contanined in a container pane and pane is for JDialog.
    RequestFocus() is working for JRE 1.5.0_07. But its not working for JRE 1.5.0_0 and lower versions.

  • CsrAttachmentUploadDiv part attachment is not rendered SP 2013(Attach file in not working for all the list forms)?

    csrAttachmentUploadDiv partattachment  is not rendered SP 2013(Attach file in not working for all the list forms)?
    Ravi
    function ShowPartAttachment() {
    ULSopi:
        if (document.getElementById("part1") == null || typeof document.getElementById("part1") == "undefined") {
            alert(Strings.STS.L_FormMissingPart1_Text);
            return;
        (document.getElementById("part1")).style.display = "none";
        (document.getElementById("partAttachment")).style.display = "block"; //problem here

    Am also facing the similar problem....any iputs are highly appriciated.
    Issue..
    1) Defined the attachment type in IMG.
    2) Added the attachment type "SFREEATTM" by selecting other attributes---> Attachment Types.
    3) Attached the excel file in the design.
    See the screen shot below:
    The Issue is when testing through tcode nwbc in the inbox the attachment tab is not visible after selecting the particular form.
    Please see the screen shot below:
    Did i miss any Configuration?? Please suggest...
    Regards,
    Naveen

  • SPSecurity.RunWithElevatedPrivileges Not Working for Read Only Permissions Users

    I have the following code in a method that generates tabbed web parts on any page in SharePoint 2010.
    The problem is that it will not work for users who have Read access only on a SharePoint site.  It will work when those users have Contribute access.  
    So even though I have elevated permissions in the code it does not actually elevate the permissions at the point where it is needed.
    if (panel != null)
    try
    using (SPLimitedWebPartManager wpManager = SPContext.Current.Web.GetLimitedWebPartManager(HttpContext.Current.Request.Url.ToString(), PersonalizationScope.Shared))
    try
    // Elevated previleges required for EXPORT and IMPORT. Else Users with normal read access will get errors.
    SPSecurity.RunWithElevatedPrivileges(delegate()
    // Retrieve the web part titles in the ConfigureTabs XML string for this tab.
    var webPartTitles = from t in xDocument.Descendants("webPart")
    where (string)t.Parent.Attribute("name") == (string)e.Item.DataItem
    select (string)t.Attribute("title");
    foreach (string wpTitle in webPartTitles)
    foreach (System.Web.UI.WebControls.WebParts.WebPart webPart in wpManager.WebParts)
    // Find the matched closed web part in WebParts collection
    if (webPart.Title == wpTitle && webPart.IsClosed == true)
    string errorMessage;
    //ADD EXPORT PROPERTY
    webPart.ExportMode = WebPartExportMode.All;
    MemoryStream stream = new MemoryStream();
    XmlTextWriter writer = new XmlTextWriter(stream, System.Text.Encoding.UTF8);
    // Export the closed webpart to a memory stream.
    wpManager.ExportWebPart(webPart, writer);
    writer.Flush();
    stream.Position = 0;
    XmlTextReader reader = new XmlTextReader(stream);
    // Import the exported webpart.
    System.Web.UI.WebControls.WebParts.WebPart newWebPart = wpManager.ImportWebPart(reader, out errorMessage);
    reader.Close();
    writer.Close();
    // Show the imported webpart.
    panel.Controls.Add(newWebPart);
    break;
    catch (Exception ex)
    // For debugging use only.
    Label label = new Label();
    label.Text = "Please check your XML configuration for error. " + Environment.NewLine + ex.Message;
    panel.Controls.Add(label);
    catch (Exception ex)
    // For debugging use only.
    Label label = new Label();
    label.Text = "Please Check SPContext.Current.Web is not null. " + Environment.NewLine + ex.Message;
    panel.Controls.Add(label);
    This snippet of code was originally pulled from a microsoft technet article on creating Tabbed web parts "the correct way" but it doesn't work in all scenarios.
    Is there a way to get this code working for Read/Visitors to a SharePoint site?

    From initial observation what I see is that your SPLimitedWebPartManager is not created from an elevated web. Try like below
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSite elevatedSite = new SPSite(SPContext.Current.Site.ID))
    using(SPWeb elevatedWeb = elevatedSite.OpenWeb())
    using (SPLimitedWebPartManager wpManager = elevatedWeb.GetLimitedWebPartManager(HttpContext.Current.Request.Url.ToString(), PersonalizationScope.Shared))
    { //Rest of your code
    Geetanjali Arora | My blogs |

  • TS1814 This is not working for me. I tried the Windows 7 Resolution steps multiple times to no avail. Please help. I am obviously connected to the internet (as is iTunes Store).

    This is not working for me. I tried the Windows 7 Resolution steps multiple times to no avail. Please help. I am obviously connected to the internet (as is iTunes Store).
    I am connected to the internet through a Verizon Wireless card, that is my regular internet connection.

    I did all that HT1925 recommended and it was no help.  My computer still won't recognize my iPhone.  Often trying to start Apple Mobile Device Service fails with an error message that it starts and then stops immediately.

  • MN04 not working for free text PO

    Hi All,
    I have maintained a condition record through MN04 in purchase organisation, company code and vendor combination. This condition record is working fine for regular purchase orders. But it is not working for free text PO's. Could you please guide me why is it so?
    I am maintaining same purchase organisation, company code and vendor combination for free text PO also. Question is why it is working for a purchase order with material inside it and why it is not working for purchase order with out material.
    Thank you all in advance

    Hi,
       Seems you are using a custom print program and form. I would suggest to change the program to SAPFM06P, form routine as "ENTRY_NEU" and the form as "MEDRUCK" in NACE transaction for the output type and check the scenario again. Also cross check the settings with the KBA: 1829682 - Output type is not determined in Purchase order
       If its getting triggered, then check the custom program and the form with the help of technical team.
    Regards,
    AKPT

Maybe you are looking for