Ampersand (&) in text passed to OSP

I know this is a stupid question... but our client wants to search based on a free-form text column which may or may not contain ampersands. The OSP reads the text as a parameter and builds the search condition. No problem, but if the text passed contains an ampersand the entire OSP fails and sends an error to the client.
Is there some way to escape or work around this problem? In PL/SQL I can SET DEFINE OFF or SET SCAN OFF and deal with ampersands.
Any ideas?
Jeff

OSP - Oracle Stored Procedure, called via ODBC passing string parameters. One of the strings contains & (ampersand) which appears to be causing some issues...
Sorry about the acronym, and the ASP page uses ODBC, that is the relevance.
null

Similar Messages

  • Ampersand in text

    Hello,
    When I enter text in eg. a purchase order (me21n) and I use the ampersand character "&" in there in for instance the header text. The text is stored in the table as <(>&<)>. When I request the PO with the BAPI BAPI_PO_GETDETAIL this <(>&<)> is also given as a result in the BAPI.
    When I use this BAPI remote i do not want the extra characters around the &. Is there anybody who knows how to avoid these extra characters.
    tnx.
    Emile

    Hi Emile,
    SAP Note 730598 covers this.  As you suggested, this is normal behavior because the ampersand is stored in the database with extra characters.  The text can be converted from SAPScript to plain text using function module CONVERT_ITF_TO_ASCII.

  • How to get around Ampersand in text field in Select statement

    I have an SQL statement I am trying to run in SQL*Plus. In one of my subqueries, I have a select statment in which some of the fields I am trying to pull have an "&" within the text. So, when I try and run the query it returns "Enter value for 35:". I've even tried wildcard characters and it is still not working. If anyone could help me with this, I would appreciate it. Here is a sample of my statement (the subquery is at the bottom of the statement):
    select real_case.file_dt, real_case.dscr, pty_cd, first_name, last_name, addr_line1, addr_line2, city, st_cd, zip_cd
    from real_case, pty, idnt, ptyaddr s1, addr
    where real_case.case_id = pty.case_id
    AND pty.idnt_id = idnt.idnt_id
    AND pty.case_id = s1.case_id
    and pty.seq = s1.seq
    and s1.addr_id = addr.addr_id
    and (real_case.file_dt >= '01-NOV-06'
    and real_case.file_dt <= current_date)
    and (real_case.dscr like '79D01-%'
    or real_case.dscr like '79C01-%'
    or real_case.dscr like '79D02-%')
    and (pty.pty_cd like 'DFNDT')
    and (s1.ins_dttm in
    (select max(s2.ins_dttm) from ptyaddr s2
    where s2.case_id = s1.case_id
    and s2.seq = s1.seq))
    and (real_case.case_id in
    (select case_id from ptychrg
    where ptychrg.actn_cd IN ('35-41-5-1&35-48-4-1')));Thanks,
    Shannon

    this?
    SQL> set define off
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2    (select 'a&b' col from dual
      3      union all
      4      select 'abc' from dual)
      5   select    * from t
      6*  where col like '%\&%'
      7  /
    COL
    a&b
    or this
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2    (select 'a&b' col from dual
      3      union all
      4      select 'abc' from dual)
      5   select    * from t
      6*  where col like '%'||chr(38)||'%'
    SQL> /
    COL
    a&bjust '%'||chr(38)||'%' will not work.
    You nedd either set scan off or set define off
    correction
    Message was edited by:
    devmiral

  • 'Pass Through' Chapter Select Menu Text

    Hi there,
    I'm putting together a DVD using the Pass Through theme, but seem to hit a snag with the chapter menus - namely that I can't stop the background text from saying "PASS THROUGH CHAPTERS". Whilst looking very nice, it's not actually what I want.
    I've prodded around in every menu I can find, to no avail. Anybody know how to change this?
    Thanks!

    In order to understand the fix, it's useful to understand how the Passthrough theme works (also known as the "Passage Thema" in the Deutsch/German customisation of iDVD). There are three levels in the screens hierarchy for this theme. These are top level, mid level and chapter level.
    The background text is in Impact font and inherits its text contents from the foreground text which can normally be edited and modified, re-formatted and (unfortunately) deleted. Other foreground text can be placed on the page also.
    If the user deletes the foreground text the background text becomes uneditable. The lowest level pages appear to have no editable foreground text box.
    The approach to editing depends on whether
    One way to fix this on the chapter/scene selection screens is to download a Hex-Editor for MacOS X such as "HexEdit".
    Using HexEdit, open up a backup of the .dvdproj file you are working on. In the Open dialog, navigate to the file and then you will see further internal resources in the file to open. Click into Contents > Resources > ProjectData
    Now search (Ctrl-F) for the text "pass through chapters" (assuming this is the irritating text you wish to replace on the scene select page), which will display in the right hand half of the window. Left is hexadecimal, right is the ASCII translation. Use Find and Replace rather than typing directly into either section.
    Replace it with the text you want the sub-pages to display. Note this is a tricky move because for some reason the file structure counts the number of characters. Your replacement text must contain exactly the same number of characters as the text you are replacing. (You can pad with spaces at the end if you desire).
    Note you'll probably see the word Impact somewhere around here. Adventurous users might find a way to edit the font of the background text mask. I did not, and it might be that the font name has to match exactly your system resources and be the same length as the word "Impact" that it replaces.
    Save the dvdproj file once you have finished and have a look.
    Limitations of iDVD: Every sub-page has the same background text.
    Workaround for the mid-level pages: Add the buttons for the movies to the top level page. Then drop movie assets onto the buttons. Note the buttons inherit the movie names. Edit these. Go into each mid-level sub-page and edit the title there also.
    If you want the mid level sub-page background text to be different from the foreground text, then you will need to reduce the editable foreground text until it is insignificant and change its color also. Add a new Text object from the menu and type in the foreground text. This is easier than messing about with HexEdit.
    For some reason, I lost the foreground title text for the top level home menu, and also had to employ the HexEdit technique at this level.
    Good luck.

  • How to get Long text in IW33

    Hi Everyone,
    I have a requirement where I need to display the Longtext that is displayed in transaction IW33.
    Its is not the KTEXT feild pf table AUFK as this feild contains data upto 40 characters.
    My requirement is to fetch all the characters that are in Longtext.
    There must be a table where the long text is saved.
    Please let me the table ???
    Regards,
    Raj

    Press Display Text button in front of long text.You will go to editor.Then from the munubar select Go to->Header.Use these header details:
    Text Name   <Order no.>
    Language        EN
    Text ID         KOPF Order header text
    Text Object     AUFK       Order text
    Pass this to FM READ_TEXT.You can also refer the tables STXH and STXL but i guess FM will solve your problem.

  • Problem in Capturing Item text (BAPI_PO_CREATE1 )

    HI  Experts
    I have a problem with the BAPI BAPI_PO_CREATE1 for  PO creation.
    When I pass the values to the BAPI and passing Header text in the table I_PO_HEADER_TXT and Item text in the table I_PO_ITEM_TXT.
    But after the execution of BAPI    I_PO_HEADER_TXT is getting cleared and the same is beiong populated in the table I_PO_ITEM_TXT.
    Is there any way to differentiate Item text and Header text??/
    Thnks in Advance.
    Hari Krishna

    Hi,
    For header texts, pass '00000' as the value to structure field POTEXTHEADER-PO_ITEM.
    Read BAPI documentation regarding header & item texts
    4. Examples of population of BAPI_PO_CREATE1 interface:
    Parameter: POTEXTHEADER
    PO_NUMBER
    PO_ITEM              =                    00000
    TEXT_ID              =                    F01
    TEXT_FORM            =                    *
    EXT_LINE             =                    HEADER TEXT
    Parameter: POTEXTITEM
    PO_NUMBER
    PO_ITEM              =                    00010
    TEXT_ID              =                    F05
    TEXT_FORM            =                    *
    EXT_LINE             =                    ITEM TEXT, ITEM 00010
    Regards
    Vinod
    Edited by: Vinod Kumar on May 21, 2010 4:14 PM

  • Passing (byref) String from Java to C++ via JNI

    I wish to pass a string to a C++ Dll as a parameter in a function. The problem is that I don't know howto receive back the data after it is filled in the C++ dll. I am trying to do what is called passing parameters by reference.
    Java Code:
    public class ABKeyBoard {
    public native long leerBanda(int pista, String datos);
    public static void main(String[] args) {
    String datos=new String();
    System.loadLibrary("ABKeyBoard");
    new ABKeyBoard().leerBanda(1,datos);
    System.out.println(datos); //the content of datos here is empty.
    C++ Code:
    Java_ABKeyBoard_leerBanda(JNIEnv *env, jobject obj,jint pista, jstring datos)
         char buffer[2024];
         memset(buffer,     0x00,     sizeof(buffer));
         strcpy(buffer, "xxxx");
         datos = env->NewStringUTF(buffer);
    return;
    Thanks for your help.

    In java every parameter are always passed by value.
    The datos parameter is a local copy of the string
    reference you pass to the method.This is wrong. The String passed to the native method is the same String object you use in Java. Although everything is passed by value in Java, what is actually passed by value is the reference to the String. This means that you can modify the object you pass, but you are not allowed to change the reference to point to a totally different object. That is where the problem is coming in.
    The trouble is that it is illegal to modify a String, even from native code. If you need to make changes in-place to the text, pass an array of chars (if your native code uses Unicode), an array of bytes (if it uses normal 8-bit characters) or a StringBuffer. You can legally modify any of these data structures with the new data. But the StringBuffer object is the only one whose length can be changed after it is created. Unfortunately it is also the hardest to use from JNI.
    Generally I think you should always pass arrays of bytes/chars to native code instead of Strings when possible. They can be modified in place, and you can use String's methods to get a byte-array in the platform's proper encoding. Using the GetStringUTFChars method is problematic because UTF only maps directly onto ASCII in the case of characters which are in the set of 7-bit ASCII characters. Your code will do wrong things if your String happens to contain some other character, unless your native code expects UTF format strings.
    The good news is that C(++) functions which return results in their arguments do not ordinarily change the length. So you should be able to allocate a byte[] or char[] ahead of time of the appropriate size (don't forget to add the trailing null, which is not a component of Java strings). I think byte[] or char[] is the best answer because you can easily map those onto C-style arrays with Get[Primitive]ArrayRegion; the return of that is suitable for passing directly to native code, as long as you have remembered the null-terminator. For instance you could do (*env)->GetByteArrayRegion(env, javaArray, 0, arrayLength, CArray) and then your CArray would be changed to point at the contents of the javaArray (note: it does not copy data into CArray, it changes CArray to point at the array contents, so do not allocate memory for CArray first). Then when you do ReleaseByteArrayRegion the results will be propagated back to Java.

  • Long Text problem in Process order header

    Hi All,
    I am using SAVE_TEXT FM to update the header long text in process order.
    Also, I am updating the field AUFK-LTEXT = 'E'.
    But when i display the order and click on long text, it does not display any thing as the text is not saved.
    When I update the text directly in the order using COR2, it gets saved.
    Does anyone know why the text is not being saved through FM SAVE_TEXT?
    Also tried COMMIT WORK but was not successful.
    The paramters I am passing to the FM are
    TDOBJECT = 'AUFK'
    TDID     = 'KOPF'
    TDSPRAS  = SY-LANGU
    TDNAME = sy-mandt+order number with leading zeros.
    and the text lines in internal table.
    Am I missing anything else here?
    Thanks,
    Sandeep

    Hi Sandeep,
    First check table STXH for the order which you saved manually, in order to verify that the values you are passing to the FM SAVE_TEXT are correct.
    Also check the documentation which is supplied with this function to determine the INSERT and SAVEMODE_DIRECT values.
    Also maybe check function COMMIT_TEXT and its documentation.
    Regards,
    Robert
    PS. also test the scenario in which text s/b added to already existing text. The SAVE_TEXT function wipes out everything and therefore you first should read the existing text (READ_TEXT) to retrieve the current text and save this together with the new text using SAVE_TEXT. (check function group STXD for possible related functions to use).
    PPS. Thinking about my comments under PS., I recall now that this was the symptom of the long text passed on through BAPI_SALESORDER_CHANGE and therefore maybe this is not the case for SAVE_TEXT.
    Edited by: RJ. Schamhart on Feb 3, 2011 4:53 PM

  • Displaying text in a combo box.

    Hi, i was wondering if anyone could help me finish an application i am working on. I have two forms, one inputs dat to a text file and another retrieves it. i want to display the text in a combo box and then click an event in the combo box and a description
    of the event will appear in a text  box, also if i select a date on the second form the events in the combo box change for that date if there is events for it. the first form is working fine , i was looking for help with the second one please. my code
    so far is:
    namespace TicketInformation
       public partial class TicketInformationForm : Form
          public TicketInformationForm()
             InitializeComponent();
          //creating the community events list.
          List<Community_Event> CommnunityEvents;
          //create the Create Event list method.
          private void CreateEventList()
             CommnunityEvents = new List<Community_Event>();
             // call the extract Data method.
             ExtractData();
             //Clear any events from the combo box before proceeding.
             eventComboBox.Items.Clear();
             //for each event item in the Commuity event list,add it to the eventComboBox.
             foreach (Community_Event item in CommnunityEvents)
                eventComboBox.Items.Add(item.Description);
             //if the events count is greater then 0, display the following
             if (CommnunityEvents.Count > 0)
                //if there are no events for the date selected display the following
                eventComboBox.Text = " -Events- ";
                descriptionTextBox.Text = "Pick an event";
             }//end if
             else
                //if there are no events for the date selected display the following
                eventComboBox.Text = " No Events ";
                descriptionTextBox.Text = "No events today.";
             }//end else
          //Creating the Method ExtractData
          private void ExtractData()
             CommnunityEvents.Clear();
             // load the data from the file
             List<Community_Event> tempList = new List<Community_Event>();
             //string[] fileLines = File.ReadLines(@"C:\Users\IAN\Documents\calendar.txt");
             foreach(string line in File.ReadLines("calendar.txt"))
                string[] items = line.Split(",".ToCharArray());
                if (items.Length >= 5)
                   Community_Event newEvent = new Community_Event();
                   newEvent.Day = Convert.ToInt32(items[0]);//Converting the Integer to a string.
                   newEvent.Time = items[1];
                   newEvent.Price = Convert.ToDecimal(items[2]);//Converting the decimal to a string.
                   newEvent.Event = items[3];
                   newEvent.Description = items[4];
                   //add the new events to the Comminity Events list.
                   CommnunityEvents.Add(newEvent);
             CommnunityEvents = (from ev in tempList
                                          where ev.Day == 1
                                          select ev).ToList();
          private void dateMonthCalendar_DateChanged(object sender, DateRangeEventArgs e)
             //calling the create event list method to display any events in the eventscombo box.
             CreateEventList();
          private void eventComboBox_SelectedIndexChanged(object sender, EventArgs e)
          private void descriptionTextBox_TextChanged(object sender, EventArgs e)
          private void TicketInformationForm_Load(object sender, EventArgs e)
             //calling the create event list to open the form with today's events displayed if any.
             CreateEventList();
     public class Community_Event
          //Declare a DayValue property of type int
          private int DayValue;//day of the event
          public int Day// Name of the Property
             get
                return DayValue;
             set
                DayValue = value;
          //Declare a TimeValue property of type string
          private string timeValue;//time of the event
          public string Time// Name of the Property
             get
                return timeValue;
             set
                timeValue = value;
          //Declare a priceValue property of type Decimal
          private decimal priceValue;//price of the event
          public decimal Price// Name of the Property
             get
                return priceValue;
             set
                priceValue = value;
          //Declare a eventNameValue property of type string
          private string eventNameValue;//name of the event
          public string Event// Name of the Property
             get
                return eventNameValue;
             set
                eventNameValue = value;
          //Declare a DescriptionValue of type string
          private string DescriptionValue;//description of the event
          public string Description// Name of the Property
             get
                return DescriptionValue;
             set
                DescriptionValue = value;
    Thanks
    D

    Hi Dylan2412,
    According to your description, you'd like to pass the ComboBox.Text to the second form's TextBox.
    In Form1:
    private void button1_Click(object sender, EventArgs e)
    Form2 f2 = new Form2(this.comboBox1.Text); //pass the comboBox1.Text
    f2.Show();
    In Form2:
    public Form2(string s) //get the string;
    InitializeComponent();
    this.textBox1.Text = s;
    You could get the comBoBox refer to this sample above.
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Calendar malfunction - calendar keeps freezing and displaying text I copied for another purpose - any advice?

    My 6-month old macbook air's calendar keeps freezing up.  when I open calendar, it displays across the top of the calendar some text I copied for another purpose and which I pasted into a word document yesterday.  When this happens there's nothing I can do to escape it -- all commands result in the "thud" tone.  So I keep having to force quit calendar. 
    Any advice?

    Hi Dylan2412,
    According to your description, you'd like to pass the ComboBox.Text to the second form's TextBox.
    In Form1:
    private void button1_Click(object sender, EventArgs e)
    Form2 f2 = new Form2(this.comboBox1.Text); //pass the comboBox1.Text
    f2.Show();
    In Form2:
    public Form2(string s) //get the string;
    InitializeComponent();
    this.textBox1.Text = s;
    You could get the comBoBox refer to this sample above.
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Printing item text smartforms

    Hai friends,
    In my invoice i have 7 line items and some materials are "Duty Paid". For this they are maintaining a text in "Item Text" tab in VF01 transaction for each materials.
    I have to print the text one by one in the footer.
    How can i do this. How to display the item text.
    Thanks.

    Hi,
    Use the Function module READ_TEXT to read the item texts and print them in the footer.
    You need to pass paramters to FM Read_text. Go to VF03. go to item texts. Highlight any item texts and click on the display button below. It will take you to the text editor. On that screen Go to-> Header will show the following details.
    Text Name       1203832486000140                     
    Language        EN                                   
    Text ID         0002 Item note                       
    Text Object     VBBP       Sales     Item texts      
    Pass the same values to the fields of READ_TEXT FM.
    TEXTNAME would be the concatenation of salesorder and line item.
    Thanks,
    Vamshi.

  • Identifying vendor text ,internal note fields

    hi gurus,
    iam not able to find vendor text and internal fields can u  pple just help me in dis matter.
    •     Internal Note (TDID = NOTE) : This field appears under “Document” tab of the PO at Item level. The value maintained in this field needs to be concatenated with “Vendor text” (TDID = ITXT) field separated by “,”.
    plz sent me da answer to my mail id:[email protected]

    If you want to concatenate texts, first of all you need to get the text first.
    use read_text function module to read the text passing
    Text name - PO number/vendor number and language = syst language and text id = (to get this go a head double click on the text and then go to - header ... this will give yo the this) and text object. do the same for other text and then concatenate. if this is not the one you want. Explain it clearly and dont ask users to send to your email....

  • Extract node(s) that contain a particular text

    Hi,
    I have a XML document (stored in CLOB) and I want to search for a text within the document and I want it to return ALL nodes that contain that text (%text%).
    One more thing: I don't know the xml structure.
    Any idea?

    I want it to return ALL nodes that contain that text (%text%).Hope this gives you the clue:
    SQL> with t as (
      select xmltype('<a><b>Some text</b><c>Not a test</c><d>Some other text</d></a>') xml from dual
    select xmlquery ('//*[ora:matches(text(),"text")]' passing t.xml returning content) matches from t t
    MATCHES                                  
    <b>Some text</b><d>Some other text</d>   
    1 row selected.

  • BDC - TEXTS

    Hai all,
    while doing BDC  recording for VA01, i am entering item text for a material.
    in what format is it represented in the recording? where does that text get saved ...... ?
    how is that item text passed to a BDC for uploading ?
    thankx.
    suki.

    Sample Code for BDC in the program you generate after u create the recording.
    perform open_group.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  'OR'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-BSTKD'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'DG-19970128-1'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '2200'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '2200'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '04/04'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CHOO'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '2200'.
    perform bdc_field       using 'KUWEV-KUNNR'
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '05/03'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CHOO'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EABBA'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KUAGV-KUNNR'.
    perform bdc_transaction using 'VA01'.
    perform close_group.

  • Pass parameters to ARD

    Can I launch a viewer session in ARD from the command line? I haven't found anything and it seems like a pretty basic function.
    I am running a control that creates a SSH tunnel to a remote machine, and then calls the viewer automatically, passing the IP and Port.
    In windows it's something like this:
    C:\WINDOWS\system32\mstsc.exe /v 127.0.0.2:7777
    Is there a way to launch VNC or ARD this way on OS X?

    Compose link:
    <af:goLink text="Pass Param" destination="myPage.jspx?myParamName=#{value eg: row.id}"/>
    Expression to read parameter in the pageDefinition (because you will probably invoke your executeWithParams method):
    ${facesContext.externalContext.requestParameterMap['myParamName]}

Maybe you are looking for