Initial line number in Table type

Hi,
What does Initial line number signifies in the Table type-->Initialization and Access tab. No help documentation is present for this tab. is it allocates initial memory or is there any other functionality of initial line number.
thanks,
tanmaya

I believe it is the equivalent of the OCCURS keyword when you define an internal table in ABAP. In structure DD40V, the field is called OCCURS!
matt

Similar Messages

  • How to determine line number on Table control in BDC

    Hi,
    I am uploading changes for CG02 using BDC. I have to change data to specification type which are listed in a table control having some of the fields as IDCAT, IDTYPE, LANG, ORD, IDENT etc.
    For a particular substance number, there can be variable number of idtypes. Since there were 8 Idtypes already created for the substance number I was working with while recording and I created 9th Idtyep(Z_SARADOT#) while recording (Using SHBD), I am getting the code like ...'ESTRI-IDTYPE(09)....ESTRI-IDCAT(09).....'RCGRIIOT-IDENT(09)' which indicate that while recording, the values were added on 9th line of table control.
    Now this line number can vary for other substance number. How can I know
    (1) The last line of table control
    (2) Line number based on Value of field
        Example - here I want to know line number corresponding to IDTYPE Z_SARADOT# if it was created so that I can change the value of field IDENT of the table control.
    The piece of code I got after recording is:
              perform bdc_field       using 'ESTRI-IDTYPE(09)'
                                            'NUM'.
              perform bdc_field       using 'ESTRI-IDCAT(09)'
                                            'Z_SARADOT#'.
              perform bdc_field       using 'RCGRIIOT-IDENT(09)'
                                            '1175'.     
    Please help friends.
    Thanks & Regards,
    Surya

    There are around 800 Substance numbers and for each substance number there are around 10 IDtype. So It would be a costly processing.
    If there no other way doing it?
    I think, I need to follow this way as We can not determine the line number untill BDC is running.

  • Senarious for using different internal table types

    please give scenarios for  using different internal table types?

    Refer to the following.
    Internal table types
    This section describes how to define internal tables locally in a program. You can also define internal tables globally as data types in the ABAP Dictionary.
    Like all local data types in programs , you define internal tables using the TYPES statement. If you do not refer to an existing table type using the TYPE or LIKE addition, you can use the TYPES statement to construct a new local internal table in your program.
    TYPES <t> TYPE|LIKE <tabkind> OF <linetype> [WITH <key>]
    [INITIAL SIZE <n>].
    After TYPE or LIKE, there is no reference to an existing data type. Instead, the type constructor occurs:
    <tabkind> OF <linetype> [WITH <key>]
    The type constructor defines the table type <tabkind>, the line type <linetype>, and the key <key> of the internal table <t>.
    You can, if you wish, allocate an initial amount of memory to the internal table using the INITIAL SIZE addition.
    Table type
    You can specify the table type <tabkind> as follows:
    Generic table types
    INDEX TABLE
    For creating a generic table type with index access.
    ANY TABLE
    For creating a fully-generic table type.
    Data types defined using generic types can currently only be used for field symbols and for interface parameters in procedures . The generic type INDEX TABLE includes standard tables and sorted tables. These are the two table types for which index access is allowed. You cannot pass hashed tables to field symbols or interface parameters defined in this way. The generic type ANY TABLE can represent any table. You can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed.
    Fully-Specified Table Types
    STANDARD TABLE or TABLE
    For creating standard tables.
    SORTED TABLE
    For creating sorted tables.
    HASHED TABLE
    For creating hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    Line type
    For the line type <linetype>, you can specify:
    Any data type if you are using the TYPE addition. This can be a predefined ABAP type, a local type in the program, or a data type from the ABAP Dictionary. If you specify any of the generic elementary types C, N, P, or X, any attributes that you fail to specify (field length, number of decimal places) are automatically filled with the default values. You cannot specify any other generic types.
    Any data object recognized within the program at that point if you are using the LIKE addition. The line type adopts the fully-specified data type of the data object to which you refer. Except for within classes, you can still use the LIKE addition to refer to database tables and structures in the ABAP Dictionary (for compatibility reasons).
    All of the lines in the internal table have the fully-specified technical attributes of the specified data type.
    Key
    You can specify the key <key> of an internal table as follows:
    [UNIQUE|NON-UNIQUE] KEY <col1> ... <col n>
    In tables with a structured line type, all of the components <coli> belong to the key as long as they are not internal tables or references, and do not contain internal tables or references. Key fields can be nested structures. The substructures are expanded component by component when you access the table using the key. The system follows the sequence of the key fields.
    [UNIQUE|NON-UNIQUE] KEY TABLE LINE
    If a table has an elementary line type (C, D, F, I, N, P, T, X), you can define the entire line as the key. If you try this for a table whose line type is itself a table, a syntax error occurs. If a table has a structured line type, it is possible to specify the entire line as the key. However, you should remember that this is often not suitable.
    [UNIQUE|NON-UNIQUE] DEFAULT KEY
    This declares the fields of the default key as the key fields. If the table has a structured line type, the default key contains all non-numeric columns of the internal table that are not and do not contain references or internal tables. If the 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.
    Specifying a key is optional. If you do not specify a key, the system defines a table type with an arbitrary key. You can only use this to define the types of field symbols and the interface parameters of procedures . For exceptions, refer to Special Features of Standard Tables.
    The optional additions UNIQUE or NON-UNIQUE determine whether the key is to be unique or non-unique, that is, whether the table can accept duplicate entries. If you do not specify UNIQUE or NON-UNIQUE for the key, the table type is generic in this respect. As such, it can only be used for specifying types. When you specify the table type simultaneously, you must note the following restrictions:
    You cannot use the UNIQUE addition for standard tables. The system always generates the NON-UNIQUE addition automatically.
    You must always specify the UNIQUE option when you create a hashed table.
    Initial Memory Requirement
    You can specify the initial amount of main memory assigned to an internal table object when you define the data type using the following addition:
    INITIAL SIZE <n>
    This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to reserve memory space for <n> table lines when you declare the table object.
    When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated.
    You can usually leave it to the system to work out the initial memory requirement. The first time you fill the table, little memory is used. The space occupied, depending on the line width, is 16 <= <n> <= 100.
    It only makes sense to specify a concrete value of <n> if you can specify a precise number of table entries when you create the table and need to allocate exactly that amount of memory (exception: Appending table lines to ranked lists). This can be particularly important for deep-structured internal tables where the inner table only has a few entries (less than 5, for example).
    To avoid excessive requests for memory, large values of <n> are treated as follows: The largest possible value of <n> is 8KB divided by the length of the line. If you specify a larger value of <n>, the system calculates a new value so that n times the line width is around 12KB.
    Examples
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    The program defines a table type ITAB. It is a sorted table, with line type of the structure LINE and a unique key of the component COLUMN1.
    TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.
    TYPES: BEGIN OF LINE,
    COLUMN1 TYPE I,
    COLUMN2 TYPE I,
    COLUMN3 TYPE I,
    END OF LINE.
    TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.
    TYPES: BEGIN OF DEEPLINE,
    FIELD TYPE C,
    TABLE1 TYPE VECTOR,
    TABLE2 TYPE ITAB,
    END OF DEEPLINE.
    TYPES DEEPTABLE TYPE STANDARD TABLE OF DEEPLINE
    WITH DEFAULT KEY.
    The program defines a table type VECTOR with type hashed table, the elementary line type I and a unique key of the entire table line. The second table type is the same as in the previous example. The structure DEEPLINE contains the internal table as a component. The table type DEEPTABLE has the line type DEEPLINE. Therefore, the elements of this internal table are themselves internal tables. The key is the default key - in this case the column FIELD. The key is non-unique, since the table is a standard table.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm

  • Internal Table Types (Standard, Sorted, Hashed)

    Hi all,
    I wonder about using internal table types. I always work with standard table type. I don't know when i have to use the standard, sorted or hashed itab type. Is there limits for line counts of types, like over 200.000 lines use hashed table type etc. ? I need performance improvements for itabs.
    Thx,

    the terminology of internal tables is unfortunately quite confusing:
    internal tables use 'index' for the row number of the line in the table, if you know then you can access it directly. It is actually the sy-tabix variable which you have to know.
    Things which are called index on the database are called keys, i.e. the sorted primary key of a SORTED table or the hashed primary key of a HASHED table (the technical realization is actually called index).
    With the newest basis release (7.02 or 7.20) there are also secondary keys possible on internal tables, for all 3 types.
    Siegfried

  • Number of displayed lines in a table

    Hello colleagues,
    We are using a table with a master column (tree). Additional we are using an input field where a user can enter a number so that the displayed lines can be change at runtime.
    Problem:
    I would like to know the displayed number of lines as it is displayed in the button line of the table in the view (where a user can jump direct to a line) - but I do not know how I get it.
    Question:
    How do I get the content of the max number of available lines in the button of the displayed table?
    Thanks+greetings,
    Achim

    Hey Maheswaran.B,
      thanks for the reply - the problem is not solved with the suggestion (because I do not get the maximum number of line displayed).
    I did the following:
    On the very first time if "modifyView" will be executed I do a loop over the table. If the maximum number is reached within the loop I set this number - if not I set the number of loops.
    Here is a code example:
       DO 10 TIMES.
          ADD 1 TO l_counter.
          CLEAR elem_tabletree.
          elem_tabletree = node_tabletree->get_element( index = l_counter ).
          IF elem_tabletree IS  INITIAL.
            SUBTRACT 1 FROM l_counter.
            EXIT.
          ENDIF.
        ENDDO.
    *--- set the value to the bound variable
        elem_owner_node->set_attribute(
          EXPORTING
            name =  `NUMBER_OF_LINES`
            value = item_number_of_lines ).

  • Purpose of Row type, line type and Table Type..

    Hi All,
    Just I’m started working with OOABAP. Whenever I open some structures, most of the components in the structures have the below three words. What is the exact difference b/w the below words. What is purpose those?
    Row type, line type
    Table type:
    Please let me know.

    hi,
    Line Type
    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.
    Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables 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.
    Sorted tables 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 NON-UNIQUE. Standard tables and sorted tables are known generically as index tables.
    Hashed tables 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.
    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.
    At tables with structured row type, the standard key is formed from all character-type columns of the internal table. 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. At tables with non-structured row type, the standard key consists of the entire row. If the row type is also a table, an empty key is defined.
    The user-defined key can contain any columns of the internal table that are no internal table themselves, and do not contain internal tables. References are allowed as table keys. 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.
    Internal tables are always completely specified regarding row type, key and access type
    Hope this helps.

  • I am getting following error! XML Parsing Error: undefined entity Location: chrome://weave/content/options.xul Line Number 6, Column 3: setting id="weave-account" type="string" title="&account.label;" / --^

    I am getting followong error
    XML Parsing Error: undefined entity
    Location: chrome://weave/content/options.xul
    Line Number 6, Column 3: <setting id="weave-account" type="string" title="&account.label;" />
    --^

    I had this problem - it appeared to be due to having Firefox 4 with the Firefox Sync installed as an add-on. Firefox 4 has sync included so there is no need to have it as an add-on. I went to the add-on manager and removed Firefox Sync and now appears to be working correctly.

  • How to get the line type of a table type

    Hi,
      i want to indetify the line type of a table type dynamically in my program. how to do?
    For example:
    data: lv_ttype type type ROLLNAME value 'PRXCTRLTAB'.
    how to identify line type of lv_ttype in the program.
    Thanks,
    johnney.

    Hello Johnney,
    try like this...
    types: begin of ty_itab,
                matnr like mara-matnr,
                werks like marc-werks,
                maktx like makt-maktx,
              end of g_t_itab.
    data: g_t_itab type table of ty_itab.
    data: <b>wa_itab like line of g_t_itab.</b> " This is line type... so called work area.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.

  • Invalid pc in line number table

    Hi,
    I try to decompile and recompile the class file and copy it back to the server getting the following error. I am using the latest Jdeveloper with OA , The ARU number is 5455514. I tried with few other classes, it works fine. Getting error for only one class (i.e. RcptTrxFListener). It's a telnet application for mobile devices.
    Can anyone help?
    Thanks
    Lalit
    [Wed Oct 11 05:39:59 CDT 2006] (Thread-10) SM_EXCEPTION: Exception occurred with user LALIT MISHRA
    java.lang.ClassFormatError: oracle/apps/inv/invtxn/server/RcptTrxFListener (Invalid pc in line number table)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
         at oracle.apps.inv.invtxn.server.RcptTrxPage.<init>(RcptTrxPage.java:552)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at oracle.apps.mwa.container.StateMachine.loadPage(StateMachine.java:1329)
         at oracle.apps.mwa.container.StateMachine.loadMenuItem(StateMachine.java:1541)
         at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:926)
         at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:690)
         at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:818)

    Hi,
    Have you solved this error? I'm encountering the same error. Please reply ASAP.
    OAF gurus, this is the error i'm getting..
    ## Detail 0 ##
    JBO-30003: The application pool (dev4.devorg.orgDVI21540devorg.oracle.apps.po.createpo.server.CreatePosAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.ClassFormatError, msg=devorg/oracle/apps/po/createpo/server/CreatePosAMImpl (Invalid pc in line number table)
    Thanks in advance.

  • To handle cursor position in table control while using insert initial line

    hi,
          I have a requirement to handle cursor position in my table control in which i am using insert initial line by incrementing the index. Now i am handling the cursor position by using set cursor but after 14 records it is going to the first field of the screen. My table control length is 14 records.
          How to handle this, please reply me if anyone know.
    thanks & regards,
        sekhar.

    hi,
             I need to page down the page and then want to set cursor position but for this system command i am getting space for every command. Page down and cursor down or enter every thing it is taking as space. So for this how can i handle it.
    thanks & regards,
        sekhar.

  • Strange Error- Invalid pc in line number table

    We have a web application on OAF(Oracle Application Framework) hosted using jdk 1.5.. we are trying to backport it to jdk 1.4.2_04.. The code compiles successfully but while trying to run the application on 1.4.2_04, it ends up in an unexpected exception saying..
    JBO-30003: The application pool (ap639sdbpqecu220009oracle.apps.fem.mappingwizard.server.MappingWizardAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.ClassFormatError, msg=oracle/apps/fem/mappingwizard/validation/server/ValidationEngineAMImpl (Invalid pc in line number table)
    Has any one encountered this error previously?? Any known workarounds/solutions.. I am pasting the error stack below-
    JBO-30003: The application pool (ap639sdbpqecu220009oracle.apps.fem.mappingwizard.server.MappingWizardAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.ClassFormatError, msg=oracle/apps/fem/mappingwizard/validation/server/ValidationEngineAMImpl (Invalid pc in line number table)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1619)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2366)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:427)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:214)
    at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.useApplicationModule(OAHttpSessionCookieImpl.java:473)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:398)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:208)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1177)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
    at oa_html._OA._jspService(_OA.java:88)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
    at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
    at oracle.jsp.JspServlet.service(JspServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
    at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
    at oa_html._OA._jspService(_OA.java:98)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
    at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
    at oracle.jsp.JspServlet.service(JspServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
    at org.apache.jserv.JServConnection.run(JServConnection.java:294)
    at java.lang.Thread.run(Thread.java:534)

    I never saw it before but the ClassFormatError states that the runtime can't read your class file because it is malformed.
    Try to remove all your class files and recompile again. I think normally it is backward compatible, but try to use the 1.4 runtime environment in your IDE.

  • Table Types and Line Type

    What is the need of Table Types,
    when there is Tables.
    Even when iam using in the Abap Programs in se38..
    iam not getting any difference..
    Even i want to about the use of Line type
    when there is the structure..
    iam sap 4.7 they gave that Table type describe the structure and
    functional attributes  of an internal table.

    Way: 1:
    Go to SE84 --> Select ABAP Dict --> Table Types -->
    Enter the short names like ORDER wih leading and ending * on the Table Types Field. ---> F8
    This will bring all related entries of Table Types(Line Types) having ORDER has a part of its Name.
    Way:2:
    If you know the Table Name, then go SE11 --> Putch in the Table Name --> Press Display
    Now put the cursor on the Table Name field, press CNTLSHFTF3, on the WHERE USED LIST Pop up, Select only the TABLE TYPE Option and press EXECUTE.
    This will bring the Table Types and Line Types.
    SAP Table Types
    I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
    • Allows secondary indexes (SE11->Display Table->Indexes)
    • Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
    II. Pool Tables (match codes, look up tables)
    • Should be accessed via primary key or
    • Should be buffered (SE11->Display Table->technical settings)
    • No secondary indexes
    • Select * is Ok because all columns retrieved anyway
    III. Cluster Tables (BSEG,BSEC)• Should be accessed via primary key - very fast retrieval otherwise very slow
    • No secondary indexes
    • Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.
    • Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
    • Can not be buffered
    IV. Buffered Tables (includes both Transparent & Pool Tables)
    While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.
    Table Types : A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command
    DATA : itab TYPE TTYP.
    Reafer these links below for clear ideas.
    http://help.sap.com/saphelp_nw04/helpdata/en/fb/f14736a1f0ad1fe10000009b38f839/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
    Thanks
    Allot points if this helps!

  • Urgent : How to modify the line type and table type

    I am working on ALV Grid Control, i need to know how to modify the line type values to table type.
                 ls_celltab-fieldname = 'ZSAVINGS '.
                 ls_celltab-style = l_mode.
            INSERT ls_celltab INTO TABLE pt_celltab.
    Here ls_celltab is line type and pt_celltab is table type.
    Please give me the suggestion ASAP.
    C.Bharath Kumar

    Hi,
    Here is the example
    DATA: BEGIN OF LINE,
            LAND(3)  TYPE C,
            NAME(10) TYPE C,
            AGE      TYPE I,
            WEIGHT   TYPE P DECIMALS 2,
          END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE
              WITH NON-UNIQUE KEY LAND NAME AGE WEIGHT.
    LINE-LAND = 'G'.   LINE-NAME   = 'Hans'.
    LINE-AGE  = 20.    LINE-WEIGHT = '80.00'.
    INSERT LINE INTO TABLE ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Nancy'.
    LINE-AGE  = 35.    LINE-WEIGHT = '45.00'.
    INSERT LINE INTO TABLE ITAB.
    Regards
    Sudheer

  • QM Tables for CLASS(Class Number), KLART(Class Type) and MATNR(Material)

    Hi All,
    is there any table which are having the fields : CLASS(Class Number), KLART(Class Type) and MATNR(Material) in QM.
    the above three fields should be in single fields.
    thanks,

    Hi Gupta,
    Go through the AUSP table: Characterstic Values,
                             IFLOT table : Functional location.
    and
                             KSSKAUSP view for required fields.
    by
    Prasad gvk.

  • Difference between line type and table type

    hi,
    can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's

    hi,
    Go through this blog, this might help you.
    /people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
    People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
    In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
    With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
                            "InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
    class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
    Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
    In a BSP when we need to work with a table we must always do the following:
    1, in the Types definitions create a structure:
                            types : begin of ts_reclist,
    mso-bidi-        style='mso-tab-count:2'>                            receiver type somlreci1-receiver,
    mso-bidi-        style='mso-tab-count:2'>                 style='mso-tab-count: 1'>             rec_type type somlreci1-rec_type,
    mso-bidi-         style='mso-tab-count:2'>                            end of ts_reclist.
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
    2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
    class="MsoNormal">                         types : tt_reclist type table of ts_reclist.
    class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
    3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
                           data: t_reclist type tt_reclist.
    and creating the structure based upon the structure definiton:
    <![if !supportEmptyParas]>   <![endif]>                         data: s_reclist type ts_reclist.
    as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
                            s_reclist-receiver = '[email protected]'.   "<-- change address
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    mso-bidi-                         s_reclist-rec_type = 'U'.
    and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
                            append s_reclist to t_reclist.
    <![if !supportEmptyParas]> <![endif]>
    the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1">           style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>          
    class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                            EXPORTING
    style='mso-tab-count:2'>                                    document_data = docdata
    style='mso-tab-count:2'>                                    DOCUMENT_TYPE = 'RAW'
    style='mso-tab-count:2'>                                    PUT_IN_OUTBOX = 'X'
    style='mso-tab-count:2'>                                    COMMIT_WORK = 'X' "used from rel.6.10
                            TABLES
    mso-bidi-font-size: style='mso-tab-count:2'>                                    receivers = t_reclist
    class="style1"> <![if !supportEmptyParas]>   <![endif]>
    <![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
    <![if !supportEmptyParas]> “when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.”
    Hope this helps, Do reward.

Maybe you are looking for