Report without HEADER LINE

how to create a report with out the HEADER LINE concept....because I want the output as only some of the fields from the table.....
And this type of programming consumes much processing than the normal one.....
NOTE: In normal process I am facing memory problem. It's giving error like "the WORKAREA <internal table> is not enough"
Regards
Suresh

Check the below example ,it has both header line and withou header line:
Internal table with header line
here i am using get time field command ,so use both program and see comparision time
report zxyz.
Internal table with header line.
DATA:BEGIN OF itab OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
END OF itab.
data : f1 type i,
       f2 type i,
       f3 type i.
start-of-selection.
get run time field f1.
SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
loop at itab.
endloop.
get run time field f2.
f3 = f2 - f1 .
write :/ 'Time taken by query in Micro seconds', f3.
Internal table without header line
report zxyz1.
Internal table without header line.
types : begin of ty_itab ,
        lifnr LIKE lfa1-lifnr,
        name1 LIKE lfa1-name1,
        end of ty_itab.
data itab type standard table of ty_itab.
data wa_itab like line of itab.
data : f1 type i,
       f2 type i,
       f3 type i.
start-of-selection.
  get run time field f1.
  SELECT lifnr name1 FROM lfa1 INTO TABLE itab up to 200 rows.
  loop at itab into wa_itab.
  endloop.
  get run time field f2.
  f3 = f2 - f1 .
  write :/ 'Time taken by query in Micro seconds', f3.
I would suggest use always internal table without header line.
Thanks
Seshu

Similar Messages

  • Moving data into internal table without header line

    Hello experts.
    i have two internal tables . itab1 without headerline and itab2 with headerline. itab1 has 10 fields and itab2 has 2 fields.
    BEGIN OF itab,
            lifnr LIKE lfa1-lifnr,
            ktokk LIKE lfa1-ktokk,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            pstlz LIKE lfa1-pstlz,
            ort01 LIKE lfa1-ort01,
            land1 LIKE lfa1-land1,
           j_1ipanno LIKE j_1imovend,
    end of itab.
    DATA: itab1 TYPE STANDARD TABLE OF itab.
    data: begin of itab2 occurs 0,                             
          lifnr like j_1imovend-lifnr,
          j_1ipanno like j_1imovend-j_1ipanno,
      end of itab2.
    now i want to move the data from itab2-j_1ipanno into itab1-j_1ipanno. so pls tell me how to do that. lifnr in both the tables are the same.
    thanks for all the replies.

    Hi Shiva,
    In with out header line,
    You declare header line & body separately like
    data: IT_MARA type standard table of MARA,
    WA_MARA like line of IT_MARA.
    Advantages:
    1. Clear differentiation of header line over body
    2. It is must in the ABAP Objects to have separate header line & body
    3. Use ful in Nested Internal tables
    Disadvantages:
    1. Long syntax
    for example: Loop at IT_MARA into WA_MARA.
    In with header line
    Data ITAB like MARA occurs 0 with header line.
    Advantages:
    1. Simple to use & declare over without header line.
    Also,
    With Header line:
    codedata : itab like <dbtable> occurs 0 with header line.
    Data: begin of itab occurs 0,
    f1 type f1,
    f2 type f2,
    end of itab.[/code]
    Without Header line.
    codeTypes: begin of ty_tab,
    f1 type f1,
    f2 type f2,
    end of ty_tab.
    Data: itab type table of ty_tab, " Internal Table
    wa type ty_tab. " Work Area[/code]
    at any point of time use internal table without header line,it will be good performance as well OO ABAP will allow only internal table without header line.
    Just use one simple example :
    create one simple program with header line,use get run time field.
    create one simple program without header line,use get run time field.
    see the results ,here time will be micro seconds,so take 1000 records to internal table and do calculate the time.
    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.
    kindly reward if found helpful.
    cheers,
    Hema.

  • Change report standard header line

    Hi Friends,
    I have to change the print of standard header of all reports by using cmod exit S38MREP1.  I have to print User-ID Time and system-ID on each page incl. all SAP standardreports.
    thanks in advance
    Harald

    Hi Harald,
       Are you saying about the report output or when we create a report commentted lines that we get.
    Regards,
    Kiran I
    If you are saying about the commented lines that we get at the time of creating report then this may not work.
    For that you can use table
    TSE05
    Inputs for this table are APP_OBJ = 'ADDM' and Keyword = 'REPORT' for report .
    reward points if it solved your issue.
    Message was edited by:
            kiran i

  • With header line & with out header line ?

    what is difference between with header line & without header line ?

    When you create an internal table object you can also declare a header line with the same name. You can use the header line as a work area when you process the internal table. The ABAP statements that you use with internal tables have short forms that you can use if your internal table has a header line. These statements automatically assume the header line as an implicit work area. The following table shows the statements that you must use for internal tables without a header line, and the equivalent statements that you can use for internal tables with a header line:
    Operations without header line
    Operations with header line
    Operations for all Table Types
    INSERT <wa> INTO TABLE <itab>.
    INSERT TABLE ITAB.
    COLLECT <wa> INTO <itab>.
    COLLECT <itab>.
    READ TABLE <itab> ... INTO <wa>.
    READ TABLE <itab> ...
    MODIFY TABLE <itab> FROM <wa> ...
    MODIFY TABLE <itab> ...
    MODIFY <itab> FROM <wa> ...WHERE ...
    MODIFY <itab> ... WHERE ...
    DELETE TABLE <itab> FROM <wa>.
    DELETE TABLE <itab>.
    LOOP AT ITAB INTO <wa> ...
    LOOP AT ITAB ...
    Operations for Index Tables
    APPEND <wa> TO <itab>.
    APPEND <itab>.
    INSERT <wa> INTO <itab> ...
    INSERT <itab> ...
    MODIFY <itab> FROM <wa> ...
    MODIFY <itab> ...
    Using the header line as a work area means that you can use shorter statements; however, they are not necessarily easier to understand, since you cannot immediately recognize the origin and target of the assignment. Furthermore, the fact that the table and its header line have the same name can cause confusion in operations with entire internal tables. To avoid confusion, you should use internal tables with differently-named work areas.
    The following example shows two programs with the same function. One uses a header line, the other does not.
    With header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1
    WITH HEADER LINE.
    DO 4 TIMES.
    ITAB-COL1 = SY-INDEX.
    ITAB-COL2 = SY-INDEX ** 2.
    INSERT TABLE ITAB.
    ENDDO.
    ITAB-COL1 = 2.
    READ TABLE ITAB FROM ITAB.
    ITAB-COL2 = 100.
    MODIFY TABLE ITAB.
    ITAB-COL1 = 4.
    DELETE TABLE ITAB.
    LOOP AT ITAB.
    WRITE: / ITAB-COL1, ITAB-COL2.
    ENDLOOP.
    Without header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,
    WA LIKE LINE OF ITAB.
    DO 4 TIMES.
    WA-COL1 = SY-INDEX.
    WA-COL2 = SY-INDEX ** 2.
    INSERT WA INTO TABLE ITAB.
    ENDDO.
    WA-COL1 = 2.
    READ TABLE ITAB FROM WA INTO WA.
    WA-COL2 = 100.
    MODIFY TABLE ITAB FROM WA.
    WA-COL1 = 4.
    DELETE TABLE ITAB FROM WA.
    LOOP AT ITAB INTO WA.
    WRITE: / WA-COL1, WA-COL2.
    ENDLOOP.
    The list, in both cases, appears as follows:
    1 1
    2 100
    3 9
    The statements in the program that does not use a header line are easier to understand. As a further measure, you could have a further work area just to specify the key of the internal table, but to which no other values from the table are assigned.
    Internal table with header line
    you can use anywhere except obkect oriented concept.
    Internal table without header line :
    You should use in Object oriented concept..
    Always try to use without header line,performance point of view it is best..
    Example :
    Without header line.
    Structure
    types : begin of ty_itab ,
    matnr type mara-matnr,
    end of ty_itab.
    Internal table
    data i_itab type standard table of ty_itab .
    Work area
    data wa_itab like line of i_itab
    With header line
    data : begin of i_itab occurs 0,
    matnr like mara-matnr,
    end of i_itab
    itab with header lines are obsolete, anyway it will work but not recommended. instead use work area or more effiecient is field symbols. so donot use itab with header line.
    i will explain use of itab w/o header line.
    Data: itab1 type standard table of mara with header line occurs 0,
            itab2 type standard table of mara,
            wa_itab2 type mara.
    loop at itab1.
    "This will work fine.
    endloop.
    loop at itab2.
    "This will give erro that itabd does not hav workarea
    endloop.
    "so write
    loop at itab2 into wa_itab2.
    "This will work
    endloop.
    <b>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</b>
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • How to create an internal table with header line in smartforms

    Hello Guys,
    I need to append the data in my internal table in smartforms by the problem is an error occurred "a table without header line  and therefore no component called tdline"
    i already declared the data under types declaration tab
    types : begin of ts_tline,
             TDFORMAT type tdformat,
             tdline type tdline,
            end of ts_tline.
    types : it_tline type table of ts_tline.
    and declare these in global data
    WA_TLINE type TS_TLINE
    XT_TLINE type IT_TLINE
    my syntax in program lines :
      LOOP AT  gy_lines INTO WA_PROJ.
        SPLIT wa_proj AT  cl_abap_char_utilities=>cr_lf
           INTO table IT_SPLIT.
        LOOP AT IT_SPLIT.
          MOVE it_split-commentext TO xt_TLINE-tdline.
    an error occured at this part ****
         append xt_TLINE.
        ENDLOOP.
      ENDLOOP.
    what is wrong with my code..it cannot append data to xt_tline.
    Please help.Will reward points
    Thanks in advance
    aVaDuDz

    check this link
    this will help u......
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    reward IF..........
    regards
    Anbu

  • 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

  • How to move field symbol internal table to internal table with header line?

    Dear all,
    hi...hereby i would like to ask how i can move field symbol internal table to a internal table?
    as i know field symbol internal table is without header line..
    so, may i know how to do this....to move field symbol internal table to internal table which consist of header line and field and record will same as field symbol internal table...in additional, my field symbol internal table is dynamic table mean everytime will have flexible columns..?
    Please advise...
    Thanks
    Regard,
    ToToRo.
    Edited by: @ToToRo@ on Aug 20, 2009 6:16 AM

    Hello,
    Try this way:
    If both the type of internal tables are same then you can directly assign dynamic internal table to static internal table.
    itab = <itab>.
    Suppose you have field symbol internal table <itab> which is different in structure from ITAB.
    Now, you can create <wa> as follow:
    FIELD-SYMBOLS <wa>.
    DATA wa TYPE REF TO DATA.
    CREATE DATA wa TYPE LINE OF <itab>.
    ASSIGN wa->* to <wa>.
    This way your work area is read.
    Using [ASSIGN COMPONENT|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3923358411d1829f0000e829fbfe/content.htm] syntax you can read required component of <wa>.
    Finally you can use that value to load static internal table.
    You can also refer to my thread on [Dynamic table|Re: Creating Dynamic table].
    Hope this helps!
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 20, 2009 10:06 AM

  • Alternative for 'WITH HEADER LINE' ?

    Hello All,
    In BSP's I gues we can't use table with header lines and occurs 0.
    SO whts the alternative for this ?
    I want to use the FM 'GET_COMPONENT_LIST' .
    To this FM I need to pass the table which is declared with  occurs 0 or with header line .
    Eg:
    DATA: lt_cols TYPE STANDARD TABLE OF it_cols with header line.
    DATA: v_count TYPE i.
    CALL FUNCTION 'GET_COMPONENT_LIST'
      EXPORTING
        program    = sy-repid
        fieldname  = 'LT_COLS'
      TABLES
        components = itab[].
    DESCRIBE TABLE itab LINES v_count.
    WRITE v_count.
    " I've used the following code :
          DATA: ls_final_t    TYPE STANDARD TABLE OF mara initial size 10  ,
                lt_rstrucinfo TYPE TABLE OF rstrucinfo .
          CALL FUNCTION 'GET_COMPONENT_LIST'
            EXPORTING
              program    = 'CL_O243NHIEBSRAZZG8RPTVGL3YAH9CP'
              fieldname  = 'LS_FINAL_T'
            TABLES
              components = lt_rstrucinfo[].
    But it's not working .
    I guess the problem is wid passage of parameter for program.
    Bcoz i tried the same in the ABAP Program and it's working !
    SO can any one tell me what to pass for the program ?
    I tried with sy-repid , hardcoded my BSP application name , but none of them worked !!!
    Can anyone help me out ?
    Regards,
    Deepu.K

    Hi Depp,
    The problem with your code example is that you should not have used the [] addition to the table name.
    Try this...
          CALL FUNCTION 'GET_COMPONENT_LIST'
            EXPORTING
              program    = 'CL_O243NHIEBSRAZZG8RPTVGL3YAH9CP'
              fieldname  = 'LS_FINAL_T'
            TABLES
              components = lt_rstrucinfo. "Note change here!
    It is a good idea to get used to working with tables without header lines. I like to use data references where possible.
    For example...
      DATA: i_tab TYPE TABLE OF sflight,
            w_ref TYPE REF TO sflight.
    * Append line to table
      APPEND INITIAL LINE TO i_tab REFERENCE INTO w_ref.
      w_ref->carrid = 'AA'.
      w_ref->connid = '123'.
    * Loop through table
      LOOP AT i_tab REFERENCE INTO w_ref.
        WRITE: / `ConnID is `, w_ref->connid.
      ENDLOOP.
    * Read line
      READ TABLE i_tab REFERENCE INTO w_ref WITH KEY connid = '123'.
    Cheers
    Graham Robbo

  • Header, line and adress details

    hi experts,
    actually i am working on outbound iunterface.
    in the target structure it is given as ,
    1.header,
    2, line items,
    3, adress.
    using my select statements i have retrived the data and in the target structure the data should be displayed as
    1.header,
    2, line items,
    3, adress.
    plz suggest me how to do.
    regards,
    siri.

    Hi rajesh,
    Header is a workarea of the table which acts as an interface for the table. Header can have only one record at a time.
    WORKAREA is a structure that can hold only one record at a time. It is a collection of fields. We use workarea as we cannot directly read from a table. In order to interact with a table we need workarea. When a Select Statement is executed on a table then the first record is read and put into the header of the table and from there put into the header or the workarea(of the same structure as that of the table)of the internal table and then transferred top the body of the internal table or directly displayed from the workarea.
    Each row in a table is a record and each column is a field.
    example,
    internal table.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    workarea.
    data: begin of itab,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    also,
    workarea:
    types: begin of type_mat,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of type_mat.
    internal table
    data: t_mat type standard table of type_mat.
    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.

  • Chunked header line gets removed

    Some webserver at akamai (for instance: www.fedex.com ) delivers the data chunked.
    A snoop trace indicated that the server sends a header line "Transfer-Encoding: chunked". The proxy (3.6 SP6 on Solaris) removes this header as it sends it to the client. The content however still has all chunk sizes within. So, in the browser, we see the content with lots of 8-digit hex-numbers in between.
    Is this a bug in 3.6 SP6?
    Best regards,
    Jeroen Besse

    > Hi all,
    > I have to use a function
    > CLAF_CLASSIFICTION_OF_OBJECTS'
    > inside a BADI called BATCH_Master.
    > Now the thing is that the data which I have to read
    > gets fetched in one of the tables of function
    > module.
    >
    > Following CODE works fine if <b>I am not using
    > BADI.</b>
    >
    > Data: P_CLASS like SCLASS occurs 0 with header line,
    > P_OBJECTDATA like CLOBJDAT occurs 0 with header
    > line.
    >
    > *
    > *
    > Call Function 'CLaff_Classification_OF OBjects'
    > *
    > *
    > TABLES
    > T_CLASS = P_Class
    > T_OBJECTDATA = P_OBJECTDATA.
    > *
    > *
    >
    > LOOP AT P_OBJECTDATA.
    > WRITE: / P_OBJECTDATA-AUSP1.
    > ENDLOOP.
    >
    > <b>But if I am use BADI then I can't use header
    > line.</b>
    > Data:
    > P_Class TYPE STANDARD TABLE OF SCLASS initial size 0,
    >
    > P_Objectdata TYPE STANDARD TABLE OF CLOBJDAT initial
    > size 0.
    >
    > Now I can't print the values of P_Objectdata because
    > I am not using header line since I am using BADI.
    >
    > How can I print P_Objectdata because I can't use
    > header line in BADI while declaring any table (Due to
    > OO Concept) ?
    If you declare your table without header line, make sure that the internal table is passed to a function call with the brackets
    Call Function 'CLaff_Classification_OF OBjects'
    TABLES
    T_OBJECTDATA = itab[].
    >
    Also you need a workarea for your loop.
    loop at itab into wa.
    endloop.
    Hope this helps
    Christian

  • Header line problem inside BADI method

    Hi all,
    I have to use a function CLAF_CLASSIFICTION_OF_OBJECTS'
    inside a BADI called BATCH_Master.
    Now the thing is that the data which I have to read gets fetched in one of the tables of function module.
    Following CODE works fine if <b>I am not using BADI.</b>
    Data: P_CLASS like SCLASS occurs 0 with header line,
    P_OBJECTDATA like CLOBJDAT occurs 0 with header line.
    Call Function 'CLaff_Classification_OF OBjects'
    TABLES
    T_CLASS = P_Class
    T_OBJECTDATA = P_OBJECTDATA.
    LOOP AT P_OBJECTDATA.
    WRITE: / P_OBJECTDATA-AUSP1.
    ENDLOOP.
    <b>But if I am use BADI then I can't use header line.</b>
    Data:
    P_Class TYPE STANDARD TABLE OF SCLASS initial size 0,
    P_Objectdata TYPE STANDARD TABLE OF CLOBJDAT initial size 0.
    Now I can't print the values of P_Objectdata because I am not using header line since I am using BADI.
    How can I print P_Objectdata because I can't use header line in BADI while declaring any table (Due to OO Concept) ?

    > Hi all,
    > I have to use a function
    > CLAF_CLASSIFICTION_OF_OBJECTS'
    > inside a BADI called BATCH_Master.
    > Now the thing is that the data which I have to read
    > gets fetched in one of the tables of function
    > module.
    >
    > Following CODE works fine if <b>I am not using
    > BADI.</b>
    >
    > Data: P_CLASS like SCLASS occurs 0 with header line,
    > P_OBJECTDATA like CLOBJDAT occurs 0 with header
    > line.
    >
    > *
    > *
    > Call Function 'CLaff_Classification_OF OBjects'
    > *
    > *
    > TABLES
    > T_CLASS = P_Class
    > T_OBJECTDATA = P_OBJECTDATA.
    > *
    > *
    >
    > LOOP AT P_OBJECTDATA.
    > WRITE: / P_OBJECTDATA-AUSP1.
    > ENDLOOP.
    >
    > <b>But if I am use BADI then I can't use header
    > line.</b>
    > Data:
    > P_Class TYPE STANDARD TABLE OF SCLASS initial size 0,
    >
    > P_Objectdata TYPE STANDARD TABLE OF CLOBJDAT initial
    > size 0.
    >
    > Now I can't print the values of P_Objectdata because
    > I am not using header line since I am using BADI.
    >
    > How can I print P_Objectdata because I can't use
    > header line in BADI while declaring any table (Due to
    > OO Concept) ?
    If you declare your table without header line, make sure that the internal table is passed to a function call with the brackets
    Call Function 'CLaff_Classification_OF OBjects'
    TABLES
    T_OBJECTDATA = itab[].
    >
    Also you need a workarea for your loop.
    loop at itab into wa.
    endloop.
    Hope this helps
    Christian

  • Header line and work area

    Hi,
    can anyone please explain me wht is the difference between header line and work area???

    Hi,
    INTERNAL TABLES
    - Internal tables are used to obtain data from a fixed structure for
    dynamic use in ABAP.
    - Each line in the internal table has the same field structure.
    - The main use for internal tables is for storing and formatting data from
    a database table within a program.
    WORK AREAS
    - Work areas are single rows of data.
    - It should have the same format as any of the internal tables.
    - It is used to process the data in an internal table one line at a time.
    Internal Tables with Header Line : Here the system automatically creates the work area. The work area has the same data type as internal table. This work area is called the HEADER line. It is here that all the changes or any of the action on the contents of the table are done. As a result of this, records can be directly inserted into the table or accessed from the internal table directly.
    Internal Tables without Header Line : Here there is no work area associated with the table. Work area is to be explicitly specified when we need to access such tables. Hence these tables cannot be accessed directly.
    HEADER LINE----
    CREATED EXPLICITLY------
    1.Internal table created by referring to another table
    Syntax: Data <f> <type> with header line.
    <type> refers to a table data type or table data objects using type or like.
    Here internal table <f> is created of the type <type>.
    Example:
    DATA t_line TYPE line OCCURS 10 with header line.
    2. Internal table created by referring to existing structure
    Syntax: Data<f> <type> occurs n with header line.
    The lines of the internal table <f> have the data type specified in <type> (Can use either like or type).
    Example:
    DATA flight_tab LIKE sflight OCCURS 10.
    CREATED BY DEFAULT---
    3. Internal table created With a new structure
    Syntax: Data : Begin of <f> occurs <n>,
    <component declaration>,
    End of <f>.
    Work area is created by default.
    Example:
    Data : Begin of itab occurs 10,
    column1 type I,
    column2(4) type C,
    column3 like mara-ernam,
    End of itab.
    reward if useful
    Regards

  • HEader Line Issue

    Hi All,
    Previously i have declared a data as
    DATA: BEGIN OF t_temp OCCURS 10,
          vbeln TYPE char10,
          END OF t_temp.
    <code continues>
    LOOP AT t_data INTO fs_data.
        IF NOT fs_data-del_no IS INITIAL.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = fs_data-del_no
            IMPORTING
              output = t_temp-vbeln.
          COLLECT t_temp.
        ENDIF.
    APPEND LINES OF t_TYPE_temp TO T_ty_vbeln
    With the above  i am able to fetch the data in in t_temp.
    I have changed the data declarations as
    TYPES: BEGIN OF tYPE_temp,
          vbeln TYPE char10,
          END OF tYPE_temp.
    DATA: FS_TYPE_TEMP TYPE TYPE_TEMP,
          T_TYPE_TEMP TYPE STANDARD TABLE OF TYPE_TEMP.
    And the same loop i am using as shown below.
    LOOP AT t_data INTO fs_data.
        IF NOT fs_data-del_no IS INITIAL.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = fs_data-del_no
            IMPORTING
              output = t_type_temp-vbeln.
          COLLECT t_type_temp.
        ENDIF.
    APPEND LINES OF t_TYPE_temp TO T_ty_vbeln
    In the above case i am getting error as t_type_temp is a table without header line and
    therefore has no component called "VBELN". What changes has to be done.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Nov 13, 2009 11:30 AM

    HI ,
      you write the code as like this..
    TYPES: BEGIN OF type_temp,
                      vbeln TYPE char10,
               END OF type_temp.
    DATA: FS_TYPE_TEMP TYPE TYPE_TEMP,
    T_TYPE_TEMP TYPE STANDARD TABLE OF TYPE_TEMP.
    And the same loop i am using as shown below.
    LOOP AT t_data INTO fs_data..
    IF NOT fs_data-del_no IS INITIAL.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = fs_data-del_no
    IMPORTING
    output = FS_TYPE_TEMP-vbeln.
    APPEND FS_TYPE_TEMP TO T_TYPE_TEMP
    ENDIF.
    endloop.

  • Diff between header line and work area.

    Diff between header line and work area.

    Hi,
    These are table with header line.
    DATA: T_TABLE type table of <table_name> with header line.
    data: begin of t_table occurs 0,
                  field1 type ...
                  field2 type ...
                  field3 type ...
          end of t_table.
    <b>The result is:</b>
    <u><b>TABLE</b></u>    
    FIELD NAME  |FIELD1|FIELD2|FIELD3|  
    HEADER LINE |EE1   |EE2   |EE3   | <---- Line 5 content
               1|AA1   |AA2   |AA3   |  
               2|BB1   |BB2   |BB3   |  
               3|CC1   |CC2   |CC3   |
               4|DD1   |DD2   |DD3   |
               5|EE1   |EE2   |EE3   |
    These are table without header line.
    DATA: T_TABLE type table of <table_name>.
    DATA: T_TABLEX LIKE TABLE OF t_table.
    <b>The result is:</b>
    <u><b>TABLE</b></u>    
    FIELD NAME  |FIELD1|FIELD2|FIELD3|  
                     0|---   |---   |---   | <---- No header Line
                     1|AA1   |AA2   |AA3   |  
                     2|BB1   |BB2   |BB3   |  
                     3|CC1   |CC2   |CC3   |
                     4|DD1   |DD2   |DD3   |
                     5|EE1   |EE2   |EE3   |
    These are work areas:
    Tables <table>.
    DATA: wa type <table>.
    DATA: wa like t_table.
    DATA: wa type line of <table>.
    <b>The result is:</b>
    <u><b>WORK AREA</b></u>  
    |EE1   |EE2   |EE3   | <---- Content
    Regards.
    Marcelo Ramos

  • Work area VS header line

    guyz!
    why do we hafta create WORK AREA ??? cant we make use of the header line.
    what if we make use of int tabs wid header lines.???
    dont say dat performance issue....plzz explain me dat..
    Regards
    zid.

    Hi
    When you define an internal table the system arranges a part of memory area in two parts:
    - The first one is to stores all records loaded in the table;
    - The second one is to store the single record is elaborated,
    So when you loop an internal table, the system picks up the record from the first area and puts it to the second one;
    The part of memory to store all records is obligatory, so the system'll always create it when an internal table is defined.
    The part of memory to store the single record is not necessary, you have to use it only if it needs to read the table: this one is called HEADER LINE or WORK AREA.
    So you can decide to declare a table with or without an header line in according to what you need to do.
    A) If you need to read the table you need to have a table with header line or work area:
    - WITH HEADER LINE
    DATA: BEGIN OF ITAB OCCURS 0,
                  FIELD1,
                  FIELD2,
                  FIELD3,
               END    OF ITAB. 
    LOOP AT ITAB.
      WRITE ITAB.
    ENDLOOP.
    While looping the table the system automatically fills the header line;
    - WITH WORK AREA:
    DATA: BEGIN OF WA_ITAB,
                  FIELD1,
                  FIELD2,
                  FIELD3,
               END    OF WA_ITAB. 
    DATA: ITAB LIKE STANDARD TABLE OF WA_ITAB.
    LOOP AT ITAB INTO WA_ITAB.
      WRITE WA_ITAB.
    ENDLOOP.
    While looping the table the system automatically fills the work area.
    So it can say the header line is a work area the system automatically creates by internal table defination.
    It's the same to use the header line or work area, because you need them when you have to read the records of an internal table.
    A) If you don't need to read the table, you can define a table without header line:
    SELECT-OPTIONS: SO_ERDAT FOR SY-DATUM.
    DATA: IT_MATERIAL LIKE MARA-MATNR OCCURS 0.
    DATA: IT_MARC LIKE STANDARD TABLE OF MARC WITH HEADER LINE.
    SELECT MATNR FROM MARA INTO TABLE IT_MATERIAL WHERE ERDAT IN SO_ERDAT.
    IF SY-SUBRC = 0.
      SELECT * FROM MARC
            FOR ALL ENTRIES IN IT_MATERIAL WHERE MATNR = IT_MATERIAL.
    ENDIF.
    LOOP AT IT_MARC.
      WRITE IT_MARC.
    ENDLOOP.
    In this example the internal table IT_MATERIAL is used only to select the data from MARC using the option FOR ALL ENTRIES. This options doesn't use the header line of the table, so it's useless to define a table with an heaader line.
    Max

Maybe you are looking for

  • DVI to Component or VGA to component for 1080i TV

    I've gotten a ton of different answers from different people, so I figured I'd ask here to see if I could get a straight answer from someone. I just bought an older 55" Mitsubishi projection TV that displays at 1080i. The only issue is that it only a

  • FLVplayback stop the swf if...

    Hi, I have a strange problem.. i'm using the FlVplayback component in Flash CS4. On line, when i drag the seekbar cursor beyond the  loaded zone the flv stops and the swf stops working. The problems occurs only with flv videos, the same player works

  • Quicktime movies won't play on Apple Website

    I formatted my HD and reinstalled Snow Leopard. Last night and this morning I was watching the videos on http://www.apple.com/business/theater/#activecorners?sr=hotnews.rss, but tnight when I went back there, the movies won't play, nor will any other

  • Mod_auth_kerb and Kerberos

    Hi, I currently have Apache 2.2.4 with mod_auth_kerb 5.3 running on Linux. I followed the instructions in http://www.grolmsnet.de/kerbtut/ to setup authentication against windows 2000 as KDC. I also configured IE to support SPNEGO so that i can do tr

  • My lists of fonts is all scrunched together and I can't read them?

    Has anyone seen this before? It's a little bit annoying. It happened after I imported new fonts, I guess. It's been like this for awhile, I've just lived with it. But now, every time I import a new font, I think it's getting worse. Any thoughts?