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.

Similar Messages

  • I need to call specific header,line and footer based on condition

    Hi All,
    i am working on PO report and it has 3 PO_types. In my rtf i created 3 Header,3 Lines, 3 detials. And at a time only one Header, One line and one detail should call based on PO_TYPE.
    Can any body guide me, to achieve this. Or is there any other way for it?
    Thanks in advance !
    Regards,
    Ad

    Maybe you can try the <?start:body?> and <?end body?>

  • Move Order lines and Delivery Detail lines - Relationship

    Hi All,
    Is there a one - to - one realtionship between Move Order Line and Delivery Detail Line?
    i.e., Each Move Order line will correspond to only one Delivery Details line Record?
    Thanks in advance.
    Regards,
    Gowri

    Hello,
    There is a one - to - many relationship between Move Order Line and Delivery Detail Line when you split lines in delivery.
    select * from mtl_material_transactions t you have source_id.
    select * from WSH_DELIVERABLES_v t you have move_order_id.
    Regards,
    Luko

  • 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

  • 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

  • Add new email header line and add Bcc recepient to this additional header.

    Hi Folks,
    iMS5.2p1, Solaris 8.
    Just after a few directions. I have a 'catch-all' mbox, that customer POP's. The customer then uses MDaemon to deliver email, based on rules to correct recepients, works fine until a Bcc comes in, as quoted below.
    Why doesn't MDaemon parse the BCC header?
    BCC only works with SMTP mail. By definition, the carbon copy is "Blind".
    There are no headers in the message which can be parsed using the POP3 method that would provide the address. The only hope for these kinds of messages is to get the ISP to stamp the message file with the delivery information from the SMTP session during delivery to the ISP. For example, when the person sends the BCC message to the ISP hosting the mail, some of them stamp a header called "Deliver-To:" into the message. MDaemon could pick up on such a header if it existed.
    I know I would have to tackle this with either a re-write/mapping/conversion, but not sure what the best approach, ie to add and rewrite the Bcc, recepient into the new 'Deliver-To:' header.
    Any good solutions/tips ?
    Cheers folks.

    Hi Jay,
    Sorry if there is any confusion. The customer at his premises has a server running this mail app. called MDaemon, which uses filters to deliver to local mboxes for their users. The customer in question just wanted a 'catch-all' mbox with iMS for his domain (which we host), to just POP3 this mbox and then the customer's MDaemon app, parses through filters to deliver to correct local mbox. They didn't want to have each user's mbox hosted on iMS....as yet anyway, thus the need for 'catch-all' delivery of email for the customer domain to one iMS mbox.
    The problem is with any Bcc email for customer's domain. As described POP3 as per definition hides the Bcc line, thus MDeamon filters at customer end will fail delivery to intended recepient. Thus the doco from MDaemon as explained to me from the customer can handle additional header lines and parse that way. Thus the need to add the recepient in the Bcc line to an additional header (ie. Deliver-To: [Bcc smtp recepient]). Then as MDeamon doco says it can be setup to parse and deliver to correct local mbox. I hope that my be a little clearer.
    So I need to on iMS rewrite any Bcc recepient for customers 'catch-all' mail domain and add another header line (ie. Deliver-To: [Bcc smtp recpient]). So when customer POP's iMS mbox, Mdeamon at customer's end will parse and deliver locally.
    Hope that makes sense and the best way to add an additional header and take the original Bcc line and add to to new header is.....hopefully a pointer from your good self.
    Cheers.

  • I want to create an internal table without using header line and occurs 0?

    hi experts,
    Can anybody help me to declare an internal table without using headerline and occurs 0 options but still i have to use the functionalities that occurs 0 and header line options provide.

    Hi Saisri,
    You can use the internal table without headerline and create a header for then internal table with the same structure. We need to use the header while manipulating with the data of the internal table.
    example:
    types: begin of ty_afpo,
                 kdauf type kdauf,
                 kdpos type kdpos,
                 ltrmp   type ltrmp,
               end   of ty_afpo.
    data : t_afpo type standard table of ty_afpo,  " internal table declaration
             wa_afpo type ty_afpo.                        " work area declaration
    <after populating the data into the internal table>
    loop at t_afpo into wa_afpo.
    write:/ wa_afpo-kdauf, wa_afpo-kdpos, wa_afpo-ltrmp.
    endloop.
    This I think shall give you a basic understanding of how things work.
    <b>Reward points if this helps,</b>
    Kiran

  • Custom Report with 3 Header lines and three separate detail lines

    Need help in creating a report:
    Objectives - break on hidden first field with a horizontal line for the separator (no summing)
    Expand/collapse detail lines with resetting pagination for that page based on this action. (1-15 select list)
    Header 1 Header 2 Header3 Header4 Header5 Header6
    Header 1a Header2a Header3a Header6a
    Header3b Header4b Header5b
    (-)Detail1 field Detail1 field Detail1 field Detail1 field Detai1l field Detail1 field
    (-)Detail2 field Detail2 field Detail2 field Detail2 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    (-)Detail2 field Detail2 field Detail2 field Detail2 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    (-)Detail1 field Detail1 field Detail1 field Detail1 field Detail1 field Detail1 field
    (-)Detail2 field Detail2 field Detail2 field Detail2 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    Detail3 field Detail3 field Detail3 field Detail3 field
    (+)Detail2 field Detail2 field Detail2 field Detail2 field
    (-) = collapse ; (+)= expand
    Edited by: user1073751 on Sep 23, 2010 6:30 PM

    Hi cupboy1,
    According to your description, you want to design your report as the screenshot your post and hide the detail row until select in top parent group. Right?
    In this scenario, we can design the report as you have done by yourself, then delete the column (Label), but still keep the Label group, then add a column left of Disc, put the data field into appropriate textbox. You can get the same effect as your first
    screenshot. And we can hide the detail rows and set them toggled by Artist. We have tested your case in our local environment. Here are steps and screenshots for your reference:
    1. Create a table. Drag Disc into textbox, add parent group with header (group on Label) for Disc, add parent group with header (group on Artist) for Label.
    2. Delete the column Label, add a column left of Disc.
    3. Right click on detail rows, select Row Visibility. Set hide and toggled by Artist.
    4. Save and preview. It looks like below:
    Reference:
    Row Visibility Dialog Box (Report Builder)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Populate Line and Master details

    hi All,
    I have created 3 form 1.Quotation 2.Autocreate 3.Purchase Order.
    Autocreate form is having Only one field Quotation Number(LOV) and one button 'Autocreate'
    I want whenever i select Quotation number and press 'Autocreate' button purchase order form should open and populate all details of master and line in Purcahse order form Quotation.
    I have written folloing query but only header details are populating not line ....pl help
    :GLOBAL.REQ_NO1 := 'Requsition.REQ_NO';
    :GLOBAL.QUOT_NO1 := 'Quotation.QUOT_NO';
    IF
    :GLOBAL.REQ_NO1 = 'Requsition.REQ_NO' THEN
    GO_BLOCK('PO_HEADERS');
    :PO_HEADERS.REQ_NO := :FND_FORM.REQ_NO;
    ELSIF
    :GLOBAL.QUOT_NO1 = 'Quotation.QUOT_NO' THEN
    GO_BLOCK('PO_HEADERS');
    :PO_HEADERS.QUOT_NO :=:FND_FORM.QUOT_NO;
    END IF;
    Please help
    Ar

    Hello
    I have created this code .
    DECLARE
    TYPE REQ_LINE_REC IS RECORD
    P_LINE_NUM NUMBER,
    P_ITEM_CODE VARCHAR2(10),
    P_DESCRIPTION VARCHAR2(240),
    P_UOM VARCHAR2(10),
    P_PRICE NUMBER,
    P_CATEGORY VARCHAR2(30),
    P_QUANTITY NUMBER)--,
    P_NEEDBYDATE DATE );
    P_LINE REQ_LINE_REC;
    CURSOR ITEM_CUR is
    SELECT LINE_NUM,ITEM_CODE,DESCRIPTION,UOM,PRICE,CATEGORY,QUANTITY,NEED_BY_DATE
    FROM PO_REQUISITION_LINE;
    -- WHERE REQ_NO =:FND_FORM.REQ_NO;
    BEGIN
         :PO_HEADERS.REQ_NO := :FND_FORM.REQ_NO;
         GO_BLOCK('PO_LINES');
         --OPEN ITEM_CUR;
         FOR rec IN ITEM_CUR LOOP
         --IF :SYSTEM.RECORD_STATUS!='NEW' THEN
    --CREATE_RECORD;
    --END IF;
    FETCH ITEM_CUR INTO P_LINE;
    EXIT WHEN ITEM_CUR%NOTFOUND;
    :PO_LINES.LINE_NUM := P_LINE.P_LINE_NUM ;
    :PO_LINES.ITEM := P_LINE.P_ITEM_CODE;
    :PO_LINES.DESCRIPTION := P_LINE.P_DESCRIPTION;
    :PO_LINES.UOM := P_LINE.P_UOM ;
    :PO_LINES.PRICE := P_LINE.P_PRICE ;
    :PO_LINES.CATEGORY := P_LINE.P_CATEGORY ;
    :PO_LINES.QUANTITY := P_LINE.P_QUANTITY;
    :PO_LINES.NEED_BY_DATE := P_LINE.NEEDBYDATE;
    END LOOP;
    END ITEM_CUR;
    but loop is noot working here. it give only single value in po_line table...
    Plz Help...
    Archana

  • Internal table with header line and work area.

    data:itab like LIKE bapimepoheader.
    DATA : BEGIN OF it_po_items OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA : END OF it_po_items.
    DATA:it_input         TYPE STANDARD TABLE OF typ_input,
          wa_input         TYPE typ_input,
    LOOP AT it_input INTO wa_input WHERE poind = 'H'.
    CLEAR wa_po_header.
      wa_po_header-doc_type  = wa_input-bsart.
      wa_po_header-comp_code = wa_input-bukrs.
      wa_po_header-vendor    = wa_input-lifnr.
    CLEAR it_po_items.
      it_po_items-po_item = v_itemcount * 10.
      it_po_items-acctasscat = wa_input-knttp.
      it_po_items-material   = wa_input-matnr.
      it_po_items-plant      = wa_input-werks.
      it_po_items-quantity   = wa_input-menge.
      it_po_items-net_price  = wa_input-netpr.
      it_po_items-po_unit    = wa_input-meins.
      it_po_items-free_item  = wa_input-umson.
      it_po_items-tax_code   = wa_input-mwskz.
      it_po_items-gr_ind     = wa_input-wepos.
      it_po_items-gr_non_val = wa_input-weunb.
      it_po_items-incoterms1 = wa_input-inco1.
      it_po_items-incoterms2 = wa_input-inco2.
      it_po_items-vend_mat   = wa_input-idnlf.
      it_po_items-taxjurcode = wa_input-txjcd.
      it_po_items-item_cat   = wa_input-pstyp.
      APPEND it_po_items.
    here my doubt is whether i can move data from work area to internal table in this way?
    whether this is the correct approach or not?

    hii,
    u can define structure and make workarea ,internal table using that structure.
    for example
    types:begin of struct,
             declare all fields,
             end of struct.
    data:wa type struct,
           int_tab type standard table of struct.
    hope this will help u.

  • Lt_item_type is a table with out header line and therefore has no component

    Dear frnds,
    I am new to webdynpro i got this error while creating a tree .can any body tell me what is the mistake i have done.
    Regards.
    siva

    Hi,
    As you are new to the tree concepts.Try to do this tutorial.It will give a idea.
    [Tree|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d075dbc5-3b33-2c10-5f9f-99bf2738fe6a?QuickLink=index&overridelayout=true]
    Regards,
    Karthik.R

  • 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

  • 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

  • Passing an internal table WITH HEADER LINE to abap object

    Hi. In another thread, it was explained how to pass an internal table to an abap object method. Is it possible to pass an internal table that has a header line, and RETAIN the header line once the table has been passed?
    My problem is, that I can pass the table, update it, but the read buffer is not populated when returning from the object's method. This is the result of being able to pass a STANDARD TABLE type, but not a STANDARD TABLE WITH HEADER LINE.
    This means that I have to read the table into a work area instead of doing a READ TABLE LKNA1 within the method, which is what I need to do.
    Thanks.

    Please check this sample program, notice that it is modifing the internal table and passing it back modified as well as passing the "work area" or "header line" back thru the exporting parameter.
    report zrich_0001.
    *       CLASS lcl_app DEFINITION
    class lcl_app definition.
      public section.
        types: t_t001 type table of t001.
        class-data: it001 type table of t001.
        class-data: xt001 like line of it001.
        class-methods: change_table
                                    exporting ex_wt001 type t001
                                    changing im_t001 type t_t001.
    endclass.
    data: w_t001 type t001.
    data: a_t001 type table of t001 with header line.
    start-of-selection.
      select * into table a_t001 from t001.
      call method lcl_app=>change_table
                 importing
                     ex_wt001 = w_t001
                 changing
                     im_t001  = a_t001[] .
      check sy-subrc  = 0.
    *       CLASS lcl_app IMPLEMENTATION
    class lcl_app implementation.
      method change_table.
        loop at im_t001 into xt001.
          concatenate xt001-butxt 'Changed'
               into xt001-butxt separated by space.
          modify im_t001 from xt001.
        endloop.
        ex_wt001 = xt001.
      endmethod.
    endclass.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Trash not working correctly

    I do not have the finder options "Empty Trash" or "Secure Empty Trash". Everything I delete is emptied immediately. I do not have the finder option "Empty Trash Securely" checked. Can anyone help me with this issue?

  • Provide ALE and IDOC Faqs and all Transactions

    Dear Experts, I am new to ALE & IDOC. Please provide ALE & IDOCs FAQs and all Transactions? Thanks in advance.

  • Mail does not collect mail

    So I have Leopard running on my MacBook, and still Tiger on my iMac; haven't decided yet which one I will use in the future to collect my mail. The MacBook is handy, so I read my mails most of the time in the living. But I want these mails also retri

  • Photoshop Elements 12 serial number

    When I try to install Photoshop Elements 12, my serial number from the box is rejected. How do I find it? It was purchased from Amazon and came in a box. Where is the number? How many digits?

  • IMovie is Crashing Upon Start-up

    iMovie has been working flawlessly, but recently every time I start it up and start to edit, it crashes. I did just load a 25+ min movie, and I've never done that before. No idea where to start to remedy this situation. Any tips? Suggestions? Thank y