The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat,

***Data declaration
TYPES : BEGIN OF t_zle_lagerplanung,
           SEl,                               "stores which row user has selected
           kdauf TYPE zle_lagerplanung-kdauf,
           kdpos TYPE zle_lagerplanung-kdpos,
           etenr TYPE zle_lagerplanung-etenr,
           papiermaschine TYPE zle_lagerplanung-papiermaschine,
           runnr TYPE zle_lagerplanung-runnr,
           prio  TYPE zle_lagerplanung-prio,
           werk TYPE zle_lagerplanung-werk,
           durchmesser TYPE zle_lagerplanung-durchmesser,
           breite TYPE zle_lagerplanung-breite,
           anzle TYPE zle_lagerplanung-anzle,
         occupied TYPE zle_lagerplanung-text30,
         free TYPE zle_lagerplanung-text30,
           lgpla TYPE zle_lagerplanung-lgpla,
           lgtyp  TYPE zle_lagerplanung-lgtyp,
           art TYPE zle_lagerplanung-art,
           anzhoehe TYPE zle_lagerplanung-anzle,
         zindicator TYPE zle_lagerplanung-text30,
           fa TYPE zle_lagerplanung-fa,
           field_style  TYPE lvc_t_styl, "FOR DISABLE
END OF t_zle_lagerplanung.
I am getting the data in internal table by using thiis select statement.
  SELECT kdauf kdpos etenr papiermaschine runnr prio werk durchmesser breite
         anzle lgpla lgtyp art anzhoehe fa
    FROM zle_lagerplanung INTO CORRESPONDING FIELDS OF TABLE it_zle_lagerplanung
   WHERE kdauf IN s_kdauf
"     AND kdpos = p_kdpos
      AND KDPOS IN s_kdpos
     AND werk = p_werks.
But while updating the particular field in ztable using this statement
      UPDATE zle_lagerplanung from table it_zle_lagerplanung.
it is giving syntax error
"The work area (or internal table) "IT_ZLE_LAGERPLANUNG" is not flat, or
contains reference or internal tables as components. components.
components. components. components."
Could any one help me out how to resolve this problem....
Thanks in advance

Hi Shyamal,
lvc_s_styl is a structure so you will get the same error.
for your select and update statement you dont need field "field_style".
regards
rea

Similar Messages

  • The type of the database table and work area (or internal table)...

    Hello
    I am trying to use a database and select all records from it and store them into an internal table.
    My code:
    Select * from xixi_dbcurrency into table gt_currency.
    The error:
    "The type of the database table and work area (or internal table) "GT_CURRENCY" are not Unicode-convertible . . . . . . . . . .     "
    Any suggestions?
    Thank you

    Hi Thomas,
    Thank you for your inputs above.
    But as you suggested is we use INTO CORRESPONDING FIELDS OF TABLE then it resolve the error.
    But I have below piece of code:
    DATA:    it_new_source TYPE STANDARD TABLE OF _ty_s_sc_1,
                  wa_source TYPE _ty_s_sc_1,
                  wa_new_source TYPE _ty_s_sc_1,
                  ls_target_key TYPE t_target_key.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE it_new_source
           FROM /bic/afao06pa100
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    But since this is reading into corresponding fields of table the data load from one DSO to other DOS is running for long more that 15 hours and still not getting completed and giving dump.
    So if I switch the search to below:
    SELECT * FROM /bic/afao06pa100
       INTO TABLE it_new_source
           FOR ALL ENTRIES IN SOURCE_PACKAGE
           where /bic/fcckjobno = SOURCE_PACKAGE-/bic/fcckjobno
           and /bic/fcckjitid = SOURCE_PACKAGE-/bic/fcckjitid.
    Then I am getting below error:E:The type of the database table and work area (or internal table) "IT_NEW_SOURCE" are not Unicode convertible.
    Can you please advice on this, as performance need to improve in start routine code.
    Thank You.

  • Difference between work area and internal tables.

    Hi  I wanna know the difference between work area and internal tables.
    what happend if i give with out header line in internal table.
    also how to assosiate work area to internal table in that scenario.

    Hi Balaji..
    The internal table is an ABAP runtime object which has two parts the Body and the header.
    Whereas a work area cannot have a body.. It is mere a field or group of fields which can hold values at runtime..
    In the SAP higher versions mySAP ERP, the use of tables with header line is made obsolete.. But there is absolutely no problem with the same..
    Just think that when you define an internal table with occurs or with header line statement, the system automatically creates a workarea with this table, using which you can access the contents in the bosy of tyhe table.. You can read a record from the table body to this header or add a record in the header to the internal table body..
    When you work with a table ITAB without a header line, you can not use statements like READ TABLE, APPEND, INSERT etc without giving an explicit work area..
    Suppose i have an internal table like:
    DATA : itab TYPE STANDARD TABLE OF t001.
    This table will not have a header with it.
    If you will use APPEND itab. The compilor will give error.
    Here i will create a work area with same structure of the table.
    DATA : e_wa TYPE t001.
    Now i will write:
    APPEND e_wa TO itab.
    READ TABLE itab INTO e_wa WITH KEY xxxxxx
    LOOP AT itab INTO e_wa...           etc..
    In a better approach we use Field symbols with such tables, instead of structures
    FIELD-SYMBOLS: <fs_itab> TYPE t001.
    So,
    LOOP AT itab ASSIGNING <fs_itab>
    READ TABLE itab ASSIGNING <fs_itab> etc.. However we can not use field symbols in few cases..
    I hope this will help you..
    Thanks and Best Regards,
    Vikas Bittera.
    **Points for usefull answers**

  • Work area and internal table

    hi friends,
    Please let me know when do we use work area and when do we use internal table.
    Thanks in advance
    Tina Wilson

    Work areas are used with internal tables.  For example if you have an internal table defined like this.
    data: itab type table of mara.
    This internal table can hold many rows of data, right?  SO say you need to read this data.  Well you will need to LOOP or READ the internal table, since this internal table has no header line(please to put the read data), you need to have a work area to put the data into.
    <b>data: wa like line of itab.</b>
    Loop at itab <b>into wa</b>.
    endloop.
    Now if you defined the internal table with a header line, there is no reason to have the work area and you can just do the same like this.
    data: itab type table of mara <b>with header line</b>.
    Loop at itab.
    endloop.
    It is now best practice to use work areas instead of header lines because in ABAP OO, header lines are not allowed.
    Regards,
    Rich Heilman

  • Difference between Field symbols and work area for Internal tables

    Hi,
    In ECC versions we all know that we need to declare the internal tables without headerline, and for handling the internal tables we need to use exclusive work areas.
    Currently i have an issue that we have been asked to use field symbols instead of work areas...can any one help me how to use the field symbols and also let me know how it will improve the performance of the program..
    Thanks and Regards,
    Kathir

    Hi
    DATA: WA TYPE ITAB.
    LOOP AT ITAB INTO WA.
    IF WA-FIELD = .....
    ENDIF.
    ENDLOOP.[(code]
    FIELD-SYMBOLS <WA> TYPE ANY.
    LOOP AT ITAB ASSIGNING <WA>.
    ENDLOOP.
    Now the problem is you can't know the name of the fields of the table at runtime, so you can't write:
    IF <WA>-FIELD = .....
    ENDIF.
    Anyway you can create a field-symbols strcturated like the table:
    [code]FIELD-SYMBOLS <WA> TYPE ITAB.
    LOOP AT ITAB ASSIGNING <WA>.
      IF <WA>-FIELD = .....
      ENDIF.
    ENDLOOP.
    I don't know which are the differences for the performance between to use a field-symbol and to use a structure as work-area.
    The differnce between the field-symbols and work-area is the field-symbol is assigned directly to the record, so u don't need to do a MODIFY statament to change something:
    LOOP AT ITAB INTO WA.
      WA-FIELD =
      MODIFY ITAB FROM WA.
    ENDLOOP.
    LOOP AT ITAB ASSIGNING <WA>.
      <WA>-FIELD =
    ENDLOOP.
    These two pieces of abap code do the same action, so probably the field-symbol improve the performance because it do an access directly to the record without to use an external structure as workarea.
    Max

  • Working Area for Internal Table

    Hi,
      i know that process of internal table if it is with headerline but i don't know how the data pass to our internal table if it is with out header line plzz give me the example code for that.
    Thanks in advance

    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

  • PPCS3 won't export only the work area to media encoder

    I can't figure out why Premiere Pro CS3 is no longer exporting the work area to the media encoder. I CAN successfully export the work area to Encore but even when I select WORK AREA under the RANGE option in EXPORT SETTINGS the media encoder still shows only the entire sequence.
    Same results on any sequence or project I've tried.
    Any suggestions?

    Are you sure you're not confusing the sequence In and Out Points with the Work Area Bar? I've seen people make that mistake before. The Work Area Bar is what controls the "Work Area" export.
    If it's not that then you have a real mystery on your hands. :o
    Cheers
    Eddie
    PremiereProPedia   
    RSS feed)
    - Over 350 frequently answered questions
    - Over 300 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • What are dyanmic internal tables and what s the exact use of forall entries

    what are dyanmic internal tables and what s the exact use of forall entries?

    hi,
    <u><b>dynamic internal table.</b></u>
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci912390,00.html
    http://www.sap-img.com/ab030.htm
    <u><b>
    FOR ALL ENTRIES</b></u> is an effective way of doing away with using JOIN on two tables.
    You can check the below code -
    SELECT BUKRS BELNR GJAHR AUGDT
    FROM BSEG
    INTO TABLE I_BSEG
    WHERE BUKRS = ....
    SELECT BUKRS BELNR BLART BLDAT
    FROM BKPF
    INTO TABLE I_BKPF
    FOR ALL ENTRIES IN I_BSEG
    WHERE BUKRS = I_BSEG-BUKRS
    AND BELNR = I_BSEG-BELNR
    AND BLDAT IN SO_BLDAT.
    *******************************8
    look another example
    what is the use of FOR ALL ENTRIES
    1. INNER JOIN
    DBTAB1 <----
    > DBTAB2
    It is used to JOIN two DATABASE tables
    having some COMMON fields.
    2. Whereas
    For All Entries,
    DBTAB1 <----
    > ITAB1
    is not at all related to two DATABASE tables.
    It is related to INTERNAL table.
    3. If we want to fetch data
    from some DBTABLE1
    but we want to fetch
    for only some records
    which are contained in some internal table,
    then we use for alll entries.
    1. simple example of for all entries.
    2. NOTE THAT
    In for all entries,
    it is NOT necessary to use TWO DBTABLES.
    (as against JOIN)
    3. use this program (just copy paste)
    it will fetch data
    from T001
    FOR ONLY TWO COMPANIES (as mentioned in itab)
    4
    REPORT abc.
    DATA : BEGIN OF itab OCCURS 0,
    bukrs LIKE t001-bukrs,
    END OF itab.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    itab-bukrs = '1000'.
    APPEND itab.
    itab-bukrs = '1100'.
    APPEND itab.
    SELECT * FROM t001
    INTO TABLE t001
    FOR ALL ENTRIES IN itab
    WHERE bukrs = itab-bukrs.
    LOOP AT t001.
    WRITE :/ t001-bukrs.
    ENDLOOP.
    Hope this helps!
    Regards,
    Anver

  • How can I get the name of an internal table in a textfield?

    Hi,
    I have defined an internal table in a program. Now I need the name of thist table (<u>NOT</u> the components!!!) in a textfield.
    Example for Data-Definitions in my Program:
    data: begin of it_tab occurs 0,
            feld1  like icon-id,
            feld2  like icon-name,
          end of it_tab.
    data: tabname(30) type c.
    How can I transfer the name "IT_TAB" into the field tabname?
    Thanks in andvance!

    No, it has to by 'dynamic'. I don't want to transfer it hard, because it should work for any internal table name.
    The requirement is: There are many function modules that have an input field TABLENAME. I have to give the tablename in the Form 'IT_TAB'.
    But I look for a possibiltity not to write:
    tabname = 'IT_TAB'.
    For DDIC-Tables its not a problem, but I dont know a way for internal tables.

  • What are nested Internal tables

    Hi Guru's,
    I am new to ABAP ...just trying to learn things.Can you please explain me what are nested internal tables and what is the purpose of nested internal table?where can it be used and why a header line is not written in a Nested Internal table...
    Kindly explain it (scenario where nested internal tables are used) with an example it will be helpful.
    Cheers,
    Priyanka

    Hi,
    When storing data in internal tables, you often use one internal table for each database you read.
    Each one contains some or all columns of the relevant database table. It is up to you whether
    you create an internal table with a flat structure for each database table or if you create, for
    example, internal tables with nested structures. If you have several tables, each one with a flat
    structure, you have to work with redundant key fields to link the tables. If, on the other hand, you
    use nested internal tables, you can store the data from the database tables hierarchically.
    Saving and processing very large amounts of data in internal tables has disadvantages. If you
    divide up the data into different internal tables, processing it can be very runtime-intensive, since
    the tables have to be processed individually. Furthermore, it requires a lot of storage space,
    since internal tables are not stored in compressed form. The system may even need to store the
    dataset outside of its working memory. This means that processing it takes even longer.
    An example of nested internal table:
    Assume the following program is linked to the logical database [Page 1163] F1S.
    REPORT DEMO.
    DATA: SUM TYPE I, CNT TYPE I.
    NODES: SPFLI, SFLIGHT, SBOOK.
    DATA: BEGIN OF WA_SBOOK,
    BOOKID TYPE SBOOK-BOOKID,
    SMOKER TYPE SBOOK-SMOKER,
    CLASS TYPE SBOOK-CLASS,
    LUGGWEIGHT TYPE SBOOK-LUGGWEIGHT,
    WUNIT TYPE SBOOK-WUNIT,
    END OF WA_SBOOK.
    DATA: BEGIN OF WA_SFLIGHT,
    FLDATE TYPE SFLIGHT-FLDATE,
    SBOOK LIKE TABLE OF WA_SBOOK,
    END OF WA_SFLIGHT.
    DATA: BEGIN OF WA_SPFLI,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    CITYFROM TYPE SPFLI-CITYFROM,
    CITYTO TYPE SPFLI-CITYTO,
    SFLIGHT LIKE TABLE OF WA_SFLIGHT,
    END OF WA_SPFLI.
    DATA TAB_SPFLI LIKE TABLE OF WA_SPFLI.
    START-OF-SELECTION.
    GET SPFLI.
    REFRESH WA_SPFLI-SFLIGHT.
    GET SFLIGHT.
    REFRESH WA_SFLIGHT-SBOOK.
    GET SBOOK.
    MOVE-CORRESPONDING SBOOK TO WA_SBOOK.
    APPEND WA_SBOOK TO WA_SFLIGHT-SBOOK.
    GET SFLIGHT LATE.
    MOVE-CORRESPONDING SFLIGHT TO WA_SFLIGHT.
    APPEND WA_SFLIGHT TO WA_SPFLI-SFLIGHT.
    GET SPFLI LATE.
    MOVE-CORRESPONDING SPFLI TO WA_SPFLI.
    APPEND WA_SPFLI TO TAB_SPFLI.
    END-OF-SELECTION.
    SORT TAB_SPFLI BY CITYFROM CITYTO CONNID.
    LOOP AT TAB_SPFLI INTO WA_SPFLI.
    SKIP.
    WRITE: / WA_SPFLI-CARRID,
    WA_SPFLI-CONNID,
    'from', (15) WA_SPFLI-CITYFROM,
    'to', (15) WA_SPFLI-CITYTO.
    ULINE.
    SORT WA_SPFLI-SFLIGHT BY FLDATE.
    LOOP AT WA_SPFLI-SFLIGHT INTO WA_SFLIGHT.
    SKIP.
    WRITE: / 'Date:', WA_SFLIGHT-FLDATE.
    WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
    ULINE.
    SORT WA_SFLIGHT-SBOOK BY CLASS SMOKER BOOKID.
    SUM = 0.
    CNT = 0.
    LOOP AT WA_SFLIGHT-SBOOK INTO WA_SBOOK.
    WRITE: / WA_SBOOK-BOOKID UNDER 'Book-ID',
    WA_SBOOK-SMOKER UNDER 'Smoker',
    WA_SBOOK-CLASS UNDER 'Class'.
    SUM = SUM + WA_SBOOK-LUGGWEIGHT.
    CNT = CNT + 1.
    ENDLOOP.
    ULINE.
    WRITE: 'Number of bookings: ', (3) CNT,
    / 'Total luggage weight:',
    (3) SUM, WA_SBOOK-WUNIT.
    ENDLOOP.
    ENDLOOP.
    Thanks.

  • Moving the data of five internal tables to one internal tables.

    iam having the five internal table. like below
    g_t_vbfa
    g_t_vbrk
    g_t_vbpa
    g_t_kna1
    g_t_vbak    
    this are the five internal tables. each tables having the datas . but each table having the number of records is different. one table having 100 records means another table having 50 records.
    previously i used   index sys-tabix  concept it was not working properly...
    my output table is  g_t_output_header_data  ..
    i want to move that output table....
    please coding wise give some solution...
    thanks
    santhosh

    hi,
    chk a sample.
    data : begin of itab1 occurs 0. "itab with work area.
    key_field1 like ztable1-key_field1,
    field1 like ztable1-field1,
    field2 like ztable1-field2,
    endof itab1.
    data : begin of itab2 occurs 0. "itab with work area.
    key_field2 like ztable2-key_field2,
    field3 like ztable2-field3,
    field4 like ztable2-field4,
    endof itab2.
    data : begin of itab_final occurs 0.
    key_field1 like ztable1-key_field1,
    field1 like ztable1-field1,
    field2 like ztable1-field2,
    field3 like ztable2-field3,
    field4 like ztable2-field4,
    endof itab_final.
    put the date final(merged) internal table
    1. loop at itab1.
    read table itab2 with key keyfield2 = itab1-keyfield1.
    if sy-surc = 0.
    itab_final-key_field1 = itab1-keyfield1
    itab_final-field1 = itab1-field1.
    itab_final-field2 = itab1-keyfield2.
    itab_final-field3 = itab2-field2.
    itab_final-field4 = itab2-keyfield2.
    append itab_final.
    clear itab_final.
    endif.
    endloop.
    or
    LOOP AT ITAB1.
    MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.
    READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.
    if sy-subrc = 0.
    MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
    endif,
    READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.
    if sy-subrc = 0.
    MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
    endif,
    append itab_final.
    clear itab_final.
    endloop
    rgds
    Anver

  • The work area "IT_ITAB" is not long enough

    I created a interna table IT_ITAB with OCCURS 0, But it's giving error as
    <i><b>The work area "IT_ITAB" is not long enough</b></i>.
    So pls send the correct syntax to solve the error....

    <i><b>data : it_data like standard table of  mara occurs 0 with header line.</b></i>
    Above syntax is not working...its giving error as "OCCURS 0 is not expected".
    I have one more dought...In the report I am providing some of the fields from my own database table.
    1. Can I provide the fields when using the WITH HEADER LINE concept.?
    2.Can I avoid BEGIN OF after "DATA :"?
    3.Pls tell me the exact use of STANDARD key word.
    4.What is the memory sys assigning dynamically when using OCCURS 0?
    5.What is the syntax to increase the memory?

  • Need to move the data to final internal Table

    Hi all,
    TYPES: BEGIN OF TY_MARA,
           MATNR       TYPE  MATNR,         " Material Number
           ZZBASE_CODE TYPE  ZBASE_CODE,    " Base Code
           END OF TY_MARA,
           BEGIN OF TY_MAKT,
           MAKTX       TYPE  MAKTX,         " Material Description
           END OF TY_MAKT,
           BEGIN OF TY_MARC,
           WERKS       TYPE  WERKS_D,      " Plant
           END OF TY_MARC,
           BEGIN OF TY_QMAT,
           ART           TYPE  QPART,         " Inspection Type
           END OF TY_QMAT,
           BEGIN OF TY_MAPL,
           MATNR        TYPE  MATNR,        " Material
           PLNTY        TYPE  PLNTY,        " Task List Type
           END OF TY_MAPL,
           BEGIN OF TY_PLKO,
           VERWE             TYPE     PLN_VERWE,     "     Task list usage
           END OF TY_PLKO,
          BEGIN OF TY_FINAL,
           MATNR          TYPE    MATNR,          " Material Number
           MAKTX          TYPE    MAKTX,          " Material Description
           ZZBASE_CODE    TYPE    ZBASE_CODE,     " Base Code
           WERKS          TYPE    WERKS_D,        " Plant
           CLASS          TYPE    KLASSE_D,       "     Class Number
           ART             TYPE    QPART,           " Inspection Type
           VERWE             TYPE    PLN_VERWE,       " Task list usage
         END OF TY_FINAL.
    DATA: I_MARA  TYPE  STANDARD TABLE OF TY_MARA  ,
          I_MAKT  TYPE  STANDARD TABLE OF TY_MAKT  ,
          I_MARC  TYPE  STANDARD TABLE OF TY_MARC  ,
          I_QMAT  TYPE  STANDARD TABLE OF TY_QMAT  ,
          I_MAPL  TYPE  STANDARD TABLE OF TY_MAPL  ,
          I_PLKO  TYPE  STANDARD TABLE OF TY_PLKO  ,
          I_KLAH  TYPE  STANDARD TABLE OF TY_KLAH  ,
          I_FINAL TYPE  STANDARD TABLE OF TY_FINAL ,
          WA_MARA  TYPE  TY_MARA,
          WA_MAKT  TYPE  TY_MAKT,
          WA_MARC  TYPE  TY_MARC,
          WA_QMAT  TYPE  TY_QMAT,
          WA_MAPL  TYPE  TY_MAPL,
          WA_PLKO  TYPE  TY_PLKO,
          WA_KLAH  TYPE  TY_KLAH,
         WA_FINAL TYPE  TY_FINAL.
    data: v_mtart         type    mara-mtart,
          v_matnr         type    mara-matnr,
          v_zzbase_code   type    mara-zzbase_code,
          v_werks         type    t001w-werks,
          v_beskz         type    marc-beskz.
    selection-screen skip 1.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_mtart    for v_mtart default 'halb' to 'zraw',
                    s_matnr    for v_matnr,
                    s_zzbase   for v_zzbase_code,
                    s_werks    for v_werks obligatory,
                    s_beskz    for v_beskz.
    selection-screen end of block b1.
    start-of-selection.
    select matnr
           zzbase_code
           from  mara into table i_mara
           where mtart in s_mtart       "Material Type
           and   matnr in s_matnr        "Material
           and   zzbase_code in s_zzbase."Base Code
    select maktx
           from makt into table i_makt for all entries in i_mara
           where matnr = i_mara-matnr.
    select werks
           from marc into table i_marc for all entries in i_mara
           where matnr = i_mara-matnr
           and werks in s_werks "plant
           and beskz in s_beskz."Procurement Type
    select art
           from qmat into table i_qmat for all entries in i_mara
           where matnr = i_mara-matnr
           and werks in s_werks.
    select matnr
           plnty from mapl into table i_mapl for all entries in i_mara
           where matnr = i_mara-matnr.
    select verwe
           from plko into table i_plko for all entries in i_mapl
           where plnty = i_mapl-plnty.
    this is my logic . i need to move this to final internal table i_final. how can do it. will anybody tell me with coding.
    Thanks,

    Hi,
    Include matnr field in all your type declaration and plnty in the ty_plko,  type declaration.
    loop at the internal table i_mara.
    read the other tables with read statement.
    assign the the required fields to the work area wa_final. Append it to i_final.
    start-of-selection.
      select matnr  zzbase_code
        from mara   into table i_mara
       where mtart in s_mtart "Material Type   and matnr in s_matnr "Material  and zzbase_code in s_zzbase. "Base Code
      select matnr  maktx        
        from makt   into table i_makt
         for all entries in i_mara   where matnr = i_mara-matnr.
      select matnr  werks
        from marc  into table i_marc
         for all entries in i_mara  where matnr = i_mara-matnr   and werks in s_werks "plant   and beskz in s_beskz."Procurement Type
      select matnr  art
        from qmat  into table i_qmat
         for all entries in i_mara where matnr = i_mara-matnr   and werks in s_werks.
      select matnr plnty
        from mapl into table i_mapl
        for all entries in i_mara  where matnr = i_mara-matnr.
      select plnty verwe
        from plko  into table i_plko
         for all entries in i_mapl  where plnty = i_mapl-plnty.
    Loop at i_mara into wa_mara.
    read table i_makt into wa_makt with key matnr = wa_mara-matnr.
    (do this for all the internal tables.)
    read table i_plko into wa_plko with key plnty = wa_mapl-plnty.
    wa_final-MATNR = wa_mara-matnr.
    wa_final-MAKTX = wa_makt-maktx.
    wa_final-ZZBASE_CODE = wa_mara-ZZBASE_CODE.
    wa_final-WERKS = wa_marc-werks.
    wa_final-ART = wa_qmat-art.
    wa_final-VERWE = wa_plko-verve.
    append i_final from wa_final.
    endloop.
    Hope this helps.
    Regards,
    Dhasarathy. K

  • How to find workarea ID for the work area name.

    Hi Experts..
    How to find workarea ID for the work area name.(Work area name CCIHT_WAH-WAID and I want to fetch characteristic data from table AUSP matching the OBJEK field,but I only have Work area name).Can anybody help me to find tables or relationship between Workarea ID and Workarea name for the same.I am using TCODE - CHIB02.Once I select a workarea and click on IHS Data button,I get data for that workarea.I need to find where this data comes from and How is this fetched.
    Points would be rewarded for helpful answers..
    Thanks
    Kunal Halarnakar

    U want to fetch the workarea description ?
    we can fetch it from CCIHT_WALD table with the RECN value.
    The informations are stored in AUSP table with the characterstic(ATINN) value.

  • Error while Appending a  work-area in a table

    Hi Experts,
    Requirement :- I want to append a row in the the table but the work-area with which i am appendign the values is of different type than the target so i am getting error .
    Code :- APPEND WA_SOURCE TO RESULT_PACKAGE
    Error :-  A line of RESULT_PACKAGE not mutually convertible in a Unicode program..........
    Is there any way to append the one-by one values in the RESULT_PACKAGE fields.
    As i cn't change the type of my source work-area.
    Don't we have something like :-
    Append Result_package
    Result_package_field1 = wa-field1
    Result_package_field2 = wa_field2.....
    PLEASE HELP
    Regards,
    rg
    Edited by: R G on Mar 26, 2009 10:34 AM

    Hello,
    I can't change the Work-area type....
    Can't we appened a line in any table by providing direct values??????
    You DONOT have to change the TYPE of your Work Area. You create a new work area.
    You can try something like this:
    DATA:
    WA_RESULT_PACKAGE LIKE LINE OF RESULT_PACKAGE.
    MOVE CORRESPONDING WA_SOURCE TO WA_RESULT_PACKAGE.
    APPEND WA_RESULT_PACKAGE TO RESULT_PACKAGE.
    CLEAR WA_RESULT_PACKAGE.
    Or Else,
    DATA:
    WA_RESULT_PACKAGE LIKE LINE OF RESULT_PACKAGE.
    MOVE WA_SOURCE-F1 TO WA_RESULT_PACKAGE-F1.
    MOVE WA_SOURCE-F2 TO WA_RESULT_PACKAGE-F2.
    MOVE WA_SOURCE-F3 TO WA_RESULT_PACKAGE-F3.
    APPEND WA_RESULT_PACKAGE TO RESULT_PACKAGE.
    CLEAR WA_RESULT_PACKAGE.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 26, 2009 10:44 AM

Maybe you are looking for