Read table issue in method

Hi,
How can i read this table with where condition in OOPS? is it possible?
Give some idea how to proceed?
Inside method i have written like this.
ret is my return parameter.
code:
  Loop at me->s001_raw[] assigning <arr_s001>.
    read table ret[] with table key
            vkorg in me->select_parameters->SO_VKORG[]
        and ZZEMP in me->select_parameters->SO_empl[].
      assigning <arr_return>.
Thanks

Read will not work
May be you can try this way
Loop at me->s001_raw[] assigning <arr_s001>.
  loop at ret[] assigning <arr_return> where vkorg in me->select_parameters->SO_VKORG[]
                 and zzemp in me->select_parameters->SO_empl[].
    exit.
  endloop.
endloop.

Similar Messages

  • How to change "read table ......" sentense to OO method ?

    READ TABLE lt_origin_table  into lt_target_table
                 WITH KEY user_id= lt_target_table-user_id.
    This sentense is allowed in function module but can not be written in an OO method , so what can i do ?
    Now I use 2 loops ,
    Loop at lt_origin_table ....
       loop at lt_target_table
       endloop.
    endloop.
    The result is OK , but the performance is not good enough , can any one help me ?
    Regards .

    <b>Example  :</b>   Selection of a particular line in the internal table sflight_tab and assigning it to a field symbol <sflight>. After the line has been successfully assigned, the content of a component of the line is changed in the internal table.
    PARAMETERS: p_carrid TYPE sflight-carrid,
                p_connid TYPE sflight-connid,
                p_fldate TYPE sflight-fldate.
    DATA sflight_tab TYPE SORTED TABLE OF sflight
                     WITH UNIQUE KEY carrid connid fldate.
    FIELD-SYMBOLS <sflight> TYPE sflight.
    SELECT *
           FROM sflight
           INTO TABLE sflight_tab
           WHERE carrid = p_carrid AND
                 connid = p_connid.
    IF sy-subrc = 0.
      READ TABLE sflight_tab
           WITH TABLE KEY carrid = p_carrid
                          connid = p_connid
                          fldate = p_fldate
           ASSIGNING <sflight>.
      IF sy-subrc = 0 AND
         <sflight> IS ASSIGNED.
         <sflight>-price = <sflight>-price * '0.9'.
      ENDIF.
    ENDIF.
    reward  points if it is usefull ....
    Girish

  • Reading internal table issue?

    SELECT PERNR WERKS ABKRS BUKRS KOSTL ENAME GSBER FROM PA0001
                INTO TABLE GT_0001
                FOR ALL ENTRIES IN GT_0709
               WHERE PERNR = GT_0709-PERNR
                 AND ENDDA >= P_DATE
                 AND BEGDA <= P_DATE.
             READ TABLE GT_0001 INTO LS_0001 WITH TABLE KEY PERNR = LS_0709-PERNE
             IF SY-SUBRC = 0.
            CALL FUNCTION 'PA03_PCR_READ'
          EXPORTING
            F_ABKRS         = LS_0001-ABKRS
          IMPORTING
            F_CURRENT_BEGDA = GV_BEGINDATE
            F_CURRENT_ENDDA = GV_ENDDATE.
            ENDIF.
    IN THIS CODE WHILE READING THE INTERNAL TABLE IT IS SHOWING ERROR?
    PLEASE CORRECT THE CODE.
    REGARDS
    REDDY

    Hi,
    Please remove 'TABLE' keyword from your syntax.
    Check the datatype of field PERNR & PERNE. It shoud be same.
    Check the value which is in PERNE fied shoud be available in PERNR Field or not?
    Hope by this things you will be able to resolve issue.
    Regards,
    Narendra

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • Process and Forms - Issue with Method which Uses Imported Form Values

    We are doing a project to implement ESS and MSS. Using Adobe Process and Forms we generated a process with form and workflow.
    The workflow's first step uses a version of TS17900110 task to move the form to the workflow container.
    Binding:
    export:
    &FORM_STANDARD& @0E\QAssign Value@ @9T\QGets data for...@ &FORM&
    'USER_ID' @0E\QAssign Value@ @9T\QGets data for...@ &FORM_FIELD_NAME_1&
    'PERNR' @0E\QAssign Value@ @9T\QGets data for...@ &FORM_FIELD_NAME_2&
    'AWART' @0E\QAssign Value@ @9T\QGets data for...@ &FORM_FIELD_NAME_3&
    Binding
    import:
    &EMPL_USERID.OBJID& @9S\QReceives data from...@ @0D\QAssign Value@ &FORM_FIELD_VALUE_1&
    &PERNR& @9S\QReceives data from...@ @0D\QAssign Value@ &FORM_FIELD_VALUE_2&
    &AWART& @9S\QReceives data from...@ @0D\QAssign Value@ &FORM_FIELD_VALUE_3&
    The workflow is bringing values for: EMPL_USERID, PERNR, AWART.
    We need to write these field values to a table using a method.  We are using a custom task to do this.
    The task triggers a method which calls a FM which makes the update to the table.
    The step with the custom task is a foreground step which the workflow stops for so we can test execute it.
    When we execute there is a breakpoint in the ABAP code which stopps us at the point where the values are being read.
    We are trying to read values:  'USER_ID', 'PERNR', and 'AWART' but the debugger is not showing any values being brought in.
    The binding we currently have for the step we feel is the problem:
    This is all we have in there so far - NEED suggestions/advice:
    Binding export:
    &ZABSREQ&     @0E\QAssign Value@     @9T\QGets data for...@     &_WI_OBJECT_ID&
    (&ZABSREQ& - This is a BOR)
    Any information is appreciated.
    alicia.morante at gmail.com
    alicia.morante at us.army.mil
    Edited by: Alicia Morante on Jan 23, 2012 8:43 PM

    We were very anxious to solve this issue.
    While I was posting my counterpart realized that we did not have target containers setup to receive the values from the workflow.
    Once those were set the values were able to be read from the FM.
    Here's the binding updated to:
    &EMPL_NUM&     @0E\QAssign Value@     @9T\QGets data for...@     &EMPL_NUM&
    &SUBTYPE&     @0E\QAssign Value@     @9T\QGets data for...@     &SUBTYPE&
    Still gave you some points for helping - Thank you.

  • "Read table" and field symbols

    Hello all,
    I have a (hopefully simple) question. Let's suppose I want to do the following:
    loop at itab1 assigning <fs1>.
      read table itab2 assigning <fs2> with table key <fs1>-field1.
      if sy-subrc eq 0.
        move <fs2>-field1 to ls_out-field1.
      endif.
      read table itab3 assigning <fs3> with table key <fs1>-field2.
      if sy-subrc eq 0.
        move <fs3>-field1 to ls_out-field2.
      endif.
    endloop.
    It's also possible to do the following instead:
    loop at itab1 assigning <fs1>.
      unassign: <fs2>,
                <fs3>.
      read table itab2 assigning <fs2> with table key <fs1>-field1.
      read table itab3 assigning <fs3> with table key <fs1>-field2.
      if <fs2> is assigned.
        move <fs2>-field1 to ls_out-field1.
      endif.
      if <fs3> is assigned.
        move <fs3>-field1 to ls_out-field2.
      endif.
    endloop.
    My question is: is it "better" to check sy-subrc after each read, and then do a move statement within that if statement, or is it better to check whether the field symbol is assigned each time I want to fill in a field and read everything at the same time?
    I'm only really concerned about the case where you don't want to drop out of the loop after the read (so if the read fails you just don't fill any data in). I'm also discounting potential human error (otherwise the sy-subrc method wins hands-down).

    Just to close this one (albeit somewhat belatedly). I asked Harry Dietz (the ABAP Performance blogging fella) what he would suggest, and he says sy-subrc all the way. Checking that an integer is zero is considerably faster than checking for the assignment, or otherwise, of a field symbol. Furthermore, whilst the field symbol method has the potential to be faster than the sy-subrc method given some compiler optimizations, unfortunately these optimizations don't exist in the ABAP compiler - they're there in the Java compiler though! Shame really. Apparently the ABAP compiler is a pretty simple beast.
    Anyway - thanks Harry for clearing this one up!

  • Cdparanoia 004: Unable to read table of contents header

    Hi. I've been trying to rip wavs with grip but it was unable to locate any audio cd even though I could explore it from my desktop (xfce 4.10) and I am part of the optical group. Because of this, I tried running cdparanoia from the terminal.
    Running the next command: cdparanoia -vsQ displays the next warning:
    cdparanoia III release 10.2 (September 11, 2008)
    Using cdda library version: 10.2
    Using paranoia library version: 10.2
    Checking /dev/cdrom for cdrom...
        Testing /dev/cdrom for SCSI/MMC interface
            SG_IO device: /dev/sr0
    CDROM model sensed sensed: ASUS DVD-E616P3H 1.04
    Checking for SCSI emulation...
        Drive is ATAPI (using SG_IO host adaptor emulation)
    Checking for MMC style command set...
        Drive is MMC style
    004: Unable to read table of contents header
    Unable to open disc.  Is there an audio CD in the drive?
    if I try to listen a track from an external application like mplayer it won't play any audio but if I manually locate the audio and choose them an application to play, they will. Also, the hardware itself is functional since I ripped music from a debian squeeze (dvd) installation.
    Finally If it's useful, I used gvfs and exec ck-launch-session dbus-launch startxfce4 in my .xinitrc to mount usb and other devices automatically
    Thanks in advance

    You removed all mailboxes (.mbox files) located within this problem account named folder at Home > Library > Mail and the same occurs when re-launching Mail?
    The TableofContents file is a package file for a .mbox so it is hidden.
    I'm not sure how you removed all mailboxes for this account but quit Mail first and using the Finder, go to Home > Library > Mail > this POP account named folder (named by the user name and incoming mail server for the account). Move the account named folder to the Desktop.
    Launch Mail and if it launches successfully without locking up and quitting, a new account named folder will be created automatically by Mail within the account named folder.
    All email clients have limits and the recommended size limit for a Jaguar or Panther mailbox is 1GB and for Tiger Mail, 2GB.
    An "overstuffed" mailbox issue can occur at any mailbox size (which means the mailbox has some corruption and/or is over the recommended size limit) but is more likely to occur depending on the number and size of message attachments contained in a mailbox and especially as a Jaguar or Panther mailbox approaches or exceeds 1GB in size.
    Since an account's Inbox mailbox is usually the most active mailbox, it is not a good idea to use an account's Inbox mailbox as the final storage location for all received messages not deleted.

  • Read Only Issues

    Folks,
    Using EPM 2007 with SP2
    I have about 4 PM's that are having read only issue with some of their projects, this has just started to happen in the last month or so.
    I have sat with them and have gone over their save / checkin method and cannot find fault with what they are doing. As the Admin I can access, update checkin / out etc no problems.
    Checking in the "Clean Up Cache" the projects are registering "Not checked out".  In the "Open Folder" they have a Cache Status of Checkin Pending.
    Any suggestion greatly appreciated
    Many thanks
    Noel

    Hi Sujit
    Apologies for the delay, as per your direction all good now
    Regards
    Noel

  • Reading Tables in MS WORD using LabView & ActiveX

    I would like to be able to read tables contained in an MS WORD document using LabView and ActiveX. (I've been successful in doing this with Excel files.  ( I am not using the report generation toolkit.)  After searching numerous posts with similar questions about LV & ActiveX  I've not found any solution to my specific app.  In LabView I'm successful doing an "Automation Open", followed by a Property Node, to an Invoke Node ("Documents" Open) and then a Property Node with "TABLES" selected. That's where I get stuck. Now that I have a reference (?) to "Tables" I can't seem to figure out what I need to connect and follow that with in order to now read the Tables in my document.  I guess that's due to my lack of understanding as to what exactly this "Table" property node output actually is.  Can someone tell me what this reference output is referring to and how I can get to the Tables within the document from it?  I've tried connecting both a property node and invoke node to no avail.  Can someone point me in the right direction?
    Thanks. Ed

    Dear Ed,
    Figuring out "what I need to connect and follow that with" relates to the organization of the MS Word Object Model.  Please refer to the Word Object Model Reference MSDN >> MSDN Library >> Office Development >> 2007 Microsoft Office System >> Word 2007 >> Word 2007 Developer Reference >> Word Object Model Reference.  You can think of the Object Model as a software hierarchy.  You must start at the top of the hierarchy and work your way down to the item of interest.  You must descend the hierarchy one level at a time; you cannot skip levels.
    At each level of the hierarchy, you have access to the methods and properties of that "level".
    Click on the Tables Collection link from the Word Object Model Reference page.  Notice how Tables is at the top of the hierarchy.  When you have a LabVIEW reference to a Tables object (technically speaking a collection), you then have access to the methods and properties supported by this "level".  Click on the Tables Object Members link.  Here you will see that the Tables collection supports two methods, Add and Item, and also supports five properties, Application, Count, Creator, NestingLevel, and Parent.
    Notice how Mike gets the Count property of the Tables object.  He then uses the Item method to return a reference to an individual table.  The key thing to take away from this is how Mike uses the Item output node to gain access to the methods and properties of the Table object (not the Tables collection).  Mike has descended the hierarchy from Tables to Table.  He descends the hierarchy again with the Cell method and Range property of the Table and Cell object respectively.  Lastly, the Text property of the Range object, "Returns or sets the text in the specified range or selection."
    Effective LabVIEW programming with this type of ActiveX control requires a fair understanding of how Microsoft organized its software libraries.  The Object Model Reference is a good place to start visualizing how these libraries are organized.  Thank you for using the forums Ed, and thanks for your post, Mike.

  • Static internal table issue - Used in BI Extractor

    Hi,
      We are reading data from a table in to a static internal table and using this table for future lookups.
      Once in a while we can't find data while doing a lookup from this static internal table , But most of the time it works.
       Is it possible that data from this static internal table is removed due to memory issues during peak periods.
    Thanks in advance

    Here is the code and it is there in a function module.This function module is called from a different FM in a loop.
    TABLES: OIU_CM_MAT_PRCD.
      STATICS: i_mat_prcd LIKE OIU_CM_MAT_PRCD OCCURS 10 WITH HEADER LINE.
      DATA: ws_lines like sy-toccu.
      DESCRIBE TABLE i_mat_prcd LINES ws_lines.
      IF ws_lines = 0.
        SELECT * INTO TABLE i_mat_prcd
          FROM OIU_CM_MAT_PRCD.
        IF i_matnr > ' '.
          SORT i_mat_prcd BY matnr.
        ELSE.
          SORT i_mat_prcd BY majpd_cd pd_cd.
        ENDIF.
      ENDIF.
      IF i_matnr > ' '.
        READ TABLE i_mat_prcd WITH KEY matnr = i_matnr
           BINARY SEARCH.
        IF SY-SUBRC = 0.
          CHG_MAJOR = i_mat_prcd-MAJPD_CD.
          CHG_MINOR = i_mat_prcd-PD_CD.
          CONCATENATE i_mat_prcd-majpd_cd i_mat_prcd-pd_cd
             INTO chg_prod.
        ENDIF.    " i_matnr > blank

  • Oracle 11g - External Table Issue SQL - PL/SQL?

    Oracle 11g - External Table Issue?
    =====================
    I hope this is the right forum for this issue, if not let me, where to go.
    We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
    We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
    ======================
    Date1,date2,Political party,Name, ROLE
    20-Jan-66,22-Nov-69,Democratic,"John ", MMM
    22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
    20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
    9-Aug-72,20-Jan-75,Republican,Henry,MMM
    ALL NULL -- record
    20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
    ======================
    Our Expernal table structures is as follows
    CREATE TABLE P_LOAD
    DATE1 VARCHAR2(10),
    DATE2 VARCHAR2(10),
    POL_PRTY VARCHAR2(30),
    P_NAME VARCHAR2(30),
    P_ROLE VARCHAR2(5)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY P_EXT_TAB_D
    ACCESS PARAMETERS (
    RECORDS DELIMITED by NEWLINE
    SKIP 1
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    DATE1 CHAR (10) Terminated by "," ,
    DATE2 CHAR (10) Terminated by "," ,
    POL_PRTY CHAR (30) Terminated by "," ,
    P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
    P_ROLE CHAR (5) Terminated by ","
    LOCATION ('Input.dat')
    REJECT LIMIT UNLIMITED;
    It created successfully using SQL Developer
    Here is the issue.
    It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
    It is loading all NULL value record (Rec # 6)
    *** If we remove the '"' from input data, it loads all records including all NULL records
    Log file has
    KUP-04021: field formatting error for field P_NAME
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 2 rejected in file ....
    Our questions
    Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
    Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
    Any idea?
    Thanks in helping.
    Edited by: qwe16235 on Jun 11, 2011 11:31 AM

    I'm not sure, but maybe you should get rid of the redundancy that you have in your CREATE TABLE statement.
    This line covers all fields:
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    {code}
    So I would change the field list to:
    {code}
    DATE1 CHAR (10),
    DATE2 CHAR (10),
    POL_PRTY CHAR (30),
    P_NAME CHAR (30),
    P_ROLE CHAR (5)
    {code}
    It worked on my installation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Read table  binary search

    Hi all,
    Can i use raed table binary search for Hased tables? I coded like this
    DATA:T_MODEL_HASH LIKE HASHED TABLE OF T_MODEL
    WITH UNIQUE KEY PBPINO  WITH HEADER LINE.
    READ TABLE t_model_hash WITH KEY pbpino = t_zwpbph-pbpapino
        BINARY SEARCH.
    But iam getting syntax error "cannot use explicit or implicit index operations on hased tables ".can any one let me know about this issue?

    Hi Priya,
    Hashed tables are managed by a hash algorithm. There is no logical index. The entries are not ordered in the memory. The position of a row is calculated by specifying a key using a hash function.
    A hashed table's performance in reads is NOT dependent on the number of records. However, it is intended for reads that will return only and only one record. It uses a "side-table" with a hash algorithm to store off the physical location of the record in the actual internal table. It is not NECESSARILY sorted/organized in an meaningful order (like a sorted table is). Please note that changes to a hashed tables records must be managed carefully.
    Please check this link to understand how to use hash table.
    http://help.sap.com/saphelp_erp2004/helpdata/en/fc/eb362c358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Ferry Lianto

  • USMM: Database error reading table TUMRES

    Dear Experts,
    i want to make an export to LAW file with SAP program RSLAW_PLUGIN.
    In some of the systems the export (by downloading a file) works but in this ECC 6.0 the result is an error message:
    Database error reading table TUMRES
    Message no. BV103
    The message contains no other information.
    Knows anybody a solution for this error?
    For any answers i would be very happy.
    Thanks and best regards
    Michael

    Hi All,
    I am having similar issue, As mentioned above TUMRES is empty in SE 16.
    I have rerun the measurement but background job is cancelling with
    28.11.2014 09:48:27 Job cancelled after system exception ERROR_MESSAGE  00           564          A
    Thanks
    Sam

  • How to read table fields form a table  having length of 7 characters

    HI all,
    could you please tell me how to read table fields from a table having length 7 characters, i have requirement that in my ztable i have 30 fields out of which 20 fields are location fields, i want to select 20 fields which have 7 characters length.
    please could any body suggest me on this issue.
    thanks,
    sre.

    hi,
    try like this
    create a data variable of type i as
    data: len type i.
    create internal table for 20 fields as
    data:begin of itab,
               fld 1 type .......
            end of itab.
    data:itab type itab1 occurs 0 with header line.
    loop at itab2. // original internal table which all fields.
    read table itab2 with index sy-tabix.
    len = strlen (itab2-fld).
    if len eq 7.
          move itab2 itab1.
          append itab1.
    endif.
    endloop.
    if helpful reward some points.
    with regards,
    Suresh.A

  • Replacemnt for read table with key binary search

    as read table with
    READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
               WITH KEY gs_FS_EINA_KEY  BINARY SEARCH.
    the statement read tabel with key is absolute in ecc 6 so how to replace it .

    Hi subratt,
    internal tables with header lines are obsolete and in oo context (CLASS / METHOD code) forbidden.
    OK, you'd better use SORTED TABLE and FIELD-SYMBOLS to gt optimal code::
    READ TABLE gt_INT_CURR_VALUE into gs_int_curr_value
    WITH KEY gs_FS_EINA_KEY BINARY SEARCH.
    may be replaced with
    DATA:
      gt_INT_CURR_VALUE_SORTED LIKE SORTED TABLE OF  gs_int_curr_value
        WITH [NON-]UNIQUE KEY <fields of  gs_FS_EINA_KEY>.
    FIELD-SYMBOLS:
      <nt_curr_value> LIKE gs_int_curr_value.
    gt_INT_CURR_VALUE_SORTED = gt_INT_CURR_VALUE.
      READ TABLE gt_INT_CURR_VALUE_SORTED ASSIGNING <nt_curr_value>
        WITH TABLE KEY <key1> = gs_FS_EINA_KEY-<key1> ..  <keyn> = gs_FS_EINA_KEY-<keyn>.
    Regards,
    Clemens

Maybe you are looking for

  • Function module is not working properly in background

    Hi  all, i have used one Function module 'PRICING' in user exit SAPMV45A to calculate pricing for sales order. i am using BAPI_SALESORDER_CHANGE to change the sales order pricing.         when i run the program in foreground, all condition records fo

  • Pulling images out of an iDVD slideshow

    Stemming from another question I posted on the Powerbook G4 board, I have a question regarding an iDVD slideshow. My Powerbook's hard drive, I have a sinking feeling, is dead. My iDisk was full and I was getting ready to buy more storage space when t

  • Custom Column header in MDX

    Hi guys, I am trying to fill MDX query result to a datatable. When i fill datatable column header like [Dim Date].[Day].[Day]. I need it Log Date. Is there any way to change column header ? I mean, in TSQL we using select firstName [User] from users

  • Recover Database Package Object

    Hi, i accidently replace my package in my schema on last friday, how i gonna recover it back? my company is running a full backup of the database, and do not open up flashback function in that database. How I just recover only one object without caus

  • Running Forms on Jakarta Tomcat

    Does any on had experience or knows whether Oracle Forms can run on Apache's Jakarta Tomcat server? Another question is whether can client-server system runs long with web-based forms server.?