Need Clarification On Internal tables in Start Routine

Hi,
I have intenal table some IT_A which deletes the requests which are populated in to it.
Now I need to populate requests into IT_A from  another internal table like IT_B which are of different structure.
I have three fields in common in both internal tables like RNR,Timestamp n SID with different field names
I Need Clarification that if i move the contents of the three fields to IT_A from IT_B by spcifying these three fields.Will the internal table IT_A deletes the Requests?
Thanks,
Sriram.

Hi Sriram,
As mentioned IT_A deleted the request loaded into it.
if you move the contents of the three fields to IT_A from IT_B by spcifying the three fields after the deletion step for internal table IT_A takes place then it wont get deleted.
But it would be deleted if the the contents are moved before the deletion step takes place
regards,
mahesh

Similar Messages

  • Internal table on Start Routine

    Hello
    I have 5 key figures. They have an standard routine with a select statement. Basically they have to read an external DSO and get some fields values.
    As all of them have the same SELECT statement I think it would be better to replace this with a select in the Start Routine, in order to improve performance. But unfortunatelly I'm not an abap programmer.
    How could this be replaced in the Start routine ?
    select single EXRATEXACC DOC_CURRCY NETVAL_INV
          into (h_rate, h_dcurr, h_inv)
          from /bic/azsdbiio100
           where BILL_NUM eq SOURCE_FIELDS-/BIC/ZREFDOC
           and BILL_ITEM eq SOURCE_FIELDS-/BIC/ZREFDOCLN
           and COMP_CODE eq SOURCE_FIELDS-COMP_CODE.
      if sy-subrc ne 0. " Not found
            select single EXRATEXACC DOC_CURRCY NETVAL_INV
            into (h_rate, h_dcurr, h_inv)
            from /bic/azsdbiio100
             where DOC_NUMBER eq SOURCE_FIELDS-DOC_NUMBER
             and S_ORD_ITEM eq SOURCE_FIELDS-S_ORD_ITEM
             and COMP_CODE eq SOURCE_FIELDS-COMP_CODE.
         if sy-subrc eq 0.
              h_flag = 'X'.  " Document found
         endif.
      else.
         h_flag = 'X'.  "Document found.
      endif.
    if h_flag = 'X'.
            if h_dcurr ne SOURCE_FIELDS-CURRENCY.
              if h_rate lt 0.
                h_rate = h_rate * ( -1 ).
                clear h_amount.
                if h_inv ne 0.
                  h_amount = h_inv.
                else.
                  h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104 * h_rate.
                endif.
              elseif h_rate gt 0.
                if h_inv ne 0.
                  h_amount = h_inv.
                else.
                  h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104 / h_rate.
                endif.
              else.
                h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104.
              endif.
            else.
              h_amount = SOURCE_FIELDS-/BIC/ZG_AVV104.
            endif.
            RESULT = h_amount.
            CURRENCY = h_dcurr.
          endif.
        endif.

    Hi,
    what you need to do first is to define internal tables in the start routine for each individual routine with the key fields. So look at the different SELECT SINGLE statements and build up the internal table(s). So for the first one you need to define an internal table with fields BILL_NUM, BILL_ITEM, COMP_CODE  (your key) and EXRATEXACC, DOC_CURRCY and NETVAL_INV. I don't know if you can combine the two select single statements, that will depend on if BILL_NUM is the same type of field as DOC_NUMBER.
    After declaration of the internal tables you can fill the bales by doing a SELECT instead of select single INTO the internal table.
    In the individual update rules you can do a READ TABLE (internal table) WITH KEY yyyyyy
    In this way you only have to access the DB once per data package and read from the internal memory for each record, which will definitely improve performance.
    Hope this helps!

  • How to declare a internal table in start routine i.e. transformations

    Hi Gurus,
    How to define an internal table in a start rotuine?
    any help greatly appreciated.
    Best Regards,
    Reddy.

    Hi,
    types: begin of str,
    field1 type c,
    field2 type c,
    end of str.
    data : itab type table of str with header line.
    the above code should be inserted where it says insert code below this. this will be like a global decleration. this table will be available for all the routines that you write in the transformation.
    All the best !!
    Regards
    Aparna

  • Help needed XML to Internal table and vice versa

    Hello frnds, I need to convert Internal table to XML and Vice versa.
    Now I am able to most of the part except for this...
    the xml which I have to generate looks something like this...
    - <trade_dt>
    - <![CDATA[ 20111108000000:20111108235959
      ]]>
      </trade_dt>
    its a range I think
    And then the reponse which I get back the XML is like
    - <lockinfo>
    - <![CDATA[
    TRD_HEADER     1045     1          2
    ACT_CASHFLOW     1042               1
    TRD_TERM     1045               2
      ]]>
      </lockinfo>
    Is there any provision in class cl_ixml or class if_ixml_element to handle this part.....
    Edited by: Amit Sawant on Dec 28, 2011 3:51 PM

    Hello Amit,
    I would suggest you, to use the XSL-Transformations, which can be inbound used in ABAP.
    For example:
    DATA:
      l_xml       TYPE string,
      lt_flights  TYPE TABLE OF SFLIGHT.
    SELECT * FROM SFLIGHT INTO TABLE LT_FLIGHT.
    CALL TRANSFORMATION id
      SOURCE DATA = lt_flights
      RESULT XML l_xml.
    Now, you have a XML-String which is in the ABAP-XML Notation, which means, that ABAP can move this XML-Data back into an internal table/structure.
    For the backward, you have to use the following statement:
    CALL TRANSFORMATION id
      SOURCE XML l_xml
      RESULT DATA = lt_flights.
    As you will see, it is very easy. The Transformation "id" is just one example and build in. When you have to transform the data, or do not want to have the ASX-Notation in it, you should at least define your own transformations with the transaction XSLT_TOOL and use it similar to the transformation "id".
    Kind Regards,
    Hendrik

  • Accessing Global Internal Table in Field Routine Level

    I am working on a transformation. I have created a Global Internal Table with the structure of my Source Target + extra fields not in my source target. In the start routine of the transformation I am first copying all corresponding fields from SOURCE_PACKAGE to internal table and then finally doing a lot of manipulations and modifying and appending the internal table with data now ready for populating to target.
    I want to populate the target fields at field routine level by  the data present in the Global internal table. Can you please tell me how to code here. If data was being read by SOURCE_PACKAGE, I would have read the value of SOURCE_FIELDS - (Value). But incase of value to be read from Global Internal Table, can I refer to the internal table work area directly. Thanks.
    Global Internal Table - G_ITAB
    Work Area - WA_G_ITAB
    Is the below correct ?
    Result = WA_G_ITAB-(Field Name).

    Let me understand this with an example as I am still not clear. Suppose I am loading to a DSO having 17 Key Fields say K1, K2, K3.........K17.
    And if the 3.5x logic is
    DATA : L1 LIKE COMM_STRUCTURE-amt.
      CLEAR L1 .
      IF COMM_STRUCTURE-CHK = '222'
       OR COMM_STRUCTURE-CHK = '333' .
        L1 = COMM_STRUCTURE-amt .
      ENDIF.
      RESULT = L1 .
    Can you tell me the code of the above in BI7 at field level routine now. Please note I need to take data from G_ITAB internal table and that the DSO has 17 key fields?

  • Need logic in Internal table processing

    Hi all,
    I have requirement like this.
    i cretaed  three internal tables
    1) first Internal table can store total uploaded data from flat file..means line by line( Here each line is one record)
    2) Second internal can store all fields which are fetched based on table which is given on selction screen.
    3)now i cretaed one internal table with one variable
    4) i used spilt statement on first internal table ( which store all flat file recrds) into third internal table.
    so , my third internal table has first records values of first internal table in one column.
    Now my probelm...i need to populate bapi structre tables with values of third internal table based on field names of second internal table. i am not able to do logic.
    Is there any pointers to know soultion
    Note:we know which fields values from flat values  needs to populate Bapi structure table..
    Thanks in advance,
    regards,
    JBR

    check this program may be u will get the logic
    *& Report  ZBAPI_MATERIAL_SAVEDATA
    *& PURPOSE : THIS REPORT USES BAPI MATERIAL SAVE DATA TO UPDATE AND CREATE
    *&           THE MATERIAL
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
           STGE_LOC(4),
           MRP_IND(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
           LANGU(2),
          MATL_DESC(40),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA.
    *decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *INTERNAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MATMAS.XLS' .
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    perform F_GET_DATA.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    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.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_MOVE_DATA .
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_EXCEL BY ROW COL.
    CLEAR IT_EXCEL.
    LOOP AT IT_EXCEL.
    MOVE IT_EXCEL-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE WA_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_EXCEL-VALUE TO <FS>.
    AT END OF ROW.
    APPEND WA_DATA TO IT_DATA.
    CLEAR WA_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " F_MOVE_DATA
    *&      Form  F_GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DATA .
    LOOP AT IT_DATA INTO WA_DATA.
    MOVE-CORRESPONDING WA_DATA  TO  BAPI_HEAD.
    BAPI_HEAD-BASIC_VIEW ='X'.
    BAPI_HEAD-SALES_VIEW ='X'.
    BAPI_HEAD-PURCHASE_VIEW ='X'.
    BAPI_HEAD-STORAGE_VIEW ='X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_CLIENTDATA.
    BAPI_CLIENTDATAX-MATL_GROUP = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM_ISO = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_PLANTDATA.
    BAPI_PLANTDATAX-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_PLANTDATAX-DEL_FLAG = 'X'.
    BAPI_PLANTDATAX-PUR_GROUP = 'X'.
    BAPI_PLANTDATAX-BASE_QTY = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_STORAGELOCATIONDATA.
    BAPI_STORAGELOCATIONDATA-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-PLANT = BAPI_STORAGELOCATIONDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-STGE_LOC = BAPI_STORAGELOCATIONDATA-STGE_LOC.
    BAPI_STORAGELOCATIONDATAX-MRP_IND = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_SALESDATA.
    BAPI_SALESDATAX-SALES_ORG = BAPI_SALESDATA-SALES_ORG.
    BAPI_SALESDATAX-DISTR_CHAN = BAPI_SALESDATA-DISTR_CHAN.
    BAPI_SALESDATAX-DEL_FLAG = BAPI_SALESDATA-DEL_FLAG.
    BAPI_SALESDATAX-MIN_ORDER = 'X'.
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = WA_DATA-LANGU.
    IT_MAKT-MATL_DESC = WA_DATA-MATL_DESC.
    APPEND IT_MAKT.
    CLEAR IT_RET.
    REFRESH IT_RET.
    PERFORM F_CALL_BAPI.
    READ TABLE IT_RET WITH KEY TYPE = 'S'.
    IF SY-SUBRC EQ 0.
    PERFORM F_BAPI_COMMIT.
    WRITE:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',WA_DATA-MATERIAL.
    ELSE.
    MESSAGE E000(ZHNC) WITH 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    ENDIF.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM F_CALL_BAPI .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = BAPI_HEAD
       CLIENTDATA                 =  BAPI_CLIENTDATA
       CLIENTDATAX                =  BAPI_CLIENTDATAX
       PLANTDATA                  =  BAPI_PLANTDATA
       PLANTDATAX                 =  BAPI_PLANTDATAX
       STORAGELOCATIONDATA        =  BAPI_STORAGELOCATIONDATA
       STORAGELOCATIONDATAX       =  BAPI_STORAGELOCATIONDATAX
       SALESDATA                  =  BAPI_SALESDATA
       SALESDATAX                 =  BAPI_SALESDATAX
    IMPORTING
       RETURN                     =  IT_RET
    TABLES
       MATERIALDESCRIPTION        = IT_MAKT
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    APPEND IT_RET.
    ENDFORM.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    FORM F_BAPI_COMMIT .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    ENDFORM.                    " F_BAPI_COMMIT

  • Passing internal table to FORM routine

    Hi friends,
    how do i do the following:
    i have an internal table with data and i want the internal table to be passed in a FORM routine, as i need to do some operations on the data within the table, so what i need is how to do the FORM test_itab USING ... statement.
    thanks for your help,
    points will be awarded instantly!
    clemens

    Hi,
    Below will give you a detailed over view of how to achive the following.
    If you specify the addition TABLES, each table parameter t1 t2 ... for the subroutine called that is defined with the addition TABLES to the FORM statement must be assigned an internal table itab as the actual parameter. The assignment of the actual parameters to the formal parameters takes place using their positions in the lists t1 t2 ... and itab1 itab2 ... .
    You can only specify standard tables for itab. Transfer takes place by means of a reference. If a specified table itab has a header line, this is also transferred; otherwise, the header line in the corresponding table parameter t is blank when it is called.
    Note
    Use of table parameters in the interface for subroutines is obsolete but a large number of subroutines have not yet been converted to appropriately typed USING or CHANGING parameters, so that they must still be supplied with data by the TABLES addition to the PERFORM statement.
    Example
    Static call of the internal subroutine select_sflight transferring a table parameter.
    PARAMETERS: p_carr TYPE sflight-carrid,
                p_conn TYPE sflight-connid.
    DATA sflight_tab TYPE STANDARD TABLE OF sflight.
    PERFORM select_sflight TABLES sflight_tab
                           USING  p_carr p_conn.
    FORM select_sflight TABLES flight_tab LIKE sflight_tab
                        USING  f_carr TYPE sflight-carrid
                               f_conn TYPE sflight-connid.
      SELECT *
             FROM sflight
             INTO TABLE flight_tab
             WHERE carrid = f_carr AND
                   connid = f_conn.
    ENDFORM.
    Thanks,
    Samantak
    Rewards points for useful answers.

  • Need help in ABAP coding in start routine

    Hi,
    I have a requriement like
    -To take the value of month which is an attribute of category(info Object) for which category value is 1. I need to apply the month obtained as the filter to another info object. I have opted to write this ABAP code in start routine. Can anyone guide me on this code.
    Thanks in advance.

    do you not have an abap-er at your disposal? i don't imagine this to be quick & dirty that can be written without access to your system! some analysis work may also be required before the actual coding can be done...so I wouldn't post the entire functional spec (business requirement) here hoping for a solution; that would be too weird.
    Regards.

  • Need information about Internal Tables

    Hi Every one!
    I Need some information about Internal tables. Pls help be above the same.
    Thanks & with Regards,
    Chandra.

    Hi..,
    <b>
    Internal tables </b>
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
    <b>Internal Tables as Data Types</b>
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    <b>Line type</b>
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    <b>Key</b>
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    <b>
    Table type</b>
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    <u>Standard tables</u> have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    <u>
    Sorted tables</u> are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    <u>
    Hashed tables</u> have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    <b>
    Generic Internal Tables</b>
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
    <b>Internal Tables as Dynamic Data Objects</b>
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    <b>
    Choosing a Table Type</b>
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    <b>
    Standard tables</b>
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    <b>Sorted tables</b>
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    <b>
    Hashed tables</b>
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    regards,
    sai ramesh

  • How to pass internal table to form routine..?

    Gurus,
    I am creating a custom Function module in which i have declared few perform statements and passing internal table to it..but when i declare the form it gives me error that the internal table is unknown...Can u please suggest me what am i doing wrong...
      DATA: Begin of tb_set_values occurs 0.
            include structure rgsb4.
      DATA: End of tb_set_values.
    PERFORM read_sets_with_values USING wa_setheader CHANGING tb_set_values[].
    FORM read_sets_with_values USING value(rwa_setheader) LIKE setheader
                               CHANGING rtb_set_values LIKE tb_set_values[].
    DATA: v_setid TYPE setid.
    *DATA: Begin of rtb_set_values occurs 0.
         include structure rgsb4.
    *DATA: End of rtb_set_values.
      CALL FUNCTION 'G_SET_GET_ID_FROM_NAME'
        EXPORTING
          SHORTNAME = rwa_setheader-setname
        IMPORTING
          NEW_SETID = v_setid.
      CALL FUNCTION 'G_SET_GET_ALL_VALUES'
        EXPORTING
          SETNR      = v_setid
        TABLES
          SET_VALUES = rtb_set_values.
    ENDFORM.
    What can be the error..please help

    Well actually, I just tested it and it works fine as you have written it in my test program, so not sure what you are doing wrong. This was tested in NW 7.0
    REPORT rich_0001.
    DATA: setheader TYPE string.
    DATA: wa_setheader TYPE string.
    DATA: BEGIN OF tb_set_values OCCURS 0.
            INCLUDE STRUCTURE t000. "<<-- Test with T000 instead    "rgsb4.
    DATA: END OF tb_set_values.
    SELECT * INTO TABLE tb_set_values  FROM t000.
    PERFORM read_sets_with_values USING wa_setheader
                                  CHANGING tb_set_values[].
    *&      Form  read_sets_with_values
    *       text
    *      -->VALUE(RWA_SETHEADER)  text
    *      -->RTB_SET_VALUES        text
    FORM read_sets_with_values USING value(rwa_setheader) LIKE setheader
                               CHANGING rtb_set_values LIKE tb_set_values[].
      DATA: ls_set_values LIKE LINE OF rtb_set_values.
      LOOP AT rtb_set_values INTO ls_set_values.
        WRITE:/ ls_set_values.
      ENDLOOP.
    ENDFORM.                    "read_sets_with_values
    Regards,
    RIch Heilman

  • Need to display Internal table records on screen without using table contro

    Hi Experts,
    I have a requirement to display internal table on screen which is having three columns (Material no, Serial No and quantity).
    But I can't use table control as it is not supported by hand held devices.
    They are going to use this transaction on hand held devices.
    Thanks In advance.
    Gaurav

    You should be able to use the good old STEP LOOP processing for this... create your three fields in the row then convert them to a STEP-LOOP.
    You can look up in the help how to work with STEP-LOOPs if you are not familiar with it. It was the way to manage table-like information before the age of table controls

  • WHEN DO U NEED CREATE AN INTERNAL TABLE WITH HEADERLINE AND WITH OUT HEADER

    HI
    EXPERTS CAN U HELP ME FOR THIS

    Hi,
    PLEASE CHECK OUT THE LINK BELOW FOR INTERNAL TABLE WITH HEADER LINE IT MIGHT HELP YOU
    http://sap.mis.cmich.edu/sap-abap/abap04/sld012.htm
    PLEASE CHECK OUT THE LINK BELOW FOR INTERNAL TABLE WITHOUT HEADER LINE IT MIGHT HELP YOU
    http://sap.mis.cmich.edu/sap-abap/abap04/sld013.htm
    DIFFERENCES BEWTEEN WORK AREA AND HEADER LINE PLEASE CHECK OUT THE LINK BELOW IT MIGHT HELP YOU
    http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm
    *************please reward points if the information is helpful to you***********

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

  • Some help needed on dynamic internal tables and field symbols

    Hi,
    I have a dyn internal table <dyn_table_r>.
    One of its fields is kna1-kunnr.
    I have another wa <fs>, with only one field alt_kunnr.
    now i want to modify  the data of <dyn_table_r>-kna1-kunnr from <fs>-alt_kunnr
    How should i do it?
    Regards ,
    Harshit Rungta

    Harshit Rungta:
    You have opened a number of related questions today. I'd like to see the other ones closed before you continue with this one.
    I'll lock this but will re-open it once the others are marked as solved.
    Rob

  • Start Routine on Transformations

    Hi Friends
    I've Start routine on transfer rules with internal table and it was working fine.
    Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
    How can we define an internal table in start routine of transformations in BI7?
    The code as follows for internal table.
    data: begin of it_ord occurs 0,
    AUFNR(000012) TYPE C,
    ZZARBPL(000008) TYPE C,
    WERKS(000004) TYPE C,
    end of it_ord.
    Regards,
    Chandu.

    Hi
    I've defined as follows
        types: begin of it_ord ,
                AUFNR(000012) TYPE C,
                ARBPL(000008) TYPE C,
                WERKS(000004) TYPE C,
              end of it_ord.
        data: temp_tabix like sy-tabix,
              is_datapak type tys_SC_1.
        data it_ordt type table of it_ord .
    It's throwing error saying it_ort is a table with no header line and therefore has no component called aufnr.
    If I define with header line then header line not supported.
    What could be the problem?
    I've changed like you said but it's giving the following error.
    E:"IT_WA" is not a table with header line.
    Regards,
    Chandu.
    Edited by: Chandu on Feb 18, 2009 8:44 AM

Maybe you are looking for

  • Getting Error in Adobe Form as Script failed (language is formcalc:context

    Hi Experts, While acessing Adobe forms from MSS , After Selecting the Scenario After Edit Form Before the form is Displayed I am getting a POP-UP message stating the following Error. Script failed (language is formcalc;context is xfa[0].data[0].Reque

  • Delay in opening and submitting a form

    We have a form which is deployed on two servers. From the test server it behaves normally and can be opened and submitted in reasonable time. But on the production server, it sometimes takes time to open the form and during submission. Delay in openi

  • Why is the HTML editor so inefficient ?

    Hi Molly ! As tst says, "I hate to loose posts !". The fact that we are returned to a blank page, without any chance to recover our work, each time a post is not accepted by the NI server, has been a real pain for an already long time. Things are mad

  • Are chinese fonts supported in Acrobat 10.0.3 Standard?

    I have Adobe Acrobat 10.0.3 Standard installed, but it was from a remote location. When I try to open a pdf with Chinese font in ACROBAT (not Reader), it prompts for the installer location (which I do not have). Is there just a patch I can run to all

  • System change in BW for enabling Formula editor

    I have a basis related question in BW. While trying to add the process type 'Decision between Multiple Alternatives' to my process chain in quality and production systems, I get a 'system not modifiable message' when I try to create a formula in the