Internal Table with Oracle's Error Codes

Hi,
Is there any internal table where is stored every oracle error code with it's Cause, Action and all the other similar stuff?
Att,

For a table of all "ORA-" error codes and messages, you could do something like:
<BR>
create type t_oracle_error is object (
error_num varchar2(9),
error_desc varchar2(1024)
create type t_oracle_error_tab is table of t_oracle_error;
create or replace function OracleErrors return t_oracle_error_tab pipelined is
  l_error t_oracle_error := t_oracle_error(null,null);
begin
  for errNo in reverse -32799..0 loop
    l_error.error_num := errNo;
    l_error.error_desc := sqlerrm(errNo);
    if l_error.error_desc not like '%Message % not found;%' and l_error.error_desc != 'ORA'||to_char(errNo,'FM09999')||': ' then
      pipe row(l_error);
    end if;
  end loop;
  return;
end OracleErrors;
select * from table(oracleerrors);
SQL> select * from table(oracleerrors);
ERROR_NUM ERROR_DESC
0         ORA-0000: normal, successful completion
-1        ORA-00001: unique constraint (.) violated
-17       ORA-00017: session requested to set trace event
-18       ORA-00018: maximum number of sessions exceeded
-19       ORA-00019: maximum number of session licenses exceeded
-20       ORA-00020: maximum number of processes () exceeded
-21       ORA-00021: session attached to some other process; cannot switch session
-22       ORA-00022: invalid session ID; access denied
-23       ORA-00023: session references process private memory; cannot detach session
-24       ORA-00024: logins from more than one process not allowed in single-process mode
-25       ORA-00025: failed to allocate
-26       ORA-00026: missing or invalid session ID
-27       ORA-00027: cannot kill current session
-28       ORA-00028: your session has been killed
-29       ORA-00029: session is not a user session
-30       ORA-00030: User session ID does not exist.
-31       ORA-00031: session marked for kill
-32       ORA-00032: invalid session migration password
-33       ORA-00033: current session has empty migration password
-34       ORA-00034: cannot  in current PL/SQL session
-35       ORA-00035: LICENSE_MAX_USERS cannot be less than current number of users
-36       ORA-00036: maximum number of recursive SQL levels () exceeded
-37       ORA-00037: cannot switch to a session belonging to a different server group
-38       ORA-00038: Cannot create session: server group belongs to another user
-50       ORA-00050: operating system error occurred while obtaining an enqueue
-51       ORA-00051: timeout occurred while waiting for a resource
-52       ORA-00052: maximum number of enqueue resources () exceeded
-53       ORA-00053: maximum number of enqueues exceeded
-54       ORA-00054: resource busy and acquire with NOWAIT specified
-55       ORA-00055: maximum number of DML locks exceeded
-56       ORA-00056: DDL lock on object '.' is already held in an incompatible mode
-57       ORA-00057: maximum number of temporary table locks exceeded
-58       ORA-00058: DB_BLOCK_SIZE must be  to mount this database (not )
-59       ORA-00059: maximum number of DB_FILES exceeded
-60       ORA-00060: deadlock detected while waiting for resource
-61       ORA-00061: another instance has a different DML_LOCKS setting
-62       ORA-00062: DML full-table lock cannot be acquired; DML_LOCKS is 0
-63       ORA-00063: maximum number of LOG_FILES exceeded
-64       ORA-00064: object is too large to allocate on this O/S (,)
-65       ORA-00065: initialization of FIXED_DATE failed
-66       ORA-00066: LOG_FILES is  but needs to be  to be compatible
-67       ORA-00067: invalid value  for parameter ; must be at least
-68       ORA-00068: invalid value  for parameter , must be between  and
-69       ORA-00069: cannot acquire lock -- table locks disabled for
-70       ORA-00070: command  is not valid
-71       ORA-00071: process number must be between 1 and
-72       ORA-00072: process "" is not active
-73       ORA-00073: command  takes between  and  argument(s)
-74       ORA-00074: no process has been specified
-75       ORA-00075: process "" not found in this instance
-76       ORA-00076: dump  not found
-77       ORA-00077: dump  is not valid
-78       ORA-00078: cannot dump variables by name
-79       ORA-00079: variable  not found
-80       ORA-00080: invalid global area specified by level
-81       ORA-00081: address range [, ) is not readable
-82       ORA-00082: memory size of  is not in valid set of [1], [2], [4]
-83       ORA-00083: warning: possibly corrupt SGA mapped
-84       ORA-00084: global area must be PGA, SGA, or UGA
-85       ORA-00085: current call does not exist
-86       ORA-00086: user call does not exist
-87       ORA-00087: command cannot be executed on remote instance
-88       ORA-00088: command cannot be executed by shared server
-89       ORA-00089: invalid instance number in ORADEBUG command
-90       ORA-00090: failed to allocate memory for cluster database ORADEBUG command
-91       ORA-00091: LARGE_POOL_SIZE must be at least
-92       ORA-00092: LARGE_POOL_SIZE must be greater than LARGE_POOL_MIN_ALLOC
-93       ORA-00093:  must be between  and
-94       ORA-00094:  requires an integer value
-96       ORA-00096: invalid value  for parameter , must be from among
-97       ORA-00097: use of Oracle SQL feature not in SQL92  Level
-99       ORA-00099: timed out while waiting for resource, potential PDML deadlock
-100      ORA-00100: no data found
-101      ORA-00101: invalid specification for system parameter DISPATCHERS
-102      ORA-00102: network protocol  cannot be used by dispatchers
-103      ORA-00103: invalid network protocol; reserved for use by dispatchers
-104      ORA-00104: deadlock detected; all public servers blocked waiting for resources
-105      ORA-00105: dispatching mechanism not configured for network protocol
-106      ORA-00106: cannot startup/shutdown database when connected to a dispatcher
-107      ORA-00107: failed to connect to ORACLE listener process
-108      ORA-00108: failed to set up dispatcher to accept connection asynchronously
-111      ORA-00111: not all servers started because number of servers is limited to
-112      ORA-00112: only created up to  (maximum specified) dispatchers
-113      ORA-00113: protocol name  is too long
-114      ORA-00114: missing value for system parameter SERVICE_NAMES
-115      ORA-00115: connection refused; dispatcher connection table is full
-116      ORA-00116: SERVICE_NAMES name is too long
-117      ORA-00117: value out of range for system parameter SERVICE_NAMES
-118      ORA-00118: value out of range for system parameter DISPATCHERS
-119      ORA-00119: invalid specification for system parameter
-120      ORA-00120: dispatching mechanism not enabled or installed
-121      ORA-00121: SHARED_SERVERS specified without DISPATCHERS
-122      ORA-00122: cannot initialize network configuration
-123      ORA-00123: idle public server terminating
-124      ORA-00124: DISPATCHERS specified without MAX_SHARED_SERVERS
-125      ORA-00125: connection refused; invalid presentation
-126      ORA-00126: connection refused; invalid duplicity
-127      ORA-00127: dispatcher  does not exist
-128      ORA-00128: this command requires a dispatcher name
...

Similar Messages

  • Getting error of Defining an internal table with header line, SELECT-OPTIO

    Hi all,
    i have a coding for my smart form,In this coding i have define an structure which being used,but when i execute it it give me
    error of Defining an internal table with header line, SELECT-OPTIONS, and RANGES is not allowed within a structure.Even tough you can see that in  my coding im not using SELECT-OPTION or RANGES,but can't understand why it gives me this error.
    Following are the code:
      DATA: BEGIN OF traptab OCCURS 50.
            INCLUDE STRUCTURE mseg.
      DATA: vgart LIKE mkpf-vgart,
            blart LIKE mkpf-blart,
            blaum LIKE mkpf-blaum,
            bldat LIKE mkpf-bldat,
            budat LIKE mkpf-budat,
            cpudt LIKE mkpf-cpudt,
            cputm LIKE mkpf-cputm,
            aedat LIKE mkpf-aedat,
            usnam LIKE mkpf-usnam,
            tcode LIKE mkpf-tcode,
            xblnr LIKE mkpf-xblnr,
            bktxt LIKE mkpf-bktxt,
            frath LIKE mkpf-frath,
            frbnr LIKE mkpf-frbnr,
            wever LIKE mkpf-wever,
          END OF traptab. 
    Thanks & Regards,
    sappk25

    thanks

  • How to create an dynamic internal table with the structure of a ddic table

    Hi all,
    I want to fill ddic-tables (which I already created) in my abap dictionary with data out of CSV-files (which are located on the CRM-Server).  The ddic tables have different amount of fields.
    I started with creating a table which contains the name of the tables and the path to the matching CSV-file.
    At the beginning I'm filling an internal table with part of this data (the name of the ddic-tables) - after that I am looping at this internal table.
    LOOP AT lt_struc ASSIGNING <lfs_struc>.
         LOOP AT lv_itab1 INTO lv_wa1 WHERE ztab_name = <lfs_struc>.
         lv_feld = lv_wa1-zdat_name.
        ENDLOOP.
        CONCATENATE 'C:\-tmp\Exportierte Tabellen\' lv_feld INTO lv_pfad.
        Do.
        OPEN DATASET lv_pfad FOR INPUT IN TEXT MODE ENCODING NON-UNICODE IGNORING CONVERSION ERRORS.
        READ DATASET lv_pfad INTO lv_rec.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        enddo.
        REPLACE ALL OCCURRENCES OF '"' IN lv_rec WITH ''.
        SPLIT lv_rec AT ';' INTO TABLE lt_str_values.
        INSERT into (<lfs_struc>) values lr_str_value.
        CLOSE DATASET lv_pfad.
    endloop.
    This is not the whole code, but it's working until
    SPLIT lv_rec AT ';' INTO TABLE lt_str_values.
    I want to split all the data of lv_rec into an internal table which has the structure of the current ddic-table, but I didn't find out how to do give the internal table the structure of the ddic-table. In the code I used an internal tyble type string but I should be the structure of the matching tabel.
    If I try to create an internal table by using a fiel symbol, I am told, that the data types are not matching.
    Has anyone an idea?

    Hi Mayari,
    though you were successfull with
    METHOD cl_alv_table_create=>create_dynamic_table
    I must warn you not to use it. The reason is that the number of tables created is limited, the method uses GENERATE SUBROUTINE statement and this triggers an unwanted database commit.
    If you know the DDIC structure, it is (starting with ECC6.0) much easier:
    field-symbols:
      <table> type standard table.
    data:
      lr_data type ref to data.
    Create data lr_data type table of (<DDIC structure>).
    assign lr_data->* to <table>.
    The split code can be simplified gaining speed loosing complexity not loosing functionality.
    field-symbols:<fs_s> type any.
    field-symbols:<fs_t> type any.
    SPLIT lv_rec AT ';' INTO table it_string.
    loop at it_string assigning <fs_s>.
      assign component sy-tabix of wa_string to <fs_t>.
    if sy-subrc = 0.
      <fs_t> = <fs_s>.
    endif.
    at last.
      append <fs_itwa3> to <ft_itab3>.
    endat.
    endloop.
    Though it may work as Keshav.T suggested, there is no need to do that way.     
    Regards,
    Clemens

  • Import from database an internal table with generic Type : Web Dynpro ABAP

    Hi everyone,
    i have a requirement in which i'm asked to transfer data flow between two frameworks, from WD Component to another. The problem is that i have to transfer internal tables with generic types. i used the import/ export from database approache but in that way i get an error message saying "Object references and data references not yet supported".
    Here is my code to extract a generic internal table from memory.
        DATA l_table_f4 TYPE TABLE OF REF TO data.
      FIELD-SYMBOLS: <l_table_f4> TYPE STANDARD TABLE.
      DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
      DATA: ls_indx TYPE indx.
      lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      lo_componentcontroller->fire_vh_search_action_evt( ).
      ASSIGN l_table_f4 TO <l_table_f4>.
    *-- Import table for Help F4
      IMPORT l_table_f4 TO <l_table_f4> FROM DATABASE indx(v1) TO ls_indx ID 'table_help_f4_ID'.
    The error message is desplayed when last instruction is executed " IMPORT l_table_f4...".
    I saw another post facing the same problem but never solved "Generic Type for import Database".
    Please can anyone help ?
    Thanks & Kind regards.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • How to pass internal table with data in ABAP OO

    Hi experts ,
    Here is the problem...
    I create a screen 100 and use the internal table to get data from database, and then press the button on screen 100 , it will call screen 200.
    I use ABAP OO code in screen 200, and i want to keep the internal table with data that i get from the sceen 100 parts, but it seems that it just supports to create a new internal table and get data from database in ABAP OO. That means i need to create a new table to save the data in internal table ? Or there is any other solution something like exporting or memory id ...
    ps . the internal table in screen 100 is declared in global area, the beginning of the code.
    Please give me some advice, thanks a lot!
    Regards ,
    Claire

    I have already know how to do, here is my code:
    METHODS fill_tree importing itab2 like itab1.
    CALL METHOD: me->fill_tree exporting itab2 = itab1.
    In METHOD fill_tree,
    declare
    data: itab3 TYPE STANDARD TABLE OF itab,
    itab3[] = itab1[].
    It is useful to me, thanks a lot.

  • Excel data transfer into SAP internal table with GUI_UPLOAD

    hi all,
      i m using SRM4 system and i wanted to develop one report which will upload data from excel and convert it into IT.
    i know that many threads are posted on this topic.
    but my requirement is slight different. in the system only one function module is available that is "GUI_UPLOAD" and we want that user shd not save file as tab delimited before calling this fm. instead, program shd take care of all these things...
    please suggest something asap..
    helpful ans will be rewarded..
    thanks,
    jigs.

    Dear Jigs,
    Please go though the following lines of code:
    D A T A D E C L A R A T I O N *
    TABLES: ANEP,
    BKPF.
    TYPES: BEGIN OF TY_TABDATA,
    MANDT LIKE SY-MANDT, " Client
    ZSLNUM LIKE ZSHIFTDEPN-ZSLNUM, " Serial Number
    ZASSET LIKE ZSHIFTDEPN-ZASSET, " Original asset that was transferred
    ZYEAR LIKE ZSHIFTDEPN-ZYEAR, " Fiscal Year
    ZPERIOD LIKE ZSHIFTDEPN-ZPERIOD, " Fiscal Period
    ZSHIFT1 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 1
    ZSHIFT2 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 2
    ZSHIFT3 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 3
    END OF TY_TABDATA.
    Declaration of the Internal Table with Header Line comprising of the uploaded data.
    DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
    INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
    DATA: END OF IT_FILE_UPLOAD.
    S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME,
    BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B2,
    END OF BLOCK B1.
    E V E N T : AT S E L E C T I O N - S C R E E N *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    PROGRAM_NAME = SYST-REPID
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    STATIC = 'X'
    MASK = '.'
    CHANGING
    FILE_NAME = P_FNAME
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Upload Excel file into Internal Table.
    PERFORM UPLOAD_EXCEL_FILE.
    Organize the uploaded data into another Internal Table.
    PERFORM ORGANIZE_UPLOADED_DATA.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    *& Form UPLOAD_EXCEL_FILE
    text
    --> p1 text
    <-- p2 text
    FORM UPLOAD_EXCEL_FILE .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FNAME
    I_BEGIN_COL = 1
    I_BEGIN_ROW = 3
    I_END_COL = 7
    I_END_ROW = 32000
    TABLES
    INTERN = IT_FILE_UPLOAD
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " UPLOAD_EXCEL_FILE
    *& Form ORGANIZE_UPLOADED_DATA
    text
    --> p1 text
    <-- p2 text
    FORM ORGANIZE_UPLOADED_DATA .
    SORT IT_FILE_UPLOAD BY ROW
    COL.
    LOOP AT IT_FILE_UPLOAD.
    CASE IT_FILE_UPLOAD-COL.
    WHEN 1.
    WA_TABDATA-ZSLNUM = IT_FILE_UPLOAD-VALUE.
    WHEN 2.
    WA_TABDATA-ZASSET = IT_FILE_UPLOAD-VALUE.
    WHEN 3.
    WA_TABDATA-ZYEAR = IT_FILE_UPLOAD-VALUE.
    WHEN 4.
    WA_TABDATA-ZPERIOD = IT_FILE_UPLOAD-VALUE.
    WHEN 5.
    WA_TABDATA-ZSHIFT1 = IT_FILE_UPLOAD-VALUE.
    WHEN 6.
    WA_TABDATA-ZSHIFT2 = IT_FILE_UPLOAD-VALUE.
    WHEN 7.
    WA_TABDATA-ZSHIFT3 = IT_FILE_UPLOAD-VALUE.
    ENDCASE.
    AT END OF ROW.
    WA_TABDATA-MANDT = SY-MANDT.
    APPEND WA_TABDATA TO IT_TABDATA.
    CLEAR: WA_TABDATA.
    ENDAT.
    ENDLOOP.
    ENDFORM. " ORGANIZE_UPLOADED_DATA
    In the subroutine --> ORGANIZE_UPLOADED_DATA, data are organized as per the structure declared above.
    Regards,
    Abir
    Don't forget to award points *

  • Use of internal table with hearerline in ABAP OO

    Hi,
    I have a very basic question regarding the use of Internal table with headerline in ABAP OO.
    I consider the concept of Internal table with header as one of the most features of ABAP, which is not there in any of the other porgramming languages.
    I accept that OO's concept is one of the most powerful and a very good concept. We should also implement OO's concept in ABAP.
    But my concern is why in the process of moving to OO's the concept of Internal table with headerline is no more used.
    Can any one tell me the main reason for this. Is there any technical reason for this. By this i mean anything to do with memory or effeciency.
    Thanx,
    Srinivas

    Hi Srinivas,
       here is something more which i found about the same
    follow this link
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5ac31178-0701-0010-469a-b4d7fa2721ca
    and search for header line.
    it says:
    Tables with header lines not allowed
    Only tables without header lines can be declared in ABAP Objects.
    Error message in ABAP Objects if the following syntax is used:
    DATA itab TYPE LIKE TABLE OF ... WITH HEADER LINE.
    Correct syntax:
    DATA: itab TYPE LIKE TABLE OF ... ,
    wa LIKE LINE OF itab.
    Reason:
    It depends on the statement whether the body or header line of a table is accessed. The table name should identify the table uniquely. Programs are easier to read. Tables with header lines do not improve performance.
    i hope this will help you.
    regards,
    Kinshuk
    PS mark helpful answers

  • Internal table with Import and Export

    Hi All,
    Hi all
    Please let me know the use of <b>Internal table with Import and Export parameters and SET/GET parameters</b>, on what type of cases we can use these? Plese give me the syntax with some examples.
    Please give me detailed analysis on the above.
    Regards,
    Prabhu

    Hi Prabhakar,
    There are three types of memories.
    1. ABAP MEMORY
    2. SAP MEMORY
    3. EXTERNAL MEMORY.
    1.we will use EXPORT/ IMPORT TO/ FROM MEMORY-ID when we want to transfer between ABAP memory
    2. we will use GET PARAMETER ID/ SET PARAMETER ID to transfer between SAP MEMORY
    3. we will use EXPORT/IMPORT TO/FROM SHARED BUFFER to transfer between external memory.
    ABAP MEMORY : we can say that two reports in the same session will be in ABAP MEMORY
    SAP MEMORY: TWO DIFFERENT SESSIONS WILL BE IN SAP MEMORY.
    for ex: IF WE CALL TWO DIFFERENT TRANSACTIONS SE38, SE11
    then they both are in SAP MEMORY.
    EXTERNAL MEMORY: TWO different logons will be in EXTERNAL MEMORY.
    <b>Syntax</b>
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    On a screen, you link fields to parameters in the Screen Painter. When you define the field attributes of an input field, you can enter the name of an SPA/GPA parameter in the Parameter ID field in the screen attributes. The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event.
    When an input field is linked to an SPA/GPA parameter, it is initialized with the current value of the parameter each time the screen is displayed. This is the reason why fields on screens in the R/3 System often already contain values when you call them more than once.
    When you call programs, you can use SPA/GPA parameters with no additional programming overhead if, for example, you need to fill obligatory fields on the initial screen of the called program. The system simply transfers the values from the parameters into the input fields of the called program.
    However, you can control the contents of the parameters from your program by using the SET PARAMETER statement before the actual program call. This technique is particularly useful if you want to skip the initial screen of the called program and that screen contains obligatory fields.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    Saving Data Objects in Memory
    To read data objects from an ABAP program into ABAP memory, use the following statement:
    Syntax
    EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.
    This statement stores the data objects specified in the list as a cluster in memory. If you do not use the option FROM <f i >, the data object <f i > is saved under its own name. If you use the FROM <g i > option, the data objet <g i > is saved under the name <f i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    Check this link.
    http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
    Thanks,
    Susmitha.
    Reward points for helpful answers.

  • Internal table with Dynamic and Non dynamic fileds

    Hi Experts,
    How to get the internal table with Dynamic and Non-Dynamic Fields.
    Could u please help me.
    Thanks,
    Varun

    Hi,
       Execute the below sample code or analyze it there is appropriate description provided.
    *& Report  ZTEST_PRM_DYN_ALV
    REPORT  ZTEST_PRM_DYN_ALV.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
    <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
    it_fldcat type lvc_t_fcat.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_flds(5) type c.
    selection-screen end of block b1.
    start-of-selection.
    *build the dynamic internal table
    perform build_dyn_itab.
    *write 5 records to the alv grid
    do 5 times.
    perform build_report.
    enddo.
    *call the alv grid.
    perform call_alv.
    *Build_dyn_itab
    form build_dyn_itab.
    data: new_table type ref to data,
    new_line type ref to data,
    wa_it_fldcat type lvc_s_fcat.
    *Create fields .
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = 'name1'.
    wa_it_fldcat-datatype = 'mara-matnr'.
    wa_it_fldcat-intlen = 5.
    append wa_it_fldcat to it_fldcat .
    *clear wa_it_fldcat.
    wa_it_fldcat-fieldname = sy-index.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 5.
    append wa_it_fldcat to it_fldcat .
    do p_flds times.
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = sy-index.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    append wa_it_fldcat to it_fldcat .
    enddo.
    *Create dynamic internal table and assign to FS
    call method cl_alv_table_create=>create_dynamic_table
    exporting
    it_fieldcatalog = it_fldcat
    importing
    ep_table = new_table.
    assign new_table->* to <dyn_table>.
    *Create dynamic work area and assign to FS
    create data new_line like line of <dyn_table>.
    assign new_line->* to <dyn_wa>.
    endform.
    *Form build_report
    form build_report.
    data: fieldname(20) type c.
    data: fieldvalue(5) type c.
    data: index(3) type c.
    field-symbols: <fs1>.
    do p_flds times.
    index = sy-index.
    *Set up fieldvalue
    concatenate 'FLD' index into
    fieldvalue.
    condense fieldvalue no-gaps.
    assign component index of structure <dyn_wa> to <fs1>.
    <fs1> = fieldvalue.
    enddo.
    *Append to the dynamic internal table
    append <dyn_wa> to <dyn_table>.
    endform.
    *CALL_ALV
    form call_alv.
    data: wa_cat like line of alv_fldcat.
    *clear wa_cat.
    wa_cat-fieldname = 'matnr'.
    wa_cat-seltext_s = sy-index.
    wa_cat-outputlen = '10'.
    append wa_cat to alv_fldcat.
    do p_flds times.
    clear wa_cat.
    wa_cat-fieldname = sy-index.
    wa_cat-seltext_s = sy-index.
    wa_cat-outputlen = '6'.
    append wa_cat to alv_fldcat.
    enddo.
    *Call ABAP List Viewer (ALV)
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    it_fieldcat = alv_fldcat
    tables
    t_outtab = <dyn_table>.
    endform.
    Hope this will help, reward if found usefull.
    Cheers,
    Ram.

  • Internal table with out header line

    Hi friends,
    Can u send me code for internal table with out header line : how to declare ,how to populate data and how to access the data
    Regards,
    vijay

    Hi Vijay
    There are several ways to declare an internal table without header line:
    A) You can define a type table
    TYPES: BEGIN OF TY_ITAB OCCURS 0,
            INCLUDE STRUCTURE ZTABLE.
    TYPES: END   OF TY_ITAB.
    and then your intrnal table:
    DATA: ITAB TYPE TY_ITAB.
    B) DATA: ITAB TYPE/LIKE STANDARD TABLE OF ZTABLE.
    C) DATA: ITAB TYPE/LIKE ZTABLE OCCURS 0.
    All these ways create a STANDARD TABLE
    You can create other types of internal table, for example SORTED TABLE or HASHED TABLE.
    These kinds of table can allow to improve the performance because they use different rules to read the data.
    When it wants to manage a table without header line, it need a work area, it has to have the same structure of table.
    DATA: WA LIKE ZTABLE.
    DATA: T_ZTABLE LIKE STANDARD TABLE OF ZTABLE.
    A) To insert the record:
    If you use INTO TABLE option you don't need workarea
    SELECT * FROM ZTABLE INTO TABLE T_ZTABLE
                                      WHERE FIELD1 = 'Z001'
                                        AND FIELD2 = '2006'.
    but if you want to append a single record:
    SELECT * FROM ZTABLE INTO wa WHERE FIELD1 = 'Z001'
                                   AND FIELD2 = '2006'.
    APPEND WA TO T_ZTABLE.
    ENDSELECT.
    Now you need workarea.
    B) To read data: you need always a workarea:
    LOOP AT T_ZTABLE INTO WA WHERE ....
      WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WRITE: / WA-FIELD1, WA-FIELD2, WA-FIELD3.
    ENDIF.
    Anyway if you want to know only if a record exists, you can use the TRANSPORTING NO FIELDS option, in this case it doesn't need a workarea.
    READ T_ZTABLE WITH KEY FIELD3 = '0000000001'
                                      TRANSPORTING NO FIELDS.
    IF SY-SUBRC = 0.
    WRITE 'OK'.
    ENDIF.
    C) To update the data: it always needs a workarea
    LOOP AT T_ZTABLE INTO WA WHERE FIELD3 = '0000000001'.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA.
    ENDLOOP.
    or
    READ T_ZTABLE INTO WA WITH KEY FIELD3 = '0000000001'.
    IF SY-SUBRC = 0.
    WA-FIELD3 = '0000000002'.
    MODIF T_ZTABLE FROM WA INDEX SY-TABIX
    ENDIF.
    AT the end you can use the internal table to update database:
    MODIFY/UPDATE/INSERT ZTABLE FROM T_ZTABLE.
    See Help online for key words DATA, you can find out more details.
    Max
    Message was edited by: max bianchi

  • Internal table with and with out work area.

    Hi all,
    in performance terms which one is better 1) internal table with header line or 2) itab w/o header line and explicit work area for that itab.
    which one is better and how?
    Thanks in advance.
    SAI

    Hai Sai Ram
    Internal Table with header Line Improves the Performence
    1)
    TABLES CUSTOMERS.
    Defining an internal table with header line
    DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
                       WITH HEADER LINE.
    Reading all entries of the database table into the internal table
    SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.
    2)
    Check the following code for the Difference
    REPORT ZWRITEDOC LINE-SIZE 124 NO STANDARD PAGE HEADING.
       TABLES: DD03L, "
               DD04T, "R/3-DD: Textos de los elementos de datos
               DD02T. "R/3-DD: Textos de tablas SAP
    Tabla temporal con las lineas de cada tabla
       DATA: BEGIN OF I_LINEAS OCCURS 100,
                LINEA(80),
             END OF I_LINEAS.
    Tabla con las caracteristicas de la tabla
       DATA: BEGIN OF I_TABLA OCCURS 100,
                CAMPO(12),
                TIPO(4),
                LONG(5) TYPE I,
                REF(20),
                DESCR(40),
             END OF I_TABLA.
       DATA: D_NOMBRE(80),
             D_DESCRIPCION(80).
       DATA :  BEGIN OF SOURCE OCCURS 1000,
            LINE(72),
       END OF SOURCE.
       PARAMETERS: PROGRAM LIKE SY-REPID DEFAULT SY-REPID.
       AT USER-COMMAND.
         CASE SY-UCOMM.
           WHEN 'GRAB'.
             PERFORM GRABAR.
         ENDCASE.
       START-OF-SELECTION.
         SET PF-STATUS  'ZSTATUS1'.
         READ REPORT PROGRAM INTO SOURCE.
         DATA L_GRAB.
         CLEAR L_GRAB.
    LOOP AT SOURCE.
       translate source to upper case.
           IF L_GRAB IS INITIAL.
             D_DESCRIPCION = I_LINEAS-LINEA.
           ENDIF.
           I_LINEAS = SOURCE.
           SEARCH I_LINEAS-LINEA FOR 'BEGIN OF'.
           IF SY-SUBRC = 0.
             SEARCH I_LINEAS-LINEA FOR 'DATA'.
             IF SY-SUBRC = 0.
               L_GRAB = 'X'.
               FREE I_LINEAS.
             ENDIF.
           ENDIF.
           IF L_GRAB = 'X'.
             I_LINEAS = SOURCE.
             APPEND I_LINEAS.
             SEARCH I_LINEAS-LINEA FOR 'END OF'.
             IF SY-SUBRC = 0.
               CLEAR L_GRAB.
               PERFORM PROCESAR_FICHERO.
               PERFORM IMPRIMIR.
               FREE I_LINEAS.
               CLEAR D_DESCRIPCION.
             ENDIF.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'WITH HEADER LINE'.
           IF SY-SUBRC = 0.
             APPEND I_LINEAS.
             PERFORM PROCESAR_FICHERO.
             PERFORM IMPRIMIR.
           ENDIF.
         ENDLOOP.
    *&      Form  GRABAR
          Graba el fichero en c:\temp\p.rtf y lo abre con word.
       FORM GRABAR.
         CALL FUNCTION 'LIST_DOWNLOAD'
             EXPORTING
            LIST_INDEX = SLIST_INDEX_DEFAULT
                  METHOD     = 'RTF'
              EXCEPTIONS
                   OTHERS     = 1.
         CALL FUNCTION 'EXECUTE_WINWORD'
              EXPORTING
                   I_FILE = 'C:\TEMP\P.RTF'
              EXCEPTIONS
                   OTHERS = 1.
       ENDFORM.                               " GRABAR
    *&      Form  PROCESAR_FICHERO
       FORM PROCESAR_FICHERO.
         DATA: L_AUX1(80),
              L_AUX2(80).
         FREE I_TABLA.
         LOOP AT I_LINEAS.
           CLEAR I_TABLA.
       translate i_lineas-linea to upper case.
           SEARCH I_LINEAS-LINEA FOR 'BEGIN OF'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'BEGIN OF' INTO L_AUX1 D_NOMBRE.
             SPLIT D_NOMBRE AT 'OCCURS' INTO D_NOMBRE L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR '('.
           IF SY-SUBRC = 0.
              SPLIT I_LINEAS-LINEA AT '(' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = L_AUX1.
             SPLIT L_AUX2 AT ')' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             IF L_AUX1 CO '0123456789 '.
               I_TABLA-LONG = L_AUX1.
             ENDIF.
             I_TABLA-TIPO = 'CHAR'.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'LIKE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'LIKE' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = L_AUX1.
               SPLIT L_AUX2 AT ',' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-REF = L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'TYPE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'TYPE' INTO L_AUX1 L_AUX2.
             IF I_TABLA-CAMPO IS INITIAL.
               CONDENSE L_AUX1.
               I_TABLA-CAMPO = L_AUX1.
             ENDIF.
                 SPLIT L_AUX2 AT ',' INTO L_AUX1 L_AUX2.
            CONDENSE L_AUX1.
             CASE L_AUX1.
               WHEN 'I'.
                 I_TABLA-TIPO = 'INT'.
                 I_TABLA-LONG = 4.
               WHEN 'C'.
                 I_TABLA-TIPO = 'CHAR'.
               WHEN 'N'.
                 I_TABLA-TIPO = 'NUMC'.
               WHEN 'T'.
                 I_TABLA-TIPO = 'TIME'.
                 I_TABLA-LONG = 8.
               WHEN OTHERS.
                 I_TABLA-TIPO = L_AUX1.
             ENDCASE.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR '"'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT '"' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX2.
             I_TABLA-DESCR = L_AUX2.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'INCLUDE STRUCTURE'.
           IF SY-SUBRC = 0.
             SPLIT I_LINEAS-LINEA AT 'INCLUDE STRUCTURE' INTO L_AUX1 L_AUX2.
             SPLIT L_AUX2 AT '.' INTO L_AUX1 L_AUX2.
             CONDENSE L_AUX1.
             I_TABLA-CAMPO = 'INCLUDE STR'.
             I_TABLA-REF   = L_AUX1.
           ENDIF.
           SEARCH I_LINEAS-LINEA FOR 'WITH HEADER LINE'.
             IF SY-SUBRC = 0.
               IF NOT I_LINEAS-LINEA CA '"'.
                 SPLIT I_LINEAS-LINEA AT 'OCCURS' INTO L_AUX1 L_AUX2.
                 IF SY-SUBRC = 0.
                   SPLIT L_AUX1 AT 'LIKE' INTO L_AUX1 L_AUX2.
                   IF SY-SUBRC = 0.
                     CONDENSE L_AUX2.
                     IF NOT L_AUX2 IS INITIAL.
                       I_TABLA-CAMPO = '...'.
                       I_TABLA-TIPO  = 'TABI'.
                       I_TABLA-REF   = L_AUX2.
                       SELECT SINGLE * FROM DD02T
                        WHERE TABNAME = L_AUX2
                          AND DDLANGUAGE = SY-LANGU.
                       IF SY-SUBRC = 0.
                       I_TABLA-TIPO  = 'TABE'.
                       I_TABLA-DESCR   = DD02T-DDTEXT.
                       ENDIF.
                       IF L_AUX1 CA ':'.
                         SPLIT L_AUX1 AT 'DATA:' INTO L_AUX1 L_AUX2.
                       ELSE.
                         SPLIT L_AUX1 AT 'DATA' INTO L_AUX1 L_AUX2.
                       ENDIF.
                       D_NOMBRE = L_AUX2.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDIF.
             ENDIF.
           IF NOT I_TABLA-CAMPO IS INITIAL.
             APPEND I_TABLA.
           ENDIF.
         ENDLOOP.
         LOOP AT I_TABLA WHERE NOT REF IS INITIAL.
            SPLIT I_TABLA-REF AT '-' INTO L_AUX1 L_AUX2.
           SELECT SINGLE * FROM DD03L
            WHERE TABNAME = L_AUX1
              AND FIELDNAME = L_AUX2.
           IF SY-SUBRC = 0.
             I_TABLA-TIPO = DD03L-DATATYPE.
             I_TABLA-LONG = DD03L-INTLEN.
             IF I_TABLA-DESCR IS INITIAL.
               SELECT SINGLE * FROM DD04T
                WHERE ROLLNAME = DD03L-ROLLNAME
                  AND DDLANGUAGE = SY-LANGU.
               IF SY-SUBRC = 0.
                 I_TABLA-DESCR = DD04T-DDTEXT.
               ENDIF.
             ENDIF.
             MODIFY I_TABLA.
           ENDIF.
         ENDLOOP.
       ENDFORM.                               " PROCESAR_FICHERO
    *&      Form  IMPRIMIR
       FORM IMPRIMIR.
       DATA L_AUX(80).
         FORMAT COLOR COL_NORMAL INTENSIFIED ON.
         ULINE AT 1(80).
         WRITE: / SY-VLINE,
                 (76)     D_NOMBRE CENTERED,
                  SY-VLINE.
         SPLIT D_DESCRIPCION AT '*' INTO L_AUX D_DESCRIPCION.
         WRITE: / SY-VLINE,
                 (76)     D_DESCRIPCION CENTERED,
                  SY-VLINE.
         NEW-LINE.
         ULINE AT 1(80).
         DETAIL.
         FORMAT COLOR OFF.
         WRITE: /
               SY-VLINE,
             (10) 'CAMPO',
               SY-VLINE,
             (4)  'TIPO',
               SY-VLINE,
             (4) 'LONG',
               SY-VLINE,
             (16)  'REFERENCIA',
               SY-VLINE,
             (30)  'DESCRIPCION',
               SY-VLINE.
         NEW-LINE.
         ULINE AT 1(80).
         DETAIL.
         LOOP AT I_TABLA.
           WRITE: /
                 SY-VLINE,
              (10)   I_TABLA-CAMPO,
                 SY-VLINE,
                 I_TABLA-TIPO,
                 SY-VLINE,
              (4)   I_TABLA-LONG,
                 SY-VLINE,
              (16)   I_TABLA-REF,
                 SY-VLINE,
              (30)   I_TABLA-DESCR,
                 SY-VLINE.
         ENDLOOP.
         NEW-LINE.
         ULINE AT 1(80).
         SKIP 2.
       ENDFORM.                               " IMPRIMIR
    Thanks & regards
    Sreeni

  • How to return an internal table with methods ?

    Hi,
    I am an Java programmer and very new to ABAP.
    How do I return a internal table with a method? I have the table GP1_PRODUCTS and want to return a copy of this table as an internal table called PRODUCTS.
    Here is my code that does not work:
    class PRODUCTS definition
      public
      final
      create public .
    public section.
    *"* public components of class PRODUCTS
    *"* do not include other source files here!!!
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type GP1_PRODUCTS .
    protected section.
    *"* protected components of class PRODUCTS
    *"* do not include other source files here!!!
    private section.
    *"* private components of class PRODUCTS
    *"* do not include other source files here!!!
    ENDCLASS.
    CLASS PRODUCTS IMPLEMENTATION.
    * <SIGNATURE>---------------------------------------------------------------------------------------+
    * | Instance Public Method PRODUCTS->GET_PRODUCT_LIST
    * +-------------------------------------------------------------------------------------------------+
    * | [<-()] PRODUCTS                       TYPE        GP1_PRODUCTS
    * +--------------------------------------------------------------------------------------</SIGNATURE>
    method GET_PRODUCT_LIST.
    DATA: it_products TYPE STANDARD TABLE OF GP1_PRODUCTS.
    select * from GP1_PRODUCTS into table it_products.
    PRODUCTS = it_products.
    endmethod.
    ENDCLASS.

    You have to create a table type for your table GP1_PRODUCTS.
    If you use global class (created in SE24), than:
    Create a Table Type in SE11
    Go to SE11, Enter a name like ZPRODUCTS in the Data Type
    There will be popup when you press the Create button to decide a type. Select the Table Type
    Enter  GP1_PRODUCTS  in the Line Type.
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ZPRODUCTS.
    If you use local class:
    TYPES: ty_products type standard table of GP1_PRODUCTS..
    * method declaration
      methods GET_PRODUCT_LIST
        returning
          value(PRODUCTS) type ty_products
    Regards,
    Naimesh Patel

  • Dynamicly creating an internal table with header line

    Hi experts,
    I am trying to do a read on an internal table using field symbols of type any table. To be able to read more than one row at once, I'd like to read it into another internal table (instead of just one line and instead of looping through them one by one).
    So far the following line rendered an error that the target internal table doesn't have a header line
    read table <fs_v_tab> WITH KEY (<fs_comp>) = <fs_param>-low INTO <fs_v_tab>.
    (also attempted using "<fs_v_tab>->*" & "<fs_v_tab>[]" to be silly)
    Based on the following article, I was wondering if it were possible to dynamicly create an internal table with header line.
    [http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html|http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html]
    Any help or tips on how to dynamicly filter an internal table field-symbol is greatly appreciated!

    Just read the online help:
    This statement reads a row from internal table itab.
    Or more exact:
    This statement reads one row from internal table itab.
    Therefore you can not read multiple lines into another table. The header line is needed to put the result in. And this is not what you intended, the result will be in the header line, not in the table itself.
    If the row to be read is not uniquely specified, the first suitable row is read. In the case of index tables, this row has the lowest table index of all matching rows.
    At least you have to do what you dont wanna do: looping.

  • What are the advantages of using an internal table with workarea

    Hi,
    can anyone tell me
    What are the advantages of using an internal table with workarea
    over an internal table with header line?
    thnks in adv
    regards
    nagi

    HI,
    Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    <b>Difference between Work Area and Header Line</b>
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table
    1) The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line
    2)work area / field string and internal table
    which one is prefarable for good performance any why ?
    -The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.
    In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.
    Example code:
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    Regards,
    Padmam.

  • Read internal table with key not equal to

    Hi,
    How can I read internal table with key not equal to some other field.
    Basically in read statement we can read only fields equal to others fields.

    Hi,
    Test the following Code you can Use Loop at for this But not Read Table
    DATA: BEGIN OF it_test OCCURS 10,
      f1(4),
      f2 TYPE i,
      f3(2),
      END OF it_test.
    DATA: it_test2 LIKE STANDARD TABLE OF it_test WITH HEADER LINE.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'B'.
    APPEND it_test TO it_test.
    it_test-f1 = '2000'.
    it_test-f2 = 10.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'B'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 40.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    LOOP AT it_test INTO it_test WHERE f3 NE 'A'.
      WRITE: / it_test-f1, it_test-f2, it_test-f3.
    ENDLOOP.
    Kind Regards,
    Faisal

Maybe you are looking for

  • About what can be done with free tools today

    Hi, I'm quite new to MHP and JavaTV. I've seen many web pages that informed me about MHP (like Steve's one, thanks if you see this message), but I'm still a bit confused about what can and cannot be done with the free tools available today, eg XleTVi

  • Embedded PDF files do not show in Internet Explorer 11

    Hi, We have several machines that cannot show embedded pdf files in Internet Explorer 11 with Adobe Reader as default pdf reader. Example from one pc: OS: Windows 7 Enterprise SP1 x64 – all updates applied. IE 11 version: 11.0.9600.17239. Update Vers

  • How to resolve sharing issue

    I have an AEBS, 3 MPB's, a MacMini, an iMac20, and an iMac27 all are running Mavericks 10.9.2. All have File, Printer, and Screen Sharing turned on, but I can't seem to get to connect via "Share Screen" or "Connect As" when I select the computer name

  • How to do Multi Cell Selection in JTable

    Dear Friends, Any body know Multi cell selection in jtable...... Thanks

  • Unable to save the file because a sequence file with that path is already loaded.

    Hi, I am very new to TestStand tool. I does the following steps to execute sequences 1. Created New sequence file and stored same. 2. Execute the sequence 3. Release the file and engine shutdown(flase) 4. Run again same sequence file(again I am Savin