Field value in the query

hi folks,
I have an issue related to the name field which I am using in a query. it goes like this
select * from csks
           where kokrs = 'BMC '
           and BUKRS = '0100'
           and GSBER = '0100'
           and Name2 = ' O' Donell Simon '.
The name has an apostrophe if I take that apostrophe out the query is giving sy-subrc =4 and if I include it gives a syntax error.
The name is O' Donell Simon
How can I fix it?
Thanks,
SK

Hi,
Check this..
DATA: V_NAME LIKE CSKS-NAME2.
V_NAME = 'O'' Donell Simon'.  " I have given two single quotes.
select * from csks
where kokrs = 'BMC '
and BUKRS = '0100'
and GSBER = '0100'
and Name2 = v_name.
Thanks,
Naren

Similar Messages

  • How can I add form field value to the file name in save as dialog box

    I do not want the form to be saved automatically, just want the form to auto populate the "file name" only.
    A little background on the forms I want to use:  My company has 70 retail outlets, I'll use one of our pdf forms called an "Incident Report" as an example.  I would like for a store manager to be able to complete the form, then email the form to the main office (I already have javascript to add field values and form name to the email subject line), once the main office receives it, I want for them to be able to file the pdf electronically on our server.  We have mutliple forms that we use so I do not want any of the forms to automatically save anywhere, (at this time anyway) I just want the office personnel to be able to click "save as" (or whatever they will need to click) and the form automatically add certain field values from the pdf they have received, of which will be different each time the form is sent to the office (Date, store #, employee name etc.) in addition to the name of the form in the "File name" of the "Save As" dialog box.  The main office employees will decide into which server file the pdf should be saved.
    I'm using Acrobat 8 professional, the stores and office personnel use Adobe reader.
    One little note:  We currently print and file a lot of paper on a daily bases, as soon as I can get this to work, we are going green.
    Me and a lot of trees in this will really apprecitate any help you can give with this!  :-)

    You might want to take a look at the document "Developing Acrobat Applications Using JavaScript" (js_developer_guide.pdf) which is part of the Adobe Acrobat SDK, which can be downloaded here. Read the "Privileged versus non-privileged context" (p. 45ff.). You will find an example for "Executing privileged methods in a non-privileged context". Should be almost exactly what you are looking for.
    Small Outline: For security reasons ("the user always has to know what's going on") you are not allowed to use the "Doc.saveAs"-method without the user permission (--> in a non-privileged context). In order to reach the goal of a privileged context you can use a trusted function. You do this by creating a JavaScript file (*.js) in either the Application-JavaScript-Folder (default location on Windows systems: "%ProgramFiles%\Adobe\Acrobat 10.0\Acrobat\Javascripts") or the User-JavaScript-Folder (default location on Windows systems: "%AppData%\Adobe\Acrobat\10.0\JavaScripts"). Add the following content to the new file:
    myTrustedBrowseForDoc = app.trustedFunction( function ( oArgs ) {
         app.beginPriv();
              var myTrustedRetn = app.browseForDoc( oArgs );
         app.endPriv();
         return myTrustedRetn;
    myTrustedSaveAs = app.trustedFunction( function ( doc, oArgs ) {
         app.beginPriv();
              var myTrustedRetn = doc.saveAs( oArgs );
         app.endPriv();
         return myTrustedRetn;
    The developer guide actually wants you to add this content to the existing "config.js" file. I recommend creating a new file, since its easier to deploy in a network. Either way, every client/user who needs to be able to save documents this way, needs this JavaScript Code in his Application/User-JavaScript-Folder.
    Within the Acrobat Document, which you want to obtain a certain file name, you can now use the trusted functions "myTrustedBrowseForDoc" and "myTrustedSaveAs" to store the file. To call the trusted functions and deliver the file name you can either you use a form field (button) or you add a new menu item. Add the following JavaScript Action to the button/menu item and change "Roller Coaster" to the name of the field which contains the value which you want to become the new file name:
    var fileName = this.getField("Roller Coaster").valueAsString;
    try {
         var oRetn = myTrustedBrowseForDoc({bSave: true, cFilenameInit: fileName + ".pdf"});
         try {
              myTrustedSaveAs(this, { cPath: oRetn.cPath, cFS:oRetn.cFS });
         catch(e) {
              console.println("Save not allowed, perhaps readonly.");
    catch(e) {
    console.println("User cancelled Save As dialog box");
    Good Luck!

  • CHAR's value in the query but not in the report??

    Hi all,
    I loaded master data and crm transaction data from ODS to Cube. The data is in the cube but there is no value in my report when running it. EX: there are some CHARs in my report, I checked those CHARs have value in the query but it shows 'not assign' in my report when I run it. What happen?
    Thanks.
    J.

    Please see below text and also the sent link..
    If a navigation attribute is used in an aggregate, this aggregate has to be adjusted using a change run as soon as new values are loaded for the navigation attribute (when master data for the characteristic belonging to the navigation attribute is loaded.) This change run is usually one of the processes that are critical to the system performance of a production BW system. This is why, by avoiding using navigation attributes or not using navigation attributes in aggregates, you can improve the performance of this process. On the other hand, not using navigation attributes in aggregates can lead to poor query response times. The data modeler needs to find the right balance.
    http://help.sap.com/saphelp_nw04/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    cheers,
    Vishvesh

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How to get a field value in the report

    hi all :-
    i need to get the field value in the formate trigger inside a specified field in the report?

    please post your request in the report category forum

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • How can we hide the non key field values in the sm30 display

    hello experts,
    I have to protect the non key field values in the sm30 display , can u help me out wat changes i have to do in the layout.

    Hello Gopal,
    What do you mean by 'protecting' your non-key field value?
    1) You want to display it, but make it non-changeable
    A - Make the field as output-only in screen, as already answered by a preivous collegue
    2) You do not want to display this field at all
    A - Goto the DDIC definition of the view (not possible for a table directly), and maintain the required field as a Hidden. After activating, remember to re-generate the maintenance dialogue. Also, please maintain Event 21, in case you want to access/change the value of this field in background.
    3) You want to maintain special validations/checks for the field
    This can be easily done by introducing your modules within the CHAIN-FIELD commands in the PAI of the generated screens.
    Best Regards,
    Rekha

  • Reference field value in the F110 Payment document

    Dears
    We are running the automatic payment run for the vendor invoices posted.
    In each vendor invoice, we have filled the reference field, text field, etc.  However, while running the payment in F110, the system does not reproduce this reference field value in the payment document.  Hence we are not able to match the items for comparison.
    Have we left out any setting in FBZP or somewhere ?

    Hello,
    Apart from above suggestions, you can check linked invoices to payment document through below option.
    Open payment document in FB03, go to Menu->Environment->Payment usage
    This will list all invoices cleared through that payment document.
    If you are looking for tables, Pass payment document number , company code, year, account type and account to AGKO table and get the clearing date. Pass these details to BSAK and get list of cleared documents.
    AUGDT = Clearing date from AGKO
    AUGBL= Clearing document from AGKO
    and other details passed earlier.
    Hope this helps.
    Thanks,
    V V

  • Change field value in a table, based on another field value in the same row (for each added row)

    Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
    I am using this code :
    <HTML>
    <HEAD>
    <SCRIPT>
    function addRow(tableID) {
    var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    var row = table.insertRow(rowCount);
    var colCount = table.rows[0].cells.length;
    for(var i=0; i<colCount; i++ ) {
    var newcell = row.insertCell(i);
    newcell.innerHTML = table.rows[1].cells[i].innerHTML;
    switch(newcell.childNodes[0].type) {
    case "text":
    newcell.childNodes[0].value = "";
    break;
    case "checkbox":
    newcell.childNodes[0].checked = false;
    break;
    case "select-one":
    newcell.childNodes[0].selectedIndex = 0;
    break;}}}
    function deleteRow(tableID) {
    try {var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    for(var i=0; i<rowCount; i++) {
    var row = table.rows[i];
    var chkbox = row.cells[0].childNodes[0];
    if(null != chkbox && true == chkbox.checked) {
    if(rowCount <= 2) {
    alert("Cannot delete all the rows.");
    break;}
    table.deleteRow(i);
    rowCount--;
    i--;}}}catch(e) {alert(e);}}
    </SCRIPT>
    </HEAD>
    <BODY>
    <INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
    <INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
    <TABLE id="dataTable" width="350px" border="1">
    <TR>
    <TD width="32"></TD>
    <TD width="119" align="center"><strong>Activity</strong></TD>
    <TD width="177" align="center"><strong>Cost</strong></TD>
    </TR>
    <TR>
    <TD><INPUT type="checkbox" name="chk"/></TD>
    <TD>
    <select name="s1" id="s1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    </TD>
    <TD><input type="text" name="txt1" id="txt1"></TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • How to get the max value in the query??

    Plant  calday(mm.dd.yyyy)       Soldout.Qty
    0001   01.01.2005               10
    0001   01.02.2005               20
    0001   01.03.2005               05
    0001   01.04.2005               16
    0001   01.05.2005               10
    0001   01.06.2005               14
        From the above values , how can i findout Max(Soldout.Qty)(i.e 20) for the above week...Suppose present aggregation = summation...How can i findout the value in the Query??don't want to do changes to design...

    Hi Bhanu,
      I tried the calculation results as...Maximum,..
      But that will pick the maximum value among the avialable values..like
    plant1 max 10
    plant2 max 20
    plant3 max 30
    then it will show as..
    plant1 max 30
    plant2 max 30
    ...like this...but my case is
    plant1 calday1 10
    plant1 calday2 05
    plan1  calday7 08
    plant2 calday1 10
    plant2 calday2 05
    plan2  calday7 20
    so for each set it need to bring the maximum value...

  • Using item values in the query

    Hi,
    Is there a way I can use item values in the query...?
    as an example, something like this
    select a.*, :P20_CUST_NAME as CUSTOMER_NAME
    from
    table TEMP a;
    haven't tried it yet but want to get the feedback first before making an attempt...
    Thanks

    Yes, as long as that item has a value in session state..
    Thank you,
    Tony Miller
    Webster, TX

  • Restrict the values in the Query Designer

    Hi Guru’s,
    I want to Restrict PLANT or  SALES ORG  values in the Query Designer, in the Query, PLANT has selected in the rows and having variable and SALES ORG is display attribute of the PLANT. In this scenario How can we Restrict the values?
    Thanks in Advance,
    Ravi.

    Hi Ravi,
    You cannot restrict values on the display attributes. Better change it to navigational attribute and check the box as navigational in the cube.
    Regards
    Ram

  • Text Box Value in the Query Bind Parameter

    Hi
    I have to use text box value in the query bind parameter
    Thanks to help...

    Hi,
    - drag Execute with params
    - use EL
    Frank

  • How to add field value to the standard table

    Hi,
    How to add field value to the standard table?
    for example:
    when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.

    Hi Asif,
    I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
    If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
    Hope this is clear for u.
    Thanks,
    Vinod.

  • Add field value to the existing internal table.

    how to add a field value to the existing internal table.
    DATA: BEGIN OF ITAB occurs 0,
                 EBELN TYPE EKPO-EBELN,
                 EBELP TYPE EKPO-EBELP,
                 AEDAT TYPE EKPO-AEDAT,
                 amount(10) type c,
               END OF ITAB.
    select * from ekpo
           into corresponding fields of table itab.
    itab-amount = '2400'.
    loop at itab where ebeln eq 70 .
           write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
             endloop.
    here output is not showing the amount field value.
    please tell me how to solve this problem urgent
    thanks in advance.

    Hi Sekhar,
        First let me know wheather you are assigning some value to the amount field externally to all records? if this is wright means check the below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    v_amount = '2400'.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,v_amount.
    endloop.
    or if you want to modify perticular records in itab  then use below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    amount(10) type c,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    loop at itab.
    itab-amount = '2400'.
    modify itab index sy-tabix (or perticular line number).
    endloop.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
    endloop.
    Thanks,
    Suma.

Maybe you are looking for

  • Airport and a self-assigned IP address - can't access wireless net

    I have a strange issue with Airport picking up a wireless network. I'm not in my usual location using my MacBook Pro. There is a wireless network here. Airport sees it, and asks for the password (provided to me). Airport looks connected, but, I see t

  • Problems with word files in pages

    I have been able to open word documents in Pages on my MacBook Pro since I got iWork '09 last year. However, I have just purchased an 27in iMac, and I can no longer open word documents using Pages. Anybody have a similar experience, and if so, what's

  • Data Not Aggregated properly in the visualization

    Hi Experts, I have created a Simple BO Explorer report with a few facets and the automatic measure 'Occurrences'. The Facets Panel shows proper data. But when I have the Visualize Panel open it shows a different result. I am not sure why this happens

  • Ipod could not be restored....?!?

    I have been attempting to restore my ipod to factory settings, but I keep getting an unknown error, itunes then displays the following: The ipod could not be restored. An unknown error occurred (1418) is there any possible way of fixing this so I can

  • Problem in importing idoc structure into repository

    Hi experts, I am trying to import an IDOC structure (ORDRSP.ORDERS03) from an R/3 system into the repository. But I am getting the following error: "             **Ready for import** Import started... ORDRSP.ORDERS03:   + com.sap.aii.ibrep.sbeans.upl