Reading a record by key access.

Hi Gurus,
           In 'read table' for reading a record by key access they have used 'comparing' , 'transporting' , 'assigning'.
Can you please explain me what exactly the above will happen with an clear example.
Thanks,
Prabu S.

mostly you wont need these
but still: from documentation:
READ TABLE - transport_options
Syntax
... [COMPARING { {comp1 comp2 ...}|{ALL FIELDS}|{NO FIELDS} }]
    [TRANSPORTING { {comp1 comp2 ...}|{ALL FIELDS} }] ... .
Effect:
The addition COMPARING compares the specified components comp1 comp2 ... (or the subareas or attributes thereof) in a found
line before they are transported with the corresponding components of the work area. If ALL FIELDS is specified, all components
are compared. If no NO FIELDS is specified, no components are compared. If the content of the compared components is
identical, sy-subrc is set to 0. Otherwise it is set to 2. The found line is assigned to the work area independently of the result of
the comparison.
If the addition TRANSPORTING is specified, only the specified components comp1 comp2 ... (and their subareas) in the found line
are assigned to the corresponding components of the work area (or their subareas). If ALL FIELDS is specified, all the
components are assigned.
COMPARING must be specified before TRANSPORTING. The components comp1 comp2 ... are specified according to the rules in
the section Specifying Components. This is subject to the restriction that after TRANSPORTING, attributes of classes cannot be
addressed using the object component selector, and after COMPARING, this is only possible as of release 6.10.

Similar Messages

  • Read each record in an Access Database using PowerShell

    I have a fix database that I need to read each record and compare it to an issue. I'm having some issues just reading each record in the specific table, when i run the below code i just get the first entry over and over again. If somone could point me in
    the correct direction on how to read each record it would really help me out.
    $adOpenStatic = 3
    $adLockOptimistic = 3
    $objConnection = New-Object -com "ADODB.Connection"
    $objRecordSet = New-Object -com "ADODB.Recordset"
    $objConnection.Open("Provider = Microsoft.ACE.OLEDB.12.0; Data Source = C:\temp\Fix.mdb")
    $objRecordset.Open("Select * From Fix_Information", $objConnection, $adOpenStatic, $adLockOptimistic)
    $i = 0
    do {
    $objRecordSet.Fields.Item("FixName").Value
    $objRecordSet.MoveNext | Out-Null
    $i++
    while ($i -le $objRecordSet.RecordCount)
    $objRecordSet.Close()
    $objConnection.Close()

    I haven't tested this, but it looks like you're just missing the parentheses after the MoveNext method name:
    $objRecordSet.MoveNext() | Out-Null

  • MDM API to read the Record Key Mapping table

    Hi,
    Does anybody know what class/method I can use to read the Record Key Mapping table?
    For the Business Partner table the Key Mapping table has this columns:
    <u>Default / MDM Partner ID / Remote System / Key</u>
    I have everything but the Key. How can I read it?
    Thanks in advance,
    Diego.

    GetKey Mapping is one of the available Web Services as of SP4.
    Else you could use the Java API to get the Key Mapping.
    <b>CatalogData class</b> has the following method
    <b>GetKeyMapping</b>
    public java.lang.String[][] GetKeyMapping(java.lang.String agency,
                                              java.lang.String table,
                                              int[] recordIDs,
                                              boolean isDefaultKeyOnly)
                                       throws StringExceptionRetrieves the key mapping for each record.
    Parameters:
    agency - the agency name.
    table - the table name.
    recordIDs - the list of records.
    isDefaultKeyOnly - True to retrieve only the default value, False to all key values.
    Returns: the key values for each record.

  • Error while updating a record in MS Access

    Im new to coldfusion and am running into a problem while
    trying to update a record in a MS Access table.
    I have a MS Access table where the primary key is a
    auto-number long integer field named jobid.
    I have an edit form where info can be changed then saved. A
    hidden form field named jobid holds the records primary key field
    value for the record being edited. When submitted this is what
    happens:
    I use a basic SQL UPDATE statement but I get the error "Data
    type mismatch in criteria expression"
    Some code:
    <cfset nJobId=Int(Val(FORM.jobid))>
    *dont know if i need the above line but using #FORM.jobid#
    in the WHERE clause below didnt work either
    <cfquery datasource="lrs">
    UPDATE jobs SET
    status='#FORM.status#',
    offer='#FORM.offer#',
    postdate="#CreateODBCDate(FORM.postdate)#",
    jobtype=#FORM.jobtype#,
    jobtitle='#FORM.jobtitle#',
    ..etc...
    WHERE jobid=#nJobId#
    The WHERE clause is where the error occurs with "Data type
    mismatch in criteria expression"
    After a few times with that i changed the where clause to
    simply "WHERE jobid=1" as this record id does exist, but it has the
    same error.
    I then tried changing the where clause to
    WHERE jobid=<cfqueryparam cfsqltype="cf_sql_bigint"
    value="#FORM.jobid#">
    and there it "appears" to work, but the record is not
    actually updated. No changes are made to the table though no error
    is thrown.
    Im missing something here... why wont the record update
    ?

    The data type mismatch isn't necessarily in your where
    clause. I'm guessing that it's the quotes around the create
    odbcdate function.
    use of cfqueryparam will solve a lot of these problems for
    you.

  • Reading Hashtable Record

    Hello,
    How read 10th records of Hash internal table? Please guide me with syntax.

    Hello Anil
    You cannot read a hashed table using an index. If you loop over a hashed table sy-tabix is undefined. Hashed tables are basically accessed using their<b> key fields</b>.
    The following sample report shows how to realize your requirement which, however, is not reasonable using hashed tables.
    *& Report  ZUS_SDN_HASHED_TABLE
    REPORT  zus_sdn_hashed_table.
    TABLES: kna1.
    TABLES: knb1.
    TYPES: BEGIN OF ty_s_customer.
    TYPES:   bukrs    TYPE bukrs.
    TYPES:   kunnr    TYPE kunnr.
    TYPES:   anred    TYPE anred.
    TYPES:   name1    TYPE name1_gp.
    TYPES: END OF ty_s_customer.
    TYPES: ty_t_customer  TYPE HASHED TABLE OF ty_s_customer
                          WITH UNIQUE KEY bukrs kunnr.
    DATA:
      gd_idx         TYPE i,
      gs_customer    TYPE ty_s_customer,
      gt_customer    TYPE ty_t_customer.  " hashed table
    PARAMETERS:
      p_bukrs    TYPE bukrs  DEFAULT '1000'.
    START-OF-SELECTION.
      SELECT * FROM  vf_debi INTO CORRESPONDING FIELDS OF TABLE gt_customer
             WHERE  bukrs  = p_bukrs.
      "  READ TABLE gt_customer INTO gs_customer INDEX 10.  " not allowed
      gd_idx = 0.
      LOOP AT gt_customer INTO gs_customer.
        "   NOTE: sy-tabix is undefined
        ADD 1 TO gd_idx.
        IF ( gd_idx = 10 ).
          WRITE: / gd_idx, gs_customer-kunnr, gs_customer-name1.
          EXIT.
        ENDIF.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe

  • Read statement with repeated key field

    Hi Experts ,
    We  are in the process of UCCHECK in an upgrade program and come across an issue with read statement using repeated key fields which is not allowed in a unicode compatable environment.
                READ TABLE it_vbpa WITH KEY
                                          vbeln = l_vbeln
                                          parvw = '0'
                                          parvw = 'ZN'.
    I checked this in 4.6c environment and observed that the Read statement uses the last key value for reading and doesnt consider other values even if the last value is not present in the table  .
    I want to know if I can use only that last value for read statement ? If so, what was the use of the repeated key fields in a read statement?
    Thanks and Regards
    Sanu

    Hi,
    Your main aim in a upgrade would be to successfully replicate the 4.6x functionalities in the ECC 6 version with the unicode checks. So it would be a safe option to only consider the last key condition. I dont have access to a 4.6C environment. May be it was a mistake corrected by SAP in the new version.
    Vikranth

  • IC-AX412 MP3 recorder: can't "access" M2 card

    IC-AX412 MP3 recorder: can't "access" M2 card. That about says it all. The recorder works fine until I insert the Sandisk 8GB M2 card, at which point everything stops and the message "Accessing" appears on the display, won't go away, and I have to shut down the recorder and take out hte batteries. AND there is no way to UN-write-protect a Sandsk M2 card. How do I find out where th problem is?

    Thank you for the prompt reply. I finally figured it out. The problem isn't the card or the recorder; It's Sony's moronic refusaal to accommodate Apple computers. I'm on a Mac. Does the software that came with the IC recorder run on any non-Windows computer? No, it does not, although the tech I chatted with on your website was unaware of that fact. He was unaware that any app with a name ending in ".exe" won't run on a non-Windows computer.
        The card was brand new and unformatted. I inserted it, got the results I described and didn't know what to do, So I read the manual and found the note about formatting the card using the recorder. That claearly was a non-starter, so I plugged the recorder with the card still in it into the Mac. Both card and recorder appeared onscreen as individual volumes. I opened the Mac Disk Utility and formatted both of them.  Problem solved. Redorder now recognizes card.
    Thanks for all your help, guys.
    yours,
    Birck Cox

  • JDBC sender: after read insert records into another table

    Hi all,
    I send records from a SQL view (not a table) to RFC via proxy method.
    After reading a record from the view I would like to move this record to a database table called CHECKED. Can anyone provide me a solution for this or is this impossible. (there are 6 fields that have to be inserted in DB CHECKED after reading: admin, bukrs, dagbknr, bkstnr, datum, regel)
    Can I use an INSERT statement in my Update SQL Statement with variables or do I have to create an SP?
    Hope someone can help me out of here...
    Thanks in advance!
    Wouter.

    ur strucutre would of:
    <root>
    <Satement1>
    <TableName action=”INSERT”>
    <table>checked</table>
    <access>
    <admin>val</admin>
    <bukrs>val</bukrs>
    <dagbknr>val</dagbknr>
    <bkstnr>val</bkstnr>
    <datum>val</datum>
    <regel>val</regel>
    </access>
    </dbTableName>
    </StatementName1>
    </root>
    or u can use a SQL DML which wud pose a strucutre similar to
    <root>
      <stmt>
        <Customers action="SQL_DML">
          <access> INSERT CHECKED SET admin=’$admin$’, bukrs=’$bukrs$', dagbknr=’$dagbknr$’, bkstnr=’$bkstnr$', datum=’$datum$’, regel.=’$regel.$'
          </access>
        </Customers>
      </stmt>
    </root>
    for more inputs refer to <a href="/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 link on jdbc</a>

  • Read statement with duplicate key fields

    Hello,
    I have an internal table(EKBE) with 8 fields
    ebeln ebelp vgabe gjahr belnr budat wrbtr refkey
    populating the first 7 fields from EKBE table with VGABE = 2 and PO#, concatenating the WRBTR and GJAHR to get the Refkey and passing this to the 8th field.
    Using this refkey, getting the document numbers from BKPF.
    I am looping another internal table into a work area and reading the above internal table by passing the ebeln field and I am doing some calculations ,etc.
    A custom table is getting updated from the above work area.
    The issue is-
    The internal table EKBE can have the same PO numbers with the same line item numbers but with different ref key's.
    So, when I am reading the int. tab, it is reading only one record, since I have no other key's to read except EBELN. So for one PO# it is reading only 1 ref key, I cannot use the line item# as a key, as the line item#'s never match, even if they match they could be same PO# with same line item# and different ref key.
    Any inputs highly appreciated.
    Regards,
    Kiran

    Loop on EKBE Internal table as well to fetch all entries of PO. Use Parallel cursor to optmize performance.
    http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPCodeforParallelCursor-Loop+Processing

  • ADF BC How to read a record from database in a bean

    Due to the problem I have in this thread Re: Inserting multiple rows programmatically got unique key error I need a work around. One work around is checking whether a record is exist in database prior to insert/commit. This can be achieve whether reading the record and if found that it exists or there is function that I can call to check whether a record is exist. Please note that the search criteria (read criteria) is a combination of two fields.
    Thanks.

    It's kind of unproductive to open a new thread, as we now need to keep track of two threads.
    If you korean a new thread you should provide all info to understand the problem, the jdev version you use and the user case. All this info is missing in this thread, but given in the other thread. Conclusion is that we should continue in the other thread.
    Timo

  • XSU: Reading each record at a time

    I am using XSU12 to retrieve database contents in XML format. I am passing the Connection and ResultSet objects to create OracleXMLQuery object. I want to read each record at a time and so setting the maxRows to 1 and then getting the xmlstring.
    code looks like...
    qry =new OracleXMLQuery(connection,resultset);
    qry.setMaxRows(1);
    xmlString = qry.getXMLString();
    I keep this in a loop and read each record at a time. The problem is whenever getXMLString() method is called, the application is hitting the database, which will be a performance issue.
    Is there any way to read contents of a table at once and then loop each record at a time without hitting the DB everytime?
    Kishore
    null

    public static char readChar() {
    int ch;
    char r = '\0';
    boolean done = false;
    while (!done) {
    try {
    ch = System.in.read();
    r = (char) ch;
    if (r == '\r') {
    System.out.println("Not a character. Please try again!");
    System.in.skip(1);
    done = false;
    } else {
    System.in.skip(2);
    done = true;
    } catch (java.io.IOException e) {
    done = true;
    return r;
    Try this as an method and then use it..
    This code will read will be in response untill you hit the return key but will take only the first character....

  • Read table itab with key

    Hi,
    Unfortunately i've been almost a year out of abap,so its kinda rusty, so pls bear with my question. I've to develop this upload program, which would read from file, but the catchy part is that to filter out the records by either pernr, bukrs, subty or any of the criteria simultaneously. I'm using select-options for  pernr, subty, bukrs, but the problem is how do i filter it out, what sort of logic/ algorithm should i be using, READ TABLE itab WITH KEY or a LOOP statement, could any 1 give any suggestions as to how i should be designing the logic. please advise

    Hi
    You want to upload data from a file on the basis of some criteria.
    In this case I think you need to upload all the data from the file to an internal table.
    Now the internal table contains all the data from the file.
    then filter the data from that table on the basis of PERNR, BUKRS or SUBTY.
    Like Below:
    delete ITAB where PERNR not in S_PERNR (S_PERNR is your select option).
    similarly for SUBTY or BUKRS.
    Or if you want all these 3 fields together then use OR condition.
    Like:
    delete ITAB where PERNR not in S_PERNR  OR
    delete ITAB where PERNR not in S_SUBTY OR
    delete ITAB where PERNR not in S_BUKRS.
    the above code will delete all the data from ITAB where the data doesn't match with the entries in S_PERNR, S_SUBTY and S_BUKRS.
    I hope this will work for you,
    If you didn't get it then post your code.
    Thanks
    LG

  • WHY WON'T STICKY KEYS ACCESSABILITY WORK ON SAFARI/

    WHY WON'T STICKY KEYS ACCESSABILITY FEATURE WORK ON SAFARI? I AM A DOUBLE AMPUTEE AND THIS FEATURE REALLY HELPS ME.
    RANDY

    Do us all a favor, and unlock your Cap keys.  It's considered yelling, and it's a real turn-off for those looking to help posters here.

  • How do I read uncommitted records of another session

    HI
    How do I read uncommitted records from another session in Oracle
    Thanks
    Ashwin

    Ashwin,
    Oh I might as well add my thoughts on this as it is kinda an important subject. I'm sort of a different kind of programmer where there have been several times I have wanted to see the changed results that another session is doing. I agree that the rest of the sessions should not be able to SEE the changes until they are committed. HOWEVER, as some examples show below, I don't see why a custom package can't be developed to allow a different session to be able to query the changed data for a particular SID, or even begin issuing DML commands of their own on this changed data to help change it further.
    In reality, there is no reason why a single (and I emphasize single) session is the only one who can see the changed data. It's the other user sessions that really should wait until all the necessary changes are complete before others can see the changed information. There isn't much point in me trying to explain this in great detail, but overall YES other users should wait until the changes are committed, but NO I do think I should be able to connect to another SIDs sessions and be able to view/perform operations on this changed data.
    There are more than enough examples of why others should wait before changes are committed (which I agree), but as some of these real life examples point out, there is a need to let more than a single session perform such changes, each of which need to see each other's changed data.
    No I am no expert on transaction processing (Andrew knows more for sure), but I've done enough to know as a developer I have a number of times wanted to be able to access/monitor another sessions uncommitted data. I think some records might be viewable using committed AUTONOMOUS_TRANSACTION records, but I've yet to really try it out much.
    Examples where one wants to see others uncommitted data
    (+) Say I want to change a hundred / thousand / million tables for a task. Each of these tables require joins/lookups to see each others data (including the changed records). I'm not going to want to do this with one session. Why can't 10 or a 100 sessions be created to allow complex DML operations to be performed to accomplish a given task. It's like thinking of there is 1 session doing this task, but on the oracle side, there are a unlimited number of SIDs processing (100 sqlplus scripts running), all being able to see the uncommitted data. Once everything is done, then the rest of the sessions can see this information.
    (+) A process is running and is changing records, and I want to monitor its progress or even assist it it's getting behind.
    (+) A real life example I just remembered was a soccer game done overseas where a time zone problem allowed people to still be able to place bets even after the game was over (they still paid people even though they knew the final score which was nice of them). In this case yes a process should have been stopped from allowing bets/inserts to continued, but having a second (or more) processes being able to KNOW for certain that another session is inserting data when it shouldn't be, this is can be stopped. And yes once again you can say one can monitor the sga for the appearance of inserts and stop it and yes remove the insert privs from that user after a certain time (come to think of it that wouldn't have worked since the time was off). But yes a whole slue of other things could have been done to stop this process from recording this information. However, NOT being able to select data from that table where the inserts were going into, until its toooooooooo late, is a real problem. Being able to see uncommitted information is very important if it needs to be stopped.
    Overall I do think there should be something considered to allow to a session to be able to see what data another session is doing, but it's more on the side from administration of the data and the performance required to get a task done, even if it means sharing uncommitted changes between sessions.
    Tyler D.

  • Invalid leaf record count, keys out of order?

    Yesterday I returned home from a month long trip which I did not bring my 13 inch 2011MacBook Pro on.
    I plugged it in and turned it on, and connected my phone to it so i could retrieve some photos. I looked away and looked back to see the grey  "You must hard shut down your computer" error message. Possibly because i think the phone may have been disconnected without being properly ejected? So i turned it off and then later the next day, when I try to turn it on it is stuck on the white apple loading screen forever. When I startup with Command+R and enter disk utility, it tells me:
    Invalid Leaf record count, keys out of order, volume could not be repaired. When I startup in single user mode and use fsck -fy it tells me the same.
    I got it used less than a year ago. I have some pretty heavy applications like MS Office, Photoshop and a few other adobe applications, and The Sims 3.
    Help!

    When Disk Utility can't repair a hard drive, with an error like that, many buy Disk Warrior to do the repair. You can see an answer on the Disk Warrior site here.
    Or, if you have a system backup, erase the hard drive (I would probably do a secure erase and write zero's to the hard drive) and restore it.

Maybe you are looking for

  • ORDImageSignature Invalid data type in Oracle 8i

    hi there, i have just started working on Intermedia, i am using Oracle 8i. i have configured the intermedia and executed the ordwebutl.sql file. all othe media data types are working perfectly like, ORDAudio, ORDImage,ORDVideo, but the ORDIMageSIgnat

  • Why is not every song available in every country??? It's annoying

    Ilive in Denmark and I wanted to buy "On my Mind" By Cody Simpson and "Skyscraper" By Demi Lovato, but they are not availeble in my country !!!!

  • RH8 Map ID Problem

    I've been renaming topics (including file names) and may have made a mess of the map file. I've found problems like this: How do I delete all but the first Map ID? Is there any way to know which topics are not mapped? Is there any way to know which t

  • Conditional format in Matrix report

    Hi all, I have the column wise matrix output which I am require to put some highlight on the entire row if the condition meet. The output will be something like this :- Name ____________JOB A______JOB B _______JOB C AAAA____________2___________2_____

  • Updated to IOS6 on my iPad 2. Now I do not get sound with YouTube videos. Anyone know a fix?

    Ever since I updated my IOS to six I have not been able to get sound when playing YouTube videos in the safari browser. Does anyone know of a fix for this?