Quote in contains() literal

Hi All,
Sure I'm missing something, but I'm having a problem
with specifying a double and single quote in literal in
query like this:
select e.extract('/experimentDocument/data/rawData/fileDscr/notes/HTML/
BODY/P/text()') from EXPDOC e where
existsNode(value(e),'/experimentDocument/data/rawData/fileDscr/notes/HTML/
BODY/P[contains(.,"note")]') = 1;
The abovementioned query yelds the correct result which is:
E.EXTRACT('/EXPERIMENTDOCUMENT/DATA/RAWDATA/FILEDSCR/NOTES/HTML/BODY/P/TEXT()')
There is "note" space available for each file description.
The question is: how to specify an literal, which already contains a double or single quotation mark? In my case what if I'm searching for the text: <There is "note" space>?
I was not be able to find anything in doc
and in XPath spec on this metter. Note, that changing double quote separator to single qoute in contains(.,'some text') does not work because it interferes with
single quote separator in outer expression.
Another related question: which characters are special inside such a string literal in contains() function and hence should be treated specially? My experiments shows that standard entity like <&><quot><;> does not work.
Any help would be appreciated.
Thanks in advance
Boris

Post Author: Manuel de Kleine
CA Forum: Formula
Chris,You could use single quotes:IF ... = '3/16" White' THEN '4001 - Foamcore Mounting'

Similar Messages

  • Single quote in SPARQL query

    Hi,
    I have a SPARQL query with a clause like (?affy gb:bioprocess "3\'-phosphoadenosine" .). Oracle Jena adapter translates it into
    sdo_rdf_match('(?affy <gb#bioprocess> "3\'||chr(39)||'-phosphoadenosine")..., which throws the following error when executing the query:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.TokenMgrError: Lexical error at line 1, column 50. Encountered: "\'" (39), after : "\"3\\"
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 169
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 35
    ORA-06512: at line 4
    What does Oracle Jena adapter expect if the SPARQL query has single quote in the literal value? Thanks,
    Weihua

    Hi,
    What is your database version?
    Could you list exactly the literal value you want to query? Please ignore any escapes. Is it as follows?
    3'-phosphoadenosine
    Thanks,
    Zhe

  • ADF BC Attribute with VC of CONTAINS Ignores Choice List on the LOV

    JDev 11g PS 1.
    Objects:
    - A view criteria with attribute defined as CONTAINS (literal)
    - An LOV on that attribute with a default list type UI hint of Choice List
    - ADF Faces query-table based in the VC
    Problem: query-table ignores the Choice List and renders an Input Text.
    Clue: Changing the operator to EQUALS causes the expected Choice List to be rendered in ADF BC.
    If this is documented in the online help or in this forum, it is escaping me.
    Anyone know the best workaround? Set the VC using EQUALS and switch it to CONTAINS in buildWhereClause() maybe?
    Thanks,
    Peter

    Frank,
    Thanks for the fast reply and for the bug entry. Unfortunately stopping work is not an option. We've come up with a solution using a query listener that replaces EQUALS with CONTAINS before the query and resets it to EQUALS after the query (otherwise the component draws the text item after the query).
    Maybe you can think of another solution to our requirement: display a single master record in the results table for a master-detail database view. For example, in an altered Oracle HR world, each DEPARTMENTS record is associated with multiple LOCATIONS records (through a DEPT_LOC table). A database view, DEPT_LOC_VW, based on that table also contains the location description and department description.
    Users want to select and then edit (on another page) a department by querying by location. If we represent DEPT_LOC_VW in the query-table component, we see multiple result rows for a single department and that is unnecessary confusion for the purpose of editing a single department.
    So we have created an alternative database view, DEPT_VW, based on DEPARTMENTS only, with an additional column -- LOC_LIST -- based on a function that returns a delimited list of all location codes for that department. This way, the user sees only one department record in the results table (although we lose the location description in the results -- not an issue) and is still able to query based on location.
    A LOCATIONS_VW view contains the location code surrounded with the delimiiter. The DeptVw view attribute LocList contains an LOV based on that database view.
    We want the view criteria to create a query condition:
    WHERE loc_list LIKE '%'||<selected location code>||'%'We thought about some kind of clever use of a subquery using a bind variable:
    SELECT...
    FROM  departments -- not DEPT_VW or DEPT_LOC_VW
    WHERE department_id IN (
       SELECT department_id
       FROM   dept_loc
       WHERE  location_id = NVL(:userSelectedLocationId, location_id);But that bind variable does not show in the view criteria selection list so it will not appear in the query component.
    Thanks again,
    Peter

  • How to translate dashboard prompt year/period into literal date range

    I am using OBIEE 10g. I have a dashboard that prompts for a fiscal year and fiscal period (both are numeric data types). I need to use these values in the date filter for my answers request - however, to fully utilize the indexes and partitioning that have been set up on my fact table (Teradata database) I need to be able to convert fiscal year/period to a literal date range and pass literal date values (i.e. 10/01/2011 - 10/31/2011) to my answers filter. So far I have been unable to do this, I'm hoping someone has some ideas.
    Here are some things I've tried so far:
    In the dashboard prompt, set variables var_year and var_period (which would be set to 2012 and 10, respectively). Create a filter on my answers request for Date (from calendar dimension) that calculates a min/max date value based on var_year and var_period. While this works to return data, the sql is not optimized as it does not contain literal date values for the filter (10/01/2011 - 10/31/2011).
    Create a subreport that takes the year/period from the dashboard prompt and calculates 2 columns, one for the "From Date" (using min calculation) and one for the "To Date" (using max calculation). Then create a filter on my answers request that uses the results of this subreport to create the date filter. Again this works - however, instead of passing the literal date values for from and to dates, it passes the min/max calculations so that these are executed again in the answers request sql. Therefore again this is not optimized, as it is not passing literal date values for the filter.
    I have only been able to get this to work by creating a prompt for entering a from and to date directly, and using this to pass to the answers request filter. This generates optimized sql as it contains literal date values. However, this is not acceptable to the users as they want to enter fiscal year/fiscal period at the dashboard prompt, not a date range.
    I have tried to get the fiscal year/fiscal period columns in the dashboard prompt to set another dashboard prompt for a date range, thinking I could then set new presentation variables for those from/to columns to use in the answers request, but I can't figure out how to do this. Is this even possible, to use a dashboard prompt value to set a subsequent dashboard prompt value?
    Is there some other method of converting these prompt values to literal dates that I am missing?
    Thanks in advance for any help you can provide.
    Rhonda

    Disregard. I gave up and just brought in the Fiscal Period Start Date and Fiscal Period End Date to the rpd so I can use them in the dashboard prompt, created presentation variables for each, and used those in the report filter.

  • Bourne Shell (sh) - How To Interpret Characters Literally

    I know that character enclosed in single quotes are interpreted literally by the Bourne-Again SHell (bash). After all, the man page states:
    {quote}
    "Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash."
    {quote}
    Here's some proof:
    bash-3.2$ echo 'hello world'
    hello world
    bash-3.2$ echo 'hello
    world'
    hello
    world
    bash-3.2$ echo 'hello\world'
    hello\world
    Now I thought that the Bourne shell (sh) worked the same way, but obviously not:
    sh-3.2$ echo 'hello world'
    hello world
    sh-3.2$ echo 'hello
    world'
    hello
    world
    sh-3.2$ echo 'hello\world'
    helloworld
    How do I go about having the Bourne shell (sh) interpret my characters literally?

    What the reason you can't/don't want to use bash?
    On MacOSX and Linux, /bin/bash and /bin/sh are both GNU bash; the latter is just running in the sh-compatible mode. In this case, the following will work, but it won't work on BSD's and other Unixes, where /bin/sh is not GNU bash:
    sh$ shopt -u xpg_echo
    sh$ echo 'foo
    bar'
    foo
    bar
    The following also works; I don't know which is better (from the portability point of view):
    sh$ /bin/echo 'foo
    bar'
    foo
    bar

  • How to send html email notification in bpel

    hi gurus,
    i want to send html email notification from bpel.
    before, i already successful send html email with attachment, but when i send an email without attachment, then the body message will turn into a plain text.
    as i check from the email accepted, email with attachment will have a mime type "text/html" but if no attachment then it will be "text/plain"
    from the bpel configuration, by default the mime type already set to "text/html; charset=UTF-8", below is the sample configuration in my bpel process
    [quote]
    <copy>
                                    <from>string('text/html; charset=UTF-8')</from>
                                    <to variable="varNotificationReq"
                                        part="EmailPayload">
                                        <query>ns10:Content/ns10:MimeType</query>
                                    </to>
                                </copy>
    [/quote]
    i think this suppose to be a easy configuration, but i'm not sure whether i miss something in configuration the email process or this is a bugs in bpel.
    environment:
    linux
    jdev 11.1.1.6
    do u guys ever facing a same problem or have a solution to this ? please throw some light.
    thanks
    ===
    update, i found a temporary solutions.
    so i add a attachment from the process design, and then i change it from the source.
    [quote]
    <copy>
                                    <from>
                                        <literal>
                                            <Content xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
                                                <MimeType xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">multipart/alternative</MimeType>
                                                <ContentBody xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
                                                    <MultiPart xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
                                                        <BodyPart xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
                                                            <MimeType xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"/>
                                                            <ContentBody xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"/>
                                                            <BodyPartName xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"/>
                                                        </BodyPart>                                            
                                                    </MultiPart>
                                                </ContentBody>
                                            </Content>
                                        </literal>
                                    </from>
                                    <to variable="varNotificationReq"
                                        part="EmailPayload">
                                        <query>ns10:Content</query>
                                    </to>
                                </copy>
    <copy>
                                    <from>string('text/html; charset=UTF-8')</from>
                                    <to variable="varNotificationReq"
                                        part="EmailPayload">
                                        <query>ns10:Content/ns10:ContentBody/ns10:MultiPart/ns10:BodyPart[1]/ns10:MimeType</query>
                                    </to>
                                </copy>
                                <copy>
                                    <from>string('your message')</from>
                                    <to variable="varNotificationReq"
                                        part="EmailPayload">
                                        <query>ns10:Content/ns10:ContentBody/ns10:MultiPart/ns10:BodyPart[1]/ns10:ContentBody</query>
                                    </to>
                                </copy>
    [/quote]
    make sure you put the mime type multipart/alternative into the email payload content. by default, when you add attachment, it will generate mime type multipart mixed automatically.
    if you don't change it to multipart/alternative, your email will show a attachment, but actually your email doesn't contain any attachment.
    and then for the message and mimetype make sure you have that ns10:bodypart, because this email already been set as a multipart email.
    when you add attachment, by default it will generate 2 body part, first one is for the body message and the second one is for the attachment. since i only want to use the body message only, then i have to erase the second bodypart
    with this workaround, i can send a html email without attachment perfectly.
    but i have to take note, when i updating the email process from process design, then the source will be generated again automatically, and the edited one will be replaced.
    thanks.

    Make sure you upload all of the images used in your email to a server you control. Then, change your image paths to point to those uploaded images with absolute links.
    You will get marked as spam if you attempt to send images as attachments to a large list of recipients and most email clients won't download images to begin with, so make sure your html email makes sense with broken pictures.
    CSS support is spotty across email clients, if you use css, make sure it's inline, not embedded in the <head> or externally linked in the <head>. Some email clients strip out the <head> section entirely.
    Basically, you need to design your html email as if you haven't moved out of the 90's yet, as far as web design is concerned, in order to get maximum cross client compatibility.
    Then, when you're ready, I would suggest using a service like www.icontact.com or www.constantcontact.com if your subscriber list is anywhere over 100 or so recipients.

  • What is use of INCLUDE in command line statement?

    Pls. explain following line. How this works and what is expected output for this line.
    /: INCLUDE &VBDKA-ZTERM& OBJECT TEXT ID SDTP PARAGRAPH L
    Thanks
    Harshada

    hi Harshada,
    INCLUDE: Include other texts
    With the command INCLUDE, you can include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting.With the INCLUDE command, you always get the most current version of the required text, since this is only read and inserted during the output formatting.
    Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]
    The name of the text to be inserted must be specified and can have up to a maximum of 70 characters. If the text name contains blanks, then you must put it in quotes as a literal. It can also be specified via a symbol. All further parameters of the INCLUDE command are optional. If they are missing, SAPscript uses default values for them which are based on the respective call environment.
    Examples:
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE ‘E’ PARAGRAPH ‘A1’
    The text with the name MYTEXT and the language E is included, regardless of in which language the calling text is created. The paragraph format A1 is valid as the standard paragraph for this call.
    Optional specifications:
    •&#61472;LANGUAGE If a language is not specified, the language of the calling text or the layout set is set for the text to be included. If a language is specified, the text is always loaded in this language, regardless of the language of the calling text.
    •&#61472;PARAGRAPH The text to be included is formatted with the style allocated to it. With this parameter, the standard paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are then formatted with the paragraph specified here.
    •&#61472;NEW-PARAGRAPH The first line of the included text has this format flag, provided it is not a command or comment line. If the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are formatted with the paragraph np specified with
    NEW-PARAGRAPH.
    •&#61472;OBJECT To specify a text completely, you must make further specifications regarding the text object. There are different rules and restrictions for this which depend on the object type of the calling text: All texts can be included in a layout set. If no object is entered here, TEXT is used (standard texts).With a documentation text (object DOKU), you can only include documentation texts. This object is assumed even if no object is specified in this environment. Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT specification is missing, DSYS is set as a default value.
    Only standard text (object TEXT), documentation text or hypertext can be included in any other type of text. The default object is TEXT if nothing is entered.
    •&#61472;ID The text ID, which allows further text types within an object, is a further part of the text key. If the ID is not entered, the default Include ID from table TTXID is used for the calling text. If the specification is not in this table, the text ID of the calling text is used.
    The ID together with the object are now the basis of a further consistency check:
    •&#61472;All text IDs are allowed for a layout set.
    •&#61472;Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and documentation texts which have the same text ID as the calling documentation text may be included in documentation texts.
    •&#61472;All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts to be inserted may only have IDs TX and UO.
    •&#61472;Standard texts with all the allowed text IDs, DSYS texts with all IDs, and documentation texts with Ids TX and UO may be included in the other types of texts.
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

  • Same Template in Multiple Smartforms

    Hi Experts,
    We have a same template to be used in different Smartforms,
    Is it viable for us to create standard text in SO10 transaction & use in smart forms. Our template will have rows & columns with hard coded text.
    How is the procure to attach standard text from SO10  to Smartforms.
    Thanks in Advance,
    Regards,
    IFF

    To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]
    [NEW-PARAGRAPH np]
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    u2022     LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    u2022     PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    u2022     NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    u2022     OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
    o     Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
    o     In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
    o     Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
    o     In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    u2022     ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    u2022     All text IDs are allowed in a form.
    u2022     In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    u2022     In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    u2022     Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    u2022     0: the text include was successful.
    u2022     1: the command could not be executed because it contained syntax errors.
    u2022     2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    u2022     4: the specified text could not be found.
    Once you define the standard text in SO10 you can include text by the above process or use the function module read_text:
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        id                            =
        language                      =
        name                          =
        object                        =
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = i_tab
    EXCEPTIONS
      ID                            = 1
      LANGUAGE                      = 2
      NAME                          = 3
      NOT_FOUND                     = 4
      OBJECT                        = 5
      REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    So you want to know how get the parametrs right. This is how"
    In SO10 goto goto menu -> header
    here u will find all the required parametrs.
    The text lines will be returned in the i_tab.
    U can loop at this itab and display the data.
    Reward points if hepful. 
    Edited by: Pratik Mallick on Jul 10, 2008 8:50 AM

  • Two clients in the same server--Script??

    Hi Folks,
    1.I have two clients in the same server say 100(used for dev) 120(used only for testing).I had developed a script in 100 which I want to test it in 120.Now how to move this script in 100 to 120.
    2.How to use includes in scripts and what is the usage?
    Thanks,
    K.Kiran.

    <b>INCLUDE: </b>Include other texts
    With the command INCLUDE, you can include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting.With the INCLUDE command, you always get the most current version of the required text, since this is only read and inserted during the output formatting.
    Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]
    The name of the text to be inserted must be specified and can have up to a maximum of 70 characters. If the text name contains blanks, then you must put it in quotes as a literal. It can also be specified via a symbol. All further parameters of the INCLUDE command are optional. If they are missing, SAPscript uses default values for them which are based on the respective call environment.
    Examples:
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE ‘E’ PARAGRAPH ‘A1’
    The text with the name MYTEXT and the language E is included, regardless of in which language the calling text is created. The paragraph format A1 is valid as the standard paragraph for this call.
    Optional specifications:
    •&#61472;LANGUAGE If a language is not specified, the language of the calling text or the layout set is set for the text to be included. If a language is specified, the text is always loaded in this language, regardless of the language of the calling text.
    •&#61472;PARAGRAPH The text to be included is formatted with the style allocated to it. With this parameter, the standard paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are then formatted with the paragraph specified here.
    •&#61472;NEW-PARAGRAPH The first line of the included text has this format flag, provided it is not a command or comment line. If the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are formatted with the paragraph np specified with
    NEW-PARAGRAPH.
    •&#61472;OBJECT To specify a text completely, you must make further specifications regarding the text object. There are different rules and restrictions for this which depend on the object type of the calling text: All texts can be included in a layout set. If no object is entered here, TEXT is used (standard texts).With a documentation text (object DOKU), you can only include documentation texts. This object is assumed even if no object is specified in this environment. Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT specification is missing, DSYS is set as a default value.
    Only standard text (object TEXT), documentation text or hypertext can be included in any other type of text. The default object is TEXT if nothing is entered.
    •&#61472;ID The text ID, which allows further text types within an object, is a further part of the text key. If the ID is not entered, the default Include ID from table TTXID is used for the calling text. If the specification is not in this table, the text ID of the calling text is used.
    The ID together with the object are now the basis of a further consistency check:
    •&#61472;All text IDs are allowed for a layout set.
    •&#61472;Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and documentation texts which have the same text ID as the calling documentation text may be included in documentation texts.
    •&#61472;All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts to be inserted may only have IDs TX and UO.
    •&#61472;Standard texts with all the allowed text IDs, DSYS texts with all IDs, and documentation texts with Ids TX and UO may be included in the other types of texts.
    Regards,
    Santosh

  • About the interface web oracle database express edition

    Hi
    I want execute a export from web interface I click on link "data" I choose the object table and after I click on link "download" but the file export at format csv contain only the lines which I see on the interface web .
    is it possible to export all rows of the table object in CSV file ?
    think

    There are many ways to skin that cat, i.e. just using sqlplus and spooling to a file:
    set pagesize 0 verify off feedback off linesize 500 trimspool on
    spool filename.csv
    select <col1> || ',' || <col2>[|| ','||<colN>] as csvout from <table>;
    spool off
    If there are date (or any of the timestamp) datatypes you'll want to be specific about the output format, i.e. use to_char( <col>, 'yyyymmdd hh24:mi:ss')...
    Also may want to have [var]char column values wrapped in single quotes, just add them in- i.e. ...''''||<col>||'''' it takes two single quotes inside a literal to get one in the output.
    There will still be some stuff in the spool file needing cleanup, like the 'spool off' command and an echo of the SQL if you're running sqlplus interactively, don't think there's any way to turn off that echo. 'set echo off' doesn't do it as one would think.
    Edited by: clcarter on Oct 31, 2012 10:31 AM
    nix the headings comment

  • Why does this work? (dmenu_run shell script...)

    I'm very confused at what this is doing. dwm knowledge would help to understand my question. I don't understand how this script can take a font name with a space in it, the way dwm's default config does, and understand it as one argument.
    #!/bin/sh
    exe=`dmenu_path | dmenu ${1+"$@"}` && exec $exe
    Before updating to a newer version of dmenu (where this is included), I had written my own dmenu_run script. Although I wrote it, I actually don't understand how this one worked either. It was a trial and error thing, and when I try to think it through I always conclude that it shouldn't work.
    #!/bin/bash
    IFS="\t" # (was actually a literal tab character in my script)
    `dmenu_path | dmenu $*`
    This does not work without redefining $IFS, so I figured that dwm is not somehow making sure that spaces are interpretted correctly. But by stopping spaces from separating arguments, shouldn't this cause huge problems for everything except the font name?
    An example of how this would be called by dwm:
    dmenu_run -fn -*-dejavu sans-medium-r-normal-*-12-*-*-*-*-*-*-*
    (Note the space in the font name)
    So what is going on here? I realize that my question is somewhat confusing. I'm happy to clarify anything that is confusing - I found it very hard to clearly ask this question.
    Last edited by fflarex (2008-11-07 05:06:24)

    First off, sorry for all the shell-speak. This is a bit of an edge case, so it's sort of unavoidable. That said, I'll summarize what you need to know at the end.
    The dwm version of the script uses $@ in double quotes. @ contains all the parameters passed to the shell, just like * does. The main useful difference is a special case: when double-quoted, $@ expands to the list of arguments, each as a single shell word. Double-quoted $* expands to the list of arguments as a single word delimited by $IFS. (Both variables expand to the list of arguments [with word splitting applied according to $IFS, hence your spaces problem] when unquoted.) Here's the logic flow:
    1. dwm calls dmenu_run with the list of arguments specified in your config.h. It calls it directly, not running a command through a shell, so word splitting is never performed and spaces in values don't matter.
    2. dmenu_run calls dmenu with the list of arguments it was given. It uses two shell tricks: first, quoted-@ to pass the list of arguments without word splitting. Second, the ${foo+bar} expansion syntax, which expands to bar if foo is defined, otherwise the null string (""). So it expands to the full list of arguments, each as a single word, only if arguments were passed (if $1 is defined).
    What you need to know: You almost always want to use '"$@"'. Unless you want all your arguments as a single string, in which case you want '"$*"'. Other forms are practically useless.
    Last edited by skymt (2008-11-07 14:26:58)

  • Sapscript Control Commands

    Dear All,
                in Sapscript Control Command  there is one command
                INCLUDE .
                Pls explain it.

    Hi Kapoor,
    <b>INCLUDE: </b>To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    <b>Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]
    [NEW-PARAGRAPH np]
    </b>
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
              o Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
              o In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
              o Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
              o In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    All text IDs are allowed in a form.
    In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    0: the text include was successful.
    1: the command could not be executed because it contained syntax errors.
    2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    4: the specified text could not be found.
    <b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you by taking their  time.
    Thanks,
    Vinay

  • Unable to print all the terms and conditions pages in the PO.

    Reqt: The PO includes terms and conditions as the last page.
    Currently the program only prints out the first page of the Terms and Conditions regardless if it is one or two pages.
    Only one page(image) is displaying in the last page of smartform.
    These terms and conditions pages are passing as graphics(images), We are passing the GRAPHICS under the TABLES Main Area in LAST page WINDOW.
    But only one page (image) is displaying, but not others.
    Can anyone help to solve the above issue.
    Regards,
    Kishore

    you can create your terms n condition texts in SO10(standard text). THEN
    If u r using smartform then do this:
    goto the general attributes of a text element. From the drop down menu, convert the text type to include text.
    The just as in read_text fm pass the parameters
    text name, text object, text id and language.
    Every thing will be handled automatically
    AND if its a sap script then:
    To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    Syntax:
    /: INCLUDE name OBJECT o ID i LANGUAGE l PARAGRAPH p
    NEW-PARAGRAPH np
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    u2022 LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    u2022 PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    u2022 NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    u2022 OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
    o Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
    o In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
    o Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
    o In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    u2022 ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    u2022 All text IDs are allowed in a form.
    u2022 In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    u2022 In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    u2022 Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    u2022 0: the text include was successful.
    u2022 1: the command could not be executed because it contained syntax errors.
    u2022 2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    u2022 4: the specified text could not be found.
    Once you define the standard text in SO10 you can include text by the above process or use the function module read_text:
    .............IN Smartform.......
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    id =
    language =
    name =
    object =
    ARCHIVE_HANDLE = 0
    LOCAL_CAT = ' '
    IMPORTING
    HEADER =
    tables
    lines = i_tab
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8
    So you want to know how get the parametrs right. This is how"
    In SO10 goto goto menu -> header
    here u will find all the required parametrs.
    The text lines will be returned in the i_tab.
    U can loop at this itab and display the data.
    Reward points if hepful.

  • Verify a String is a String

    This may appear to be a trivial question. I want to ascertain a String is a String. I thought of using a string method on a variable passed into a function and catch the exception. I have done quite a bit of searching around Java Platform SE 7. This seems like a strange thing to do and I have thought of testing everything else and if they fail it has to be a string but I would like something specific.

    832844 wrote:
    Edit: ok, it looks like you are trying to write some kind of parser here. You might be asking if the String looks like a Java String constant (i.e. it starts and ends with a double-quote). Is that what you want?I am asking if I have been provided a String that looks like a Java String constant. So I test if I have an int through parseInt and catch exception, same with float, and finally check if it is a String. Otherwise, return false.Ok, for the rest of this post I'll assume that variable is of type String and has been verified to not be null.
    This means that variable is-a String. There's no way around it. The question is if the information contained in that String can be interpreted as a floating-point literal, an integer literal or a String literal.
    Since floating-point literals and integer literals are everyday things, Java provides simple method to interpret them and you already use them.
    String literals as such are not so common in everyday use. Therefore Java doesn't provide a simple method to interpret them.
    You could use a regex to check if a given String "looks like" a String literal:
    String variable = nextToken();
    boolean isStringLiteral=variable.matches("\\\"([^\"]|\\\\\\\")*\\\");
    {code}
    If I didn't mis-type this, it should check if your variable starts and ends with a double-quote and contains no un-quoted double-quotes (there are ugly details that this regex doesn't handle, such as an un-quoted double-quote after a quoted backslash character, but it's just a demonstration).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Give some functionlity of standard text

    hi guru
    please tell me  functionlity of standard text,where exactly it use.
    thanks
    subhasis

    we use standard text for scripts and smartforms.......
    You can insert standard texts, texts of the online documentation, and hypertext modules into your document. You can insert texts directly and include them by reference.
    When inserting text directly, the text is inserted in the editor in formatted form. You can then edit it further.
    Inserting Standard Text
    Choose Insert ® Text ® Standard.
    The dialog window for inserting text appears.
    Enter the text name, the text ID, and the language. To insert the text directly, select Expand immediately.
    Choose Continue.
    There are two ways to format texts with forms:
    In the standard SAPscript text processing (Tools ® Word processing ® Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
    For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
    To include the contents of another text into the current text, use the INCLUDE control command. SAPscript still treats the text to be included as a separate text. The text is copied over only at the point at which the output is formatted.
    Thus the use of the INCLUDE command always ensures that the most current version of a text is included into the output, since the text is not read and inserted until the output is formatted.
    Syntax:
    /: INCLUDE name
    You must specify the name of the text to be inserted. It can be up to 70 characters long. If the name of the text contains spaces, then you must enclose it in quotes as a literal value. You can, alternatively, specify the name via a symbol. All remaining parameters in the INCLUDE command are optional. If an optional parameter is not specified, then SAPscript uses default values as applicable for the calling environment.
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'
    The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call.
    Optional parameters:
    LANGUAGE
    If this parameter is not specified, then the language of the calling text or the form language are used for the text to be included. If the language is specified, then the text will be fetched in this language, regardless of the language of the calling text.
    PARAGRAPH
    The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.
    NEW-PARAGRAPH
    The first line of the text to be included will be given this format indicator, as long as it is not a comment or command line. If the optional PARAGRAPH parameter (see above) is not specified, then all *-paragraphs of the included text will also be formatted using the paragraph specified in the NEW-PARAGRAPH command.
    OBJECT
    In order to completely specify a text, information about the text object is also required. There are a number of restrictions and other rules that depend on the object type of the calling text:
    Any kind of text can be included in a form. If no object is specified, then TEXT will be used (standard texts).
    In the case of a document text (DOKU object), you can include only document texts. This object type is also assumed if no object is specified in this environment.
    Only hypertexts and document texts can be included in a hypertext (DSYS object). If the OBJECT parameter is missing, then DSYS is used as the default value.
    In the other kinds of text you can include only standard texts (TEXT object), document texts or hypertexts. If there is no specification, then the default object is TEXT.
    ID
    The text ID is a part of the text key, which permits further text objects within a given object. If no ID is specified, then the default include ID is used from the TTXID table for the calling text. If there is no entry in this table, then the text ID of the calling text is used.
    The following consistency check is applied both to the ID and the object:
    All text IDs are allowed in a form.
    In document texts, only document texts may be included that have text IDs TX (general texts) or UO (authorization objects) and also other document texts with the same text ID as the calling document text.
    In DSYS texts, all DSYS texts can be included, whatever ID they have. Document texts to be included must have one of the IDs TX or UO.
    Into the other texts, standard texts with any allowable text ID, DSYS texts with all IDs, and document texts with the IDs TX and UO can be included.
    The INCLUDE command returns a status code in the SAPSCRIPT-SUBRC symbol:
    0: the text include was successful.
    1: the command could not be executed because it contained syntax errors.
    2: the rules governing the text to be included were not followed (see above).
    This value cannot occur if the command is used in a SAPscript form.
    4: the specified text could not be found.
    reward points if helpful

Maybe you are looking for

  • Trouble creating a PDF/x-3:2002 in Indesign 6

    I am trying to create a pdf for Blurb.com (book printing online). I am using their plugin for Indesign which provides their specs for proper layout. I designed the book, got my client's approval and now that it's time to creat the pdf it holds up. Wh

  • SOFTWARE FOR LABVIEW 8.2

    Hello, I had labview 8.2 student version dvd but now i misplaced it , if you can help me to download labview 8.2 from website please give me the link to download 8.2 student version . My email address is [email protected] Thank You , Regards, Pooja S

  • Macbook Pro Retina upgrade questions.

    Hey guys, A warm hello. This is my very first post on the community, and i feel privildged to be here. Been an iPhone user since gen 1, now want to extend my love to MacBook Pro Retina. I am planning on getting the rMBP 15.5" 2.6Ghz, 16GB RAM, 256 Fl

  • Using flash for synchronization

    Hi, Flash does a great job at abstracting out data storage requirement across multiple browsers. But my concern is whether it provides data access synchronization. Lets say i've multiple tabs/windows loading the same swf file (loaded from the same do

  • Big Network

    Hi I want to calculate the paths from certain starting points in my network. The network (logical) has 3500000 edges and 52000 nodes. I am using the Java APIs but it doesn't even read the network and it throws memory exception. My RAM is 1G. Is it fe