How to declare a header line table in class

Hi Experts ;
I m writing a class.I must display a picture in class. So Im find a below code
  TYPES: BEGIN OF ZW3QUERY,
          NAME(30) TYPE C,
          VALUE(255) TYPE C,
         END OF ZW3QUERY.
  data DOCKING type ref to CL_GUI_DOCKING_CONTAINER .
  data PICTURE_CONTROL_1 type ref to CL_GUI_PICTURE .
  data:
    URL(256) TYPE C .
  data QUERY_TABLE TYPE STANDARD TABLE OF ZW3QUERY 
        INITIAL SIZE 0.
  data HTML_TABLE type W3HTML .
  data RETURN_CODE type W3PARAM-RET_CODE .
  data CONTENT_TYPE type W3PARAM-CONT_TYPE .
  data CONTENT_LENGTH type W3PARAM-CONT_LEN .
  data PIC_DATA type W3MIME .
  data PIC_SIZE type I .
  data:
    SUM(4) .
  data:
    NUM1(4) .
  data:
    NUM2(4) .
DATA: REPID LIKE SY-REPID.
  REPID = SY-REPID.
  CREATE OBJECT PICTURE_CONTROL_1
    EXPORTING
      PARENT = DOCKING.
  CHECK SY-SUBRC = 0.
  CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
    EXPORTING
      BORDER = 5.
  CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
    EXPORTING
      DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
  CALL METHOD PICTURE_CONTROL_1->SET_POSITION
    EXPORTING
      HEIGHT = 40
      LEFT   = 5
      TOP    = 170
      WIDTH  = 90.
  IF URL IS INITIAL.
    REFRESH QUERY_TABLE.
    QUERY_TABLE-NAME  = '_OBJECT_ID'.
    QUERY_TABLE-VALUE = 'ZBOYDAKLOGO'.
    APPEND QUERY_TABLE.
but I must do header line decleration in code. an Error. Class not support this decleration.  . I m try create types but its not works.
How do I traverse not can this error
Thanks everything Regards.

Hi Irfan,
in ABAP-Objects you don't work with headerlines - instead you work with work-areas.
You must define a workarea for your table like that:
DATA:
  gw_query TYPE ZW3QUERY.
  gw_query-name ='_OBJECT_ID'.
  gw_query-value = 'ZBOYDAKLOGO'.
  APPEND gw_query TO query_table.
Regards.

Similar Messages

  • How to add a header line to excel sheet?

    Hi Guru's
    I have download the scheduling agreement report in a excel sheet, I want to know how to add the header line  to that excel sheet.

    Hi
    See this sample code:
    Tables : zacg_cca,zacg_exsh.
    data: P_file like RLGRAP-FILENAME.
    Data: Begin of it_header occurs 0,
    Header(15) ,
    end of it_header.
    Data : begin of it_final occurs 0,
    ccode type zacg_cca-ccode,
    mat_cd type zacg_cca-mat_cd,
    ingr_desc type zacg_cca-ingr_desc,
    conc type zacg_cca-conc,
    quantity type zacg_cca-quantity,
    percqty type zacg_cca-percqty,
    flag ,
    APP_DATE type zacg_cca-app_date,
    rsamnos type zacg_cca-rsamnos,
    end of it_final.
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-000.
    select-options : s_Date for zacg_cca-app_date.
    SELECTION-SCREEN : END OF BLOCK blk.
    it_header-Header = 'Samp_code'.
    Append it_header.
    it_header-Header = 'Mat_code'.
    Append it_header.
    it_header-Header = 'Ingr_Desc'.
    Append it_header.
    it_header-Header = 'Conc'.
    Append it_header.
    it_header-Header = 'Quan'.
    Append it_header.
    it_header-Header = 'Perc'.
    Append it_header.
    it_header-Header = 'Flag'.
    Append it_header.
    it_header-Header = 'Date'.
    Append it_header.
    it_header-Header = 'Rsamnos'.
    Append it_header.
    it_header-Header = 'Mat_code'.
    Append it_header.
    select ccode
    mat_cd
    ingr_desc
    conc
    quantity
    percqty
    app_date
    rsamnos
    from zacg_cca into corresponding
    fields of table
    it_final where zacg_cca~app_date in s_date.
    loop at it_final.
    it_final-flag = 'T'.
    modify it_final.
    it_final-quantity = it_final-quantity * 2 .
    Modify it_final.
    endloop.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
    EXPORTING
    FILE_NAME = 'E:\IT\P_FILE'
    CREATE_PIVOT = 0
    DATA_SHEET_NAME = ' '
    PIVOT_SHEET_NAME = ' '
    PASSWORD = ' '
    PASSWORD_OPTION = 0
    TABLES
    PIVOT_FIELD_TAB =
    DATA_TAB = it_final[]
    FIELDNAMES = it_header[]
    EXCEPTIONS
    FILE_NOT_EXIST = 1
    FILENAME_EXPECTED = 2
    COMMUNICATION_ERROR = 3
    OLE_OBJECT_METHOD_ERROR = 4
    OLE_OBJECT_PROPERTY_ERROR = 5
    INVALID_PIVOT_FIELDS = 6
    DOWNLOAD_PROBLEM = 7
    OTHERS = 8
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    regards
    Satish

  • How to create a multi-line table/column comment

    Can someone tell me how to create a multi-line table or column comment?
    Apparently, the concatenate operator (||) does not work with the COMMENT statement.
    I've searched the Oracle manuals and couldn't find an answer.
    COMMENT ON TABLE sometbl IS 'i would like to break up this comment into several lines in order to improve readability'; Effectively, this is what I'd like to do (but it doesn't work):
    COMMENT ON TABLE sometbl IS
      'i would like to break up ' || CHAR(10) ||
      'this comment into several lines ' || CHAR(10) ||
      'in order to improve readability' || CHAR(10); Oracle version is 10.2.0.4

    Why not just
    SQL> create table t (a int)
    Createtable successfully completed.
    SQL> comment on table t is 'i would like to break up 
    this comment into several lines 
    in order to improve readability'
    Commenton successfully completed.
    SQL> select * from user_tab_comments where table_name = 'T'
    TABLE_NAME           TABLE_TYPE  COMMENTS                               
    T                    TABLE       i would like to break up               
                                     this comment into several lines        
                                     in order to improve readability        
    1 row selected.?

  • How to create a three line table by pages?

    I need to write my paper which need the three line table to describe.i used to use the word to do this,but i want to know how to create it by pages?

    Why not just
    SQL> create table t (a int)
    Createtable successfully completed.
    SQL> comment on table t is 'i would like to break up 
    this comment into several lines 
    in order to improve readability'
    Commenton successfully completed.
    SQL> select * from user_tab_comments where table_name = 'T'
    TABLE_NAME           TABLE_TYPE  COMMENTS                               
    T                    TABLE       i would like to break up               
                                     this comment into several lines        
                                     in order to improve readability        
    1 row selected.?

  • Where is my EXPORT dump file ? How to do BRTools off line table reorgan ?

    Hello,
    Here was my BRTools Export output message :
    About to export specified tables via Direct Path ...
    Current user changed to SAPPRD
    . . exporting table                          CDHDR   60357362 rows exported
    Export terminated successfully without warnings.
    BR0280I BRSPACE time stamp: 2011-08-09 16.53.04
    BR1160I 1 table exported by EXP utility
    BR0280I BRSPACE time stamp: 2011-08-09 16.53.04
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    But where is my Export dump file ?
    Besides, could you tell me the procedures of using BRTools Export & Import to do off-line table reorgan ?
    Due to some reasons, I can't do online table reorgan.

    Hi Ming,
    I noted the OSS note 646681 - Reorganizing tables with BRSPACE in my previous message, already. You don't need any additional effort such as creating script, if you use brspace as I noted in my last message.
    Stop the SAP system, but not database then execute the command, below;
    1) brspace -u / -f tbreorg -t "CDHDR"
    2) At the incoming menu steps, select --> (8 - Table reorganization mode (mode)) .. offline
    3) Then continue with "c"
    At the end of this steps, table and related indexes will be reorganized.
    You can update statistics by using the command, below after you complete the steps, above respectfully;
    brconnect -u / -c -f stats -t all -f collect -p 4
    Best regards,
    Orkun Gedik

  • VC Multiple Table Column Header Lines, Table Width Adjustment

    Hi Experts,
    1) How to have Multiple headers for a column in a single cell i.e multiple lines in the same cell. please provide with example.
    2) How to set your table to adjust the width automatically for all screen resolution since columns of the table disappear and some of the content of the header is not visible if the screen resolution is low.
    3) Is there any way to set the screen resolution for our report alone to very high resolution even if the end user has set the system resolution to low. The reports were developed on a high resolution and now we face the problem as citrix is rolled out and it is standard 1024 * 768 resolution.
    Thanks and Regards,
    Siva

    Wrapping the text of a table column caption into lines is currently not possible. Workarounds could be:
    - using a single character text and a tooltip for the description
    - using an image containing the wrapped text
    Both workarounds have their problems.
    Armin

  • How to get multiple header lines dynamically and also data hierarchically using ALV

    Hi experts,
    My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
    I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
         EXPORTING
           i_style_table             = 'X'
           it_fieldcatalog           = gt_dyn_fcat
         IMPORTING
           ep_table                  = gt_dyn_table
         EXCEPTIONS
           generate_subpool_dir_full = 1
           OTHERS                    = 2.
    I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
    Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to  compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
    What is thee best way to get the output in my image..??
    Thanks..
    Pavi

    Hi experts,
    My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
    I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
         EXPORTING
           i_style_table             = 'X'
           it_fieldcatalog           = gt_dyn_fcat
         IMPORTING
           ep_table                  = gt_dyn_table
         EXCEPTIONS
           generate_subpool_dir_full = 1
           OTHERS                    = 2.
    I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
    Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to  compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
    What is thee best way to get the output in my image..??
    Thanks..
    Pavi

  • How to define Column Header text table control

    Hi All,
    I have to create a function in which user will pass Field Name, Field Description.
    I have to show that field description in Table Control Columns as Text for columns.
    Like if a user pass Material , PLant etc, then first column header text will be Material and so on and in rows it will show the data.
    One more thing, is it possible to define the technical attributes like length based on field passed through function.
    Please help me to find out the solution.
    Thanks
    Piyush Mathur

    Hi Piyush,
    here are the some components of the screen . you can change tehm at run time in your code.
    components: name,input,output,required,length,active,invisible,intensified,group1,group2...etc.
    at ruin time you modify these attributes..
    your requirement is to change the name attribute.
    regards,
    sateesh

  • How to print header lines at the top of every page with Alv list display?

    Dear all,
    I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
    The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = l_repid
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          is_layout                = ls_layo
          it_fieldcat              = lt_fcat
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = ls_variant
          it_events                = lt_events
        TABLES
          t_outtab                 = lt_data
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and lt_events as below:
      ls_event-name = 'END_OF_LIST'.
      ls_event-form = 'ALV_END_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'END_OF_PAGE'.
      ls_event-form = 'ALV_END_OF_PAGE'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_LIST'.
      ls_event-form = 'ALV_TOP_OF_LIST'.
      APPEND ls_event TO lt_events.
      ls_event-name = 'TOP_OF_PAGE'.
      ls_event-form = 'ALV_TOP_OF_PAGE'.
      APPEND ls_event TO lt_events.
    So, how can I print header lines for every page?
    Best Regards,

    Hello Saba,
    Your point might be very close to solution.
    Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
    reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
        EXPORTING
          it_fieldcat_lvc         = gt_fcat
        IMPORTING
          et_fieldcat_alv         = lt_fcat
        EXCEPTIONS
          it_data_missing         = 1
          it_fieldcat_lvc_missing = 2
          OTHERS                  = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
        EXPORTING
          it_fieldcat = lt_fcat
        IMPORTING
          e_width     = l_width.
    WRITE l_reptx TO l_reptx CENTERED.
      NEW-LINE.
      WRITE: AT (l_width) l_reptx CENTERED.
      SUBTRACT 10 FROM l_width.
      WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            it_list_commentary       = lt_header
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    Do you have other suggestions ?

  • Header, Line Item and Cache Techniques Using Hashed Tables

    Hi,
    How can I work with header, line item, and a cache techniques using hashed tables?
    Thanks,
    Shah.

    Hi,
    Here is an example to clarify the ideas:
    In general, every time you have a header-> lines structure you have a unique key for the lines that has at least header key plus one or more fields. I'll make use of this fact.
    I'll try to put an example of how to work with header -> line items and a cache technique using hashed tables.
    Just suppose that you need a list of all the material movements '101'-'901' for a certain range of dates in mkpf-budat. We'll extract these fields:
    mkpf-budat
    mkpf-mblnr,
    mseg-lifnr,
    lfa1-name1,
    mkpf-xblnr,
    mseg-zeile
    mseg-charg,
    mseg-matnr,
    makt-maktx,
    mseg-erfmg,
    mseg-erfme.
    I'll use two cache: one for maintaining lfa1 related data and the other to maintain makt related data. Also I'll only describe the data gathering part. The showing of the data is left to your own imagination.
    The main ideas are:
    1. As this is an example I won't use inner join. If properly desingned may be faster .
    2. I'll use four hashed tables: ht_mkpf, ht_mseg, ht_lfa1 and ht_makt to get data into memory. Then I'll collect all the data I want to list into a fifth table ht_lst.
    3. ht_mkpf should have (at least) mkpf's primary key fields : mjahr, mblnr.
    4. ht_mseg should have (at least) mseg primary key fields: mjahr mblnr and zeile.
    5. ht_lfa1 should have an unique key by lifnr.
    6. ht_makt should have an unique key by matnr.
    7. I prefer using with header line because makes the code easier to follow and understand. The waste of time isn't quite significant (in my experience at least).
    Note: When I've needed to work from header to item lines then I added a counter in ht_header that maintains the count of item lines, and I added an id in the ht_lines so I can read straight by key a given item line. But this is very tricky to implement and to follow. (Nevertheless I've programmed it and it works well.)
    The data will be read in this sequence:
    select data from mkpf into table ht_mkpf
    select data from mseg int table ht_mseg having in count all the data in ht_mkpf
    loop at ht_mseg (lines)
    filter unwanted records
    read cache for lfa1 and makt
    fill in ht_lst and collect data
    endloop.
    tables
    tables: mkpf, mseg, lfa1, makt.
    internal tables:
    data: begin of wa_mkpf, "header
    mblnr like mkpf-mblnr,
    mjahr like mkpf-mjahr,
    budat like mkpf-budat,
    xblnr like mkpf-xblnr,
    end of wa_mkpf.
    data ht_mkpf like hashed table of wa_mkpf
    with unique key mblnr mjahr
    with header line.
    data: begin of wa_mseg, " line items
    mblnr like mseg-mblnr,
    mjahr like mseg-mjahr,
    zeile like mseg-zeile,
    bwart like mseg-bwart,
    charg like mseg-charg,
    matnr like mseg-matnr,
    lifnr like mseg-lifnr,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    end of wa_mseg,
    data ht_mseg like hashed table of wa_mseg
    with unique key mblnr mjahr zeile
    with header line.
    data: begin of wa_lfa1,
    lifnr like lfa1-lifnr,
    name1 like lfa1-name1,
    end of wa_lfa1,
    data ht_lfa1 like hashed table of wa_lfa1
    with unique key lifnr
    with header line.
    data: begin of wa_makt,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of wa_makt.
    data: ht_makt like hashed table of wa_makt
    with unique key matnr
    with header line.
    result table
    data: begin of wa_lst, "
    budat like mkpf-budat,
    mblnr like mseg-mblnr,
    lifnr like mseg-lifnr,
    name1 like lfa1-name1,
    xblnr like mkpf-xblnr,
    zeile like mseg-zeile,
    charg like mseg-charg,
    matnr like mseg-matnr,
    maktx like makt-maktx,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    mjahr like mseg-mjahr,
    end of wa_mseg,
    data: ht_lst like hashed table of wa_lst
    with unique key mblnr mjahr zeile
    with header line.
    data: g_lines type i.
    select-options: so_budat for mkpf-budat default sy-datum.
    select-options: so_matnr for mseg-matnr.
    form get_data.
    select mblnr mjahr budat xblnr
    into table ht_mkfp
    from mkpf
    where budat in so_budat.
    describe table ht_mkpf lines g_lines.
    if lines > 0.
    select mblnr mjahr zeile bwart charg
    matnr lifnr erfmg erfme
    into table ht_mseg
    from mseg
    for all entries in ht_mkpf
    where mblnr = ht_mkpf-mblnr
    and mjahr = ht_mjahr.
    endif.
    loop at ht_mseg.
    filter unwanted data
    check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
    check ht_mseg-matnr in so_matnr.
    read header line.
    read table ht_mkpf with table key mblnr = ht_mseg-mblnr
    mjahr = ht_mseg-mjahr.
    clear ht_lst.
    note : this may be faster if you specify field by field.
    move-corresponding ht_mkpf to ht_lst.
    move-corresponding ht_mseg to ht_lst.
    perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
    perform read_makt using ht_mseg-matnr changing ht_lst-maktx.
    insert table ht_lst.
    endloop.
    implementation of cache for lfa1.
    form read_lfa1 using p_lifnr changing p_name1.
    read table ht_lfa1 with table key lifnr = p_lifnr
    transporting name1.
    if sy-subrc <> 0.
    clear ht_lfa1.
    ht_lfa1-lifnr = p_lifnr.
    select single name1
    into ht_lfa1-name1
    from lfa1
    where lifnr = p_lifnr.
    if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
    insert table ht_lfa1.
    endif.
    p_name1 = ht_lfa1-name1.
    endform.
    implementation of cache for makt
    form read_makt using p_matnr changing p_maktx.
    read table ht_makt with table key matnr = p_matnr
    transporting maktx.
    if sy-subrc <> 0.
    ht_makt-matnr = p_matnr.
    select single maktx into ht_matk-maktx
    from makt
    where spras = sy-langu
    and matnr = p_matnr.
    if sy-subrc <> 0. ht_makt-maktx = 'n/a in makt'. endif.
    insert table ht_makt.
    endif.
    p_maktx = ht_makt-maktx.
    endform.
    Reward points if found helpfull...
    Cheers,
    Siva.

  • How to Ignore Header Line in FCC " Sender Side" .

    Hi SDNrs,
    I am getting a File Data  after FCC with header Data.
    How to Ignore that Header Line coming with actual data...
    Like Employeeid , Name , Deptid
    So this Employeeid , Name , Deptid is also coming as Data.
    Or what approach Should be Used?
    Regards
    Prabhat Sharma.

    Hi,
    Use " Document Offset" parameter in Sender File CC.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Thnaks
    Amit

  • 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>

  • Better alternative to header lines, use of logical database, field-symbols

    Hello experts,
    I am wondering if theres a better and faster alternative than declaring a header line for an itab. are work areas faster?
    What is the use of logical database? can you please give me an example on how to use it in reports.
    how do I use field-symbols? I am confused on how it works.
    P.S. I recently installed SAP netweaver preview abap edition
    in my home PC and I am wondering if I could practice BDC, user exits, etc. If so, how?
    Again, thanks for all your help since I'm kinda new to ABAP.

    I always use this...It uses header lines, but at least is smaller -:)
    <b>DATA: BEGIN OF MY_TAB TYPE STANDARD TABLE OF BKPF WITH HEADER LINE.</b>
    For logical databases, you can check my blog...I always use LDB for HR programs -:)
    <a href="/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports:///people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    LDB's provides a lot of information, because they gather it from a lot of different tables...
    A Field-Symbols is like a pointer in C++, like an alias for a variable...Here's a small example...
    REPORT Z_ATG_DUMMY.
    FIELD-SYMBOLS: <F1>, <F2> TYPE I.
    DATA: TEXT(20) TYPE C VALUE 'Hello, how are you?',
          NUM TYPE I VALUE 5,
          BEGIN OF LINE1,
          COL1 TYPE F VALUE '1.1e+10',
          COL2 TYPE I VALUE '1234',
          END OF LINE1,
          LINE2 LIKE LINE1.
    ASSIGN TEXT TO <F1>.
    ASSIGN NUM TO <F2>.
    DESCRIBE FIELD <F1> LENGTH <F2>.
    TEXT = 'CHAU'.
    WRITE: / <F1>, 'has length', NUM.
    WRITE: / TEXT, 'has length', NUM.
    ASSIGN LINE1 TO <F1>.
    ASSIGN LINE2-COL2 TO <F2>.
    MOVE <F1> TO LINE2.
    ASSIGN 'LINE2-COL2 =' TO <F1>.
    I just can't install SAPNWSP...I only got MiniSap...But I got all the development enviorment...Don't know about the User-Exits...Actually I don't think so...Because those "mini" systems doesn't come with any functional module.
    Greetings,
    Blag.

  • Extra header lines appearing in payload after singning and encrypting in Mail Receiver adapter PI 7.31

    Hi,
    We have a mail receiver adapter which is sending out a edi payload as attachment to the external receiver.
    When we send the normal .edi file it is ok.
    But when we sign and encrypt the payload and send it out, the external customer receiver decrypts and validates the message successfully but when their application tries to read the edi payload it finds the extra header lines as below :
      content-id:
    <[email protected]>
    Content-Disposition: attachment; filename=xxxxxxxx.edi Content-Type:
    application/xml
    At their end, their application (DataPower) expects the first three characters of the payload
    (decrypted payload) to be either UNA or UNB.This is how it validates whether the incoming message is an EDI message.
    But it encounters the extra MIME headers in the payload.
    Therefore it gets rejected by DataPower which thinks the content is an
    unknown message type.
    How to suppress the header lines appearing in the payload(after decryption and validation).
    Thanks,
    Guest

    hi,
    try content-type as "text/xml"

  • Multiple Header Line In HIERSEQ ALV

    Hi Experts,
    Please guide me how to get miltile Header lines in the HIERSEQ Alv , My requirment it develop a genledger for customers in which the Address of customer should be in 3 or four lines then followed by its balances. Please suggest me ...
    Regards,
    Prakash

    Hi,
    You need to pass the Row number to the filed catlog in order to display multiple header lines.
    For example,
       wl_fieldcat-row_pos = 1.  " This field will be displayed in first row
      wl_fieldcat-col_pos     = 1.
      wl_fieldcat-fieldname   = 'VBELN'.
      wl_fieldcat-tabname     = 'T_VBAK'.
      wl_fieldcat-outputlen   = 20.
      Append wl_fieldcat to t_fieldcat.
      wl_fieldcat-row_pos = 2.    " This field will be displayed in Second row
      wl_fieldcat-col_pos     = 1.
      wl_fieldcat-fieldname   = 'VBELN'.
      wl_fieldcat-tabname     = 'T_VBAK'.
      wl_fieldcat-outputlen   = 20.
      Append wl_fieldcat to t_fieldcat.
    Regards,
    Rajneesh

Maybe you are looking for

  • How can I boot from an external HDD that has an OS install on it?

    Hello, I have Windows 8.1 installed on my 500GB LaCie external HDD and I am trying to boot my mac from it. I haven't had any success. Thus far, I am able to get to the Startup Menu from holding the option key and Windows does show up. However, when I

  • Stamp and Typewriter tool gone after 9.5.2 update??

    Where did the stamp and typewriter tool go when I updated to Acrobat 9.5.2??

  • Javascript error in BEx after system database copy

    Hello, we made a database copy of our BW 3.1 system on another hardware. After having done everything described in the How-To-Guide "Enable SAP BW Web functionality", we called the BEx via URL. The login screen displays and also the Report menu, but

  • ITunes won't open after 7.6 update

    I don't remember when software update ran, but since then I can't open iTunes on my Mac (Powerbook G4, OS 10.4.11). It bounces once in the dock and that's it. Same thing if I run it from the apps folder. I've tried a few things already: 1) Run diskwa

  • External Data in Customs Declarations

    Hello - What BAdIs can be used to default external data from the Feeder System (but not from a PO, Inbound Delivery, or Goods Receipt document) into a GTS Customs Declaration?