Problem with internal table declaration in function gui_upload

hi friends,
can u tell me how should i define internal table when i use this function?
i get error that in oo my declaration not good.
thanks,
dana.

see this example:-
DATA: BEGIN OF itab OCCURS 0,
        tdname   TYPE mara-matnr,
        tdline1  TYPE tline-tdline,
        tdline2  TYPE tline-tdline,
        tdline3  TYPE tline-tdline,
        tdline4  TYPE tline-tdline,
        tdline5  TYPE tline-tdline,
              END OF itab.
DATA: BEGIN OF itab_error OCCURS 0,
        tdname  TYPE mara-matnr,
        error   TYPE string,
      END OF itab_error.
DATA: lines    TYPE STANDARD TABLE OF tline WITH HEADER LINE.
DATA: temp     TYPE string.
DATA: tdspras  TYPE thead-tdspras.
DATA: tdname   TYPE thead-tdname.
DATA: tdobject TYPE thead-tdobject.
DATA: tdid     TYPE thead-tdid.
DATA :flag     TYPE c.
At Selection Screen Event
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p1.
  CALL FUNCTION 'F4_FILENAME'
    IMPORTING
      file_name = p1.
At Start of Selection Event
START-OF-SELECTION.
  PERFORM upload_data.
  PERFORM upload_text.
*&      Form  upload_data
      text
-->  p1        text
<--  p2        text
FORM upload_data .
  temp = p1.
**& Upload Data from Excel
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename            = temp
      filetype            = 'ASC'
      has_field_separator = 'X'
    TABLES
      data_tab            = itab.
ENDFORM.                    " upload_data
*&      Form  upload_text
      text
-->  p1        text
<--  p2        text
FORM upload_text .
  tdspras  = 'EN'.
  tdid = 'BEST'.
  tdobject = 'MATERIAL'.
  LOOP AT itab.
    REFRESH lines.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = itab-tdname
      IMPORTING
        output = itab-tdname.
    TRANSLATE itab-tdname TO UPPER CASE.
    tdname = itab-tdname.
    PERFORM check_material.
    lines-tdline = itab-tdline1.
    APPEND lines.
    CLEAR lines.
    lines-tdline = itab-tdline2.
    APPEND lines.
    CLEAR lines.
    lines-tdline = itab-tdline3.
    APPEND lines.
    CLEAR lines.
    lines-tdline = itab-tdline4.
    APPEND lines.
    CLEAR lines.
    lines-tdline = itab-tdline5.
    APPEND lines.
    CLEAR lines.
    CALL FUNCTION 'CREATE_TEXT'
      EXPORTING
        fid       = tdid
        flanguage = tdspras
        fname     = tdname
        fobject   = tdobject
      TABLES
        flines    = lines.
  ENDLOOP.
  IF itab_error[] IS NOT INITIAL.
    WRITE : / 'PO Text For Following Material is not Uploaded'.
    WRITE : / .
    WRITE : / 'Material', '              Error'.
    LOOP AT itab_error.
      WRITE : / itab_error-tdname, '   ',  itab_error-error.
    ENDLOOP.
  ELSE.
    MESSAGE s001(38) WITH 'Data Uploaded Succcesfully'.
  ENDIF.
ENDFORM.                    " upload_text
*&      Form  check_material
      text
-->  p1        text
<--  p2        text
FORM check_material .
  DATA : w_matnr TYPE mara-matnr.
  SELECT SINGLE matnr
  INTO w_matnr
  FROM mara
  WHERE matnr = itab-tdname.
  IF sy-subrc = 0.
    flag = 'X'.
  ELSE.
    MOVE-CORRESPONDING itab TO itab_error.
    itab_error-error = 'Material does not exist'.
    APPEND itab_error.
  ENDIF.
ENDFORM.                    " check_material

Similar Messages

  • I am getting problem with internal table & work area declaration.

    I am working with 'makt' table ..with the table makt i need to work with styles attributes ..so i declared like this
    TYPES : BEGIN OF ty_makt,
             matnr TYPE makt-matnr,
             spras TYPE makt-spras,
             maktx TYPE makt-maktx,
             maktg TYPE makt-maktg,
             celltab TYPE lvc_t_styl,
           END OF ty_makt.
    DATA : i_makt TYPE TABLE OF ty_makt.
    DATA : wa_makt TYPE ty_makt .
        But end of program i need to update dbtable "makt"...i am getting problem with internal table & work area declaration.
    i think makt table fields mapping and internal table/work area mapping is not correct. so please help me to get out from this.

    Hi Nagasankar,
    TYPES : BEGIN OF TY_MATNR,
                  MATNR TYPE MAKT-MATNR,
                  SPRAS TYPE MAKT-SPRAS,
                  MAKTX TYPE MAKT-MAKTX,
                  MAKTX TYPE MAKT-MAKTG,
                  CELLTAB TYPE LVC_T_STYL,  " Its Working perfectly fine..
                 END OF TY_MAKT.
    DATA: IT_MAKT TYPE STANDARD TABLE OF TY_MAKT,
              WA_MAKT TYPE TY_MAKT.
    Its working perfectly fine. if still you are facing any issue post your complete code.
    Thanks,
    Sandeep

  • Problem with Internal table

    HI,
    I need to DMBE2 value as with respective of Month, Year and Inception date.
    I need the output to be like
    HKONT  BLART PRCTR DMBE2(Month) DMBE2 (Year) DMBE3 (Year)
    Below is my code
    DATA : BEGIN OF gt_lkorr OCCURS 0,
              hkont LIKE bsis-hkont,
              prctr LIKE bsis-prctr,
              bewar LIKE bsis-bewar,
              dmbe2 LIKE bsis-dmbe2,
              belnr LIKE bsis-belnr,
              budat LIKE bsis-budat,
              monat LIKE bsis-monat,
              gjahr LIKE bsis-gjahr,
              blart LIKE bsis-blart,
              shkzg like bsis-shkzg,
           END OF gt_lkorr.
    *DATA : wa_lkorr LIKE gt_lkorr OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF wa_lkorr OCCURS 0,
              hkont LIKE bsis-hkont,
              prctr LIKE bsis-prctr,
              bewar LIKE bsis-bewar,
              dmbe2 LIKE bsis-dmbe2,
              belnr LIKE bsis-belnr,
              budat LIKE bsis-budat,
              monat LIKE bsis-monat,
              gjahr LIKE bsis-gjahr,
              blart LIKE bsis-blart,
             dmbe2_2 LIKE bsis-dmbe2,
             dmbe2_3 LIKE bsis-dmbe2,
           END OF wa_lkorr.
    DATA : gt_final_lkorr LIKE wa_lkorr OCCURS 0 WITH HEADER LINE.
    FORM f_get_t030hb_tr.
      SELECT hkont lkorr FROM t030hb INTO CORRESPONDING FIELDS OF
                          TABLE gt_tr_t030hb
                          WHERE ktopl = 'KCOA'
                          AND   bwber = 'TR'
                          AND hkont IN so_hkont.
      IF gp_pprct IS INITIAL.
        SELECT hkont prctr bewar dmbe2 belnr budat monat gjahr blart
                           FROM bsis INTO CORRESPONDING
                           FIELDS OF TABLE gt_lkorr FOR ALL ENTRIES
                           IN gt_tr_t030hb
                           WHERE bukrs IN so_bukrs
                           AND gjahr IN so_gjahr
                           AND prctr IN so_prctr
                           AND hkont = gt_tr_t030hb-lkorr
                           AND vbund IN so_vbund.
      ELSE.
        LOOP AT gt_prctr.
          SELECT hkont prctr bewar dmbe2 belnr budat monat gjahr blart
                             FROM bsis INTO CORRESPONDING
                             FIELDS OF TABLE gt_lkorr FOR ALL ENTRIES
                             IN gt_tr_t030hb
                             WHERE bukrs IN so_bukrs
                             AND gjahr   IN so_gjahr
                             AND prctr = gt_prctr-prctr
                             AND hkont = gt_tr_t030hb-lkorr
                             AND vbund IN so_vbund.
        ENDLOOP.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM gt_lkorr COMPARING ALL FIELDS.
    ENDFORM.                    "f_get_t030hb_tr
    *&      Form  f_get_yearwise_data
          text
    FORM f_get_yearwise_data.
      DATA : lv_period LIKE t009b-poper.
      DATA : lv_year LIKE bsis-gjahr,
             lv_dmbe2 LIKE bsis-dmbe2.
      LOOP AT gt_lkorr.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date               = sy-datum
             I_MONMIT             = 00
            i_periv              = 'K4'
         IMPORTING
           e_buper              = lv_period
             E_GJAHR              =
        EXCEPTIONS
          input_false          = 1
          t009_notfound        = 2
          t009b_notfound       = 3
          OTHERS               = 4
        IF gt_lkorr-monat EQ lv_period.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
        endif.
    ENDLOOP.
          LOOP AT wa_lkorr INTO gt_final_lkorr.
            write  : / gt_final_lkorr-hkont,
                     gt_final_lkorr-prctr,
                     gt_final_lkorr-bewar,
                     gt_final_lkorr-dmbe2,
                     gt_final_lkorr-blart.
          ENDLOOP.
    write : ' Inception to date'.
      LOOP AT gt_lkorr.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date               = sy-datum
             I_MONMIT             = 00
            i_periv              = 'K4'
         IMPORTING
          e_buper              = lv_period
              e_gjahr              = lv_year
        EXCEPTIONS
          input_false          = 1
          t009_notfound        = 2
          t009b_notfound       = 3
          OTHERS               = 4
        IF gt_lkorr-gjahr EQ lv_year.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
        endif.
    ENDLOOP.
          LOOP AT wa_lkorr into gt_final_lkorr.
            WRITE : / gt_final_lkorr-hkont,
                      gt_final_lkorr-prctr,
                      gt_final_lkorr-bewar,
                      gt_final_lkorr-dmbe2,
                      gt_final_lkorr-blart.
             move : wa_lkorr-dmbe2_2 to gt_final_lkorr-dmbe2_2.
             modify gt_final_lkorr.
             clear gt_final_lkorr.
          ENDLOOP.
    loop at gt_lkorr.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
    ENDLOOP.
          LOOP AT wa_lkorr into gt_final_lkorr.
            WRITE : / gt_final_lkorr-hkont,
                      gt_final_lkorr-prctr,
                      gt_final_lkorr-bewar,
                      gt_final_lkorr-dmbe2,
                      gt_final_lkorr-blart.
          ENDLOOP.
    Please let me know how to do it?
    Thanks,
    Pavan.

    I think you need to insert a field in your wa_lkorr internal table for key which you should populate as M for month data, Y2 for Year data and Y3 for dmbe3 data.
    So when you want to display they are three different records.

  • TSV_TNEW_PAGE_ALLOC_FAILED  with internal table declared with occurs 0

    HI guys,
    when the internal table is declared as occurs 0, the dump TSV_TNEW_PAGE_ALLOC_FAILED is encountered, when changing the declaration into standard table, th dump disappears. Why is this so?
    Thanks!

    There are three type of tables: Standard, sorted and hashed tables (see [here|http://help.sap.com/abapdocu_70/en/ABAPDATA_ITAB.htm]). When you define a table using the keyword OCCURS you're still defining a standard table.
    Your exception indicates that you're running out of memory. The difference in the declarations that you mention shouldn't cause that. Main difference between the two declaration versions is probably that your table defined via OCCURS has a header line, whereas your other table doesn't (unless you declared it explicitly as WITH HEADER LINE).
    I don't think though that with that little information anybody could explain the short dump. Actually it sounds rather odd that the change you mention should cause the dump (or make it go away). So I suspect you probably have to post further details. You might want to check the shortdump yourself and place a breakpoint at this place and run it for each version. Maybe you can see some difference...

  • Problem with internal table initialisation in EBP system

    Hi
    I work in EBP system, and i made a specific work in LBBP_POCF0o program. It is in the displaying items of a purchase order.
    This is what i done:
    LOOP AT t_screen_items WHERE del_ind NE 'X'.
            w_old_total = w_old_total + t_screen_items-value.
            CLEAR:t_screen_items.
    ENDLOOP.
    loop at gt_item where del_ind ne 'X'.
          w_new_total = w_new_total +
              ( gt_item-GROSS_PRICE * gt_item-quantity ).
          clear: gt_item.
    endloop.
        if w_new_total GT w_old_total.   
           MESSAGE I001(ZBBP_PO) WITH
             'elle possède un montant supérieur'
             ' à celui déterminé intialement.'
             'Veuillez modifier la commande.'.
           MOVE 'X' TO w_checksum_flag.
        endif.
    My problem is that if i use the elevator at the screen, the system is looping only at the first element visible on the screen, so the "LOOP AT t_screen_items" is wrong. i don't understand why the sytem doesn't count all the elements of the internal table t_screen_items...
    Thank you for your help.

    Well, i will try to be more clearly...
    My problem is very suprising..In the purchase order screen, if there's more than 10 items, there's an elevator (or ascencor) to permit displaying the items which are hidden. And so, when i use the elevator, and when i want to see the details of the item, the "loop at t_item_screens" only begins at the first item visible. For exemple, if i have 13 items, i want to see the 11th item, i have to use the elevator, and then in the "loop at t_item_screens", the loop will do only 3 times the loop, it will begin only from the 11th item... The loop won't begin at the first element.... I really don't understand.
    Sorry if i'm not clearly... Anyway, thank you for your help.

  • Problems with DDIC tables in a Function's signature

    Hi,
    We're on SAP Basis 702, support pack 7.
    I am trying to add a (DDIC) table to the signature of a Function in BRF+, but I have encountered 2 problems:
    1. BRF+ asks me to specify the 'Table Line Type' of the table, but it refuses to recognize the structure name (ZINSTALMENTS) that I specified.
    I guessed (correctly) that it was actually asking for the 'Table Type' (ZINSTALMENTS_T), not the line type.
    Question 1: Do you find the 'Table Line Type' text misleading, or is it just me?
    Question 2: Does this mean that we always have to wrap a structure in a table type, before we can use it to define tables in BRF+?
    2. My structure ZINSTALMENTS contains three fields:
    PRAMT     Types     PRAMT_KK     CURR     13     2     Payment Amount Promised
    PRDAT     Types     PRODT_KK     DATS     8     0     Payment Date Promised
    PRCUR     Types     WAERS     CUKY     5     0     Currency Key
    ..but the table structure that was transferred to BRF+ contains only the first two fields.
    Question 3: Is this a bug or a feature? Has anyone else encountered this issue?
    Note: field PRCUR is a currency reference field for PRAMT.
    thanks for your advice
    Paul

    Hi Paul,
    Let my analyse and comment on your text:
    "I am trying to add a (DDIC) table to the signature of a Function ..."
    In BRFplus you cannot add a DDIC table directly to the signature of a Function. What you can do is to create a data object of type table and add this to a function as input/context. The creation of data objects provide the option to bind to DDIC. So your table data object can be bound to a DDIC table. Your structure data objects could be bound to a DDIC structure etc. When you bind a table type it will automatically also create the line type (structure or element) and bind this as well to DDIC.
    Im an not sure what exactly your problem is but maybe you expect a database table to be used for binding with a BRFplus table. This is not possible as a DB table is not a table type but defines a structure only. So you could use the DB table name in the binding of a BRFplus structure.
    In case you have problems because of terminology used in the UI we should perform some tests and then we will change accordingly. Therefore I appreciate that you openly bring up the question in the forum.
    "My structure ZINSTALMENTS contains three fields..."
    In BRFplus there is a type AMOUNT for elementary data objects. This Amount includes a number and a currency. I assume in your case the fields PRAMT and PRCUR are included in a field of type amount with name PRAMT.
    Regards,
    Carsten

  • Submit with internal table

    Hi.
      I have a function module with a internal table. This internal table has 30 fields and i have to it to a program vis SUBMIT, furthemore this program will be executed inside a job. Im trying to pass tha internal table with export and import but it doesn´t go.
      Anybody can help me???
      Thanks.

    Hi Jorge
       Will try to answer basing on what i can understand
    from you query.
       I guess you have an internal table in your FM with
    some data. You are submitting a program within the FM
    and you need the data in the internal table to be used
    in the program.
       If my understanding is right, you can do it via
    EXPORT/IMPORT statements.
       EXPORT <int_tab> TO MEMORY ID 'MID'. --> In FM.
       IMPORT <int_tab> FROM MEMORY ID 'MID". --> In Program
       Note that the internal table declaration should be
    the same in FM and Program like name of the internal
    table, all field names, data type everything should be
    the same.
       Check if you are handling the same way.
    Kind Regards
    Eswar

  • DIFF: Field string ,Structure and Internal table declaration

    Hai,
           what is the diference between  Field string ,Structure in ABAP program and Internal table declaration and how it will work ?
    Thank you
    ASHOK KUMAR.

    hi,
    Look this u will get a good idea.
    *& Report  ZTYPES                                                      *
    REPORT  ZTYPES                                                  .
    * Table declaration (old method)
    DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF tab_ekpo.
    *Table declaration (new method)     "USE THIS WAY!!!
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
          wa_ekpo TYPE t_ekpo.                    "work area (header line)
    * Build internal table and work area from existing internal table
    DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method
          wa_datatab LIKE LINE OF tab_ekpo.
    * Build internal table and work area from existing internal table,
    * adding additional fields
    TYPES: BEGIN OF t_repdata.
            INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!
    TYPES: bukrs  TYPE ekpo-werks,
           bstyp  TYPE ekpo-bukrs.
    TYPES: END OF t_repdata.
    DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab
          wa_repdata TYPE t_repdata.                 "work area (header line)
    Regards
    Reshma

  • Chart - problem with realize one of the function under CR XI

    Post Author: mrowa
    CA Forum: Charts and Graphs
    Hello,
    I have
    problem with realize one of the function under CR XI. I would be persuade if
    any of us would like to help me.
    1)   
    1) From
    database (basically from one table), I take data to make report. Each of record
    have appropriate fields:
    dteData
    intYear
    intMonth
    intDate
    2)   
    2) I
    want to realized comparison data from two or more periods of time on one chart
    and in one table. For easily explanation I will describe problem on two
    periods.For instance, user want to display and compare
    on chart date (type monthly -sum data of each month) from 2007.02 u2013 2007.05
    with date from 2006.03 u2013 2006.06. So we compare month 2007.02 with 2006.03;
    2007.03 with 2006.04; 2007.04 with 2006.05; 2007.05 with 2006.06
    On char I would like to display bars with comparison
    of months.
    Problem is that I donu2019t know how to write
    something similar. I can use one period without any problems, but two and mores
    I canu2019t realized.
    Detail description:
    I passed
    two parameters two report:
    {?from}, {?to} u2013for first period
    {?offset}, it means {?from}+{?offset},
    {?to}+{?offset}  - for second period
    On axis Y I have Sum(intDate);On
    X (year + month). But on each value x( example 20007.02) I need to have
    two values (bars). Value for standard period and offset.
    For example for x=2007.02, I need
    two bars one equal 2007.02 and second with offset u2013 2006.03
    Movement to next value (bar) is
    persuade by fields {data.rok}&{data.month} first or second period. This is
    combination of two elements year&month defined under Formula. Problem
    persist in that both period has different year.month and here problem starts once
    again. I donu2019t know how to solve it. I have found out one solution but it
    limits user only for two periods (I want to compare more).
    My idea for compare only two
    periods:
    I make one query in CR for one
    period and second query for second period.
    Firs query:
    "SELECT 
           year ,
          month
    Second query
    "SELECT 
           year + FLOOR({month + offset} % 13),
          {month + offset} % 13
    Then in CR I connect two periods and
    make u201Ctableu201D (results of queries) with JOIN on fields year and month.
    This solution is not functional,
    because I need to make reports for days and hours as well. In this solution I
    canu2019t use (%31), because not all months has 31 days.
    I use CR in WEB app made in Visual
    Studio 2005. Maybe from aspx we can manipulate with date to get exact solution,
    and solve problem with SELECT.
    Hope my description clearly
    describe problem and someone will be able to help me. I would be thankful.

    I have had similar problem before.
    Because I had too many data, the legend would not display all the data. Also the chart would not display all the data. But I was able to find a work around.
    In your case, Right click on the Legend text and click on Format Legend Entry.
    Change the font of the legend to 4 (which is the minimum). This may work.
    If you are also having problem with data labels, you could change the font size of the data labels.
    Hope this helps.
    Thank you.

  • Internal table declaration - work area and body

    Hi all
    I have declared my internal table in my program as
    data : itab_wa type ZRESULT_LINE,
           itab    type ZRESULT_ROW.
    Where ZRESULT_LINE and ZRESULT_ROW are the structure and table types.
    Now I want to add
    data: TCOLOR TYPE SLIS_T_SPECIALCOL_ALV.
    in my internal table declaration. How can I do this. Please remember I need to have work area and body in my internal table as I have used work area and body in my code.
    Waiting..............
    Message was edited by: Raju Boda

    HI,
    See the Declarion types of workarea and Internal tables
    * Table declaration (old method)
    DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF tab_ekpo.
    *Table declaration (new method)     "USE THIS WAY!!!
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
          wa_ekpo TYPE t_ekpo.                    "work area (header line)
    * Build internal table and work area from existing internal table
    DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method
          wa_datatab LIKE LINE OF tab_ekpo.
    * Build internal table and work area from existing internal table,
    * adding additional fields
    TYPES: BEGIN OF t_repdata.
            INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!
    TYPES: bukrs  TYPE ekpo-werks,
           bstyp  TYPE ekpo-bukrs.
    TYPES: END OF t_repdata.
    DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab
          wa_repdata TYPE t_repdata.                 "work area (header line
    you need to maintain same structure for both workarea as well Internal table
    Regards
    Sudheer

  • Problem with a table control

    Hi gurus,
    I´ve a problem with a table control. It has 3 columns which one is a checkbox.
    I can fill all fields but in the moment I mark the checkbox this line must be unwritable. How can I do it?
    Thanks for all
    Dani

    Assign a function code to the checkbox column....
    so when u check / uncheck any entry, PAI + PBO will be triggered....
    In the PBO during the loop of table control, check the checkbox field value. if it is 'X', make the row readonly
    by looping at screen and setting screen-input = 0 for rest of the columns.
    like ...
    LOOP AT tc_itab
           WITH CONTROL tc_test
           CURSOR tc_test-current_line.
       module set_row_readonly. " loop at screen and set input = '0' if checkbox is checked...
    ENDLOOP.

  • Help with Internal table - Urgent Please

    I had an internal table declared as below:
    DATA: BEGIN OF i_results OCCURS 0,
            pernr like p0014-pernr,
            begda like zhrccroll-begda,   "Cost center roll out begin date
            endda like zhrccroll-endda,    "Cost center roll out end date
            aedtm like p0014-aedtm,
            uname like p0014-uname,
            kostl like p0001-kostl,
           ittype(7),
          END OF i_results.
    And my SQL to populate the table based on some other results:
    select t1pernr t3begda t3endda t1aedtm t1uname t2kostl
      appending corresponding  fields of table i_results
      from pa0014 as t1
      inner join pa0001 as t2
      on t1pernr = t2pernr
      inner join zhrccroll as t3
      on t2kostl = t3kostl
      for all entries in i_it01
      where t1~pernr = i_it01-pernr
      and t2~kostl = i_it01-kostl
      and t3~kostl = i_it01-kostl
      and t3~syst = 'STAFF'
      and t1~aedtm = p_date
      and t1~uname in so_name.
    Everything was working great and now user wants to see additional dates on the report so I have to add couple of dates to internal table but unfortunately they have same names (begda, endda), Now I need internal table like this:
    DATA: BEGIN OF i_results OCCURS 0,
            pernr like p0014-pernr,
            begda like zhrccroll-begda,   "Cost center roll out begin date
            endda like zhrccroll-endda,    "Cost center roll out end date
            aedtm like p0014-aedtm,
            uname like p0014-uname,
            kostl like p0001-kostl,
            begda like p0014-begda,  "infotype begin date
            endda like p0014-endda,  "infotype end date
            ittype(7),
          END OF i_results.
    I cannot have duplicate declarations in internal table and also my SQL would not work. The new SQL would be:
    select t1pernr t3begda t3endda t1aedtm t1uname t2kostl
      t1begda t1endda
      appending corresponding  fields of table i_results
      from pa0014 as t1
      inner join pa0001 as t2
      on t1pernr = t2pernr
      inner join zhrccroll as t3
      on t2kostl = t3kostl
      for all entries in i_it01
      where t1~pernr = i_it01-pernr
      and t2~kostl = i_it01-kostl
      and t3~kostl = i_it01-kostl
      and t3~syst = 'STAFF'
      and t1~aedtm = p_date
      and t1~uname in so_name.
    This is not working either.
    Could comeone please help me how to acheive the desired result. I am trying to get all the data in one shot, and that is why I have the SQL above. Any ideas you could provide would be greatly appreciated.
    Thanks in advance.
    Mithun

    HI Mithun,
      To add to vishnu do not use "appending corresponding fields of"..
    1) if you are reading this data again and again then use
      "appending table itab"
    2) if it is triggered just once then use
      "into table itab"
    And also define ur itab as:
    DATA: BEGIN OF i_results OCCURS 0,
    pernr like p0014-pernr,
    ccbegda like zhrccroll-begda, "Cost center roll out begin date
    ccendda like zhrccroll-endda, "Cost center roll out end date
    aedtm like p0014-aedtm,
    uname like p0014-uname,
    kostl like p0001-kostl,
    begda like p0014-begda, "infotype begin date
    endda like p0014-endda, "infotype end date
    ittype(7),
    END OF i_results.
    and your select statement as:
    select t1pernr t3begda as ccbegda t3endda as ccenda t1aedtm t1~uname
    t2kostl t1begda t1~endda into table i_results
    from pa0014 as t1
    inner join pa0001 as t2
    on t1pernr = t2pernr
    inner join zhrccroll as t3
    on t2kostl = t3kostl
    for all entries in i_it01
    where t1~pernr = i_it01-pernr
    and t2~kostl = i_it01-kostl
    and t3~kostl = i_it01-kostl
    and t3~syst = 'STAFF'
    and t1~aedtm = p_date
    and t1~uname in so_name
    I am sure you need to tweak and twist the above statements a bit..
    Hope this helps..
    BR
    Rakesh
    PS: Please close the thread if your problem is solved..

  • Problems with partition tables

    Hi all,
    I've got some problems with partition tables. The script at the bottom run but when I wanna insert some values it returns me an error
    (ORA-06550: line 1, column 30: PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored)
    and I can't understand why!
    There's something incorrect in the script or not?
    Please help me
    Thanks in advance
    Steve
    CREATE TABLE TW_E_CUSTOMER_UNIFIED
    ID_CUSTOMER_UNIFIED VARCHAR2 (27) NOT NULL ,
    START_VALIDITY_DATE DATE NOT NULL ,
    END_VALIDITY_DATE DATE ,
    CUSTOMER_STATUS VARCHAR2 (255)
    PARTITION BY RANGE (START_VALIDITY_DATE)
    SUBPARTITION BY LIST (END_VALIDITY_DATE)
    PARTITION M200909 VALUES LESS THAN (TO_DATE('20091001','YYYYMMDD'))
    (SUBPARTITION M200909_N VALUES (NULL), SUBPARTITION M200909_NN VALUES (DEFAULT)),
    PARTITION M200910 VALUES LESS THAN (TO_DATE('20091101','YYYYMMDD'))
    (SUBPARTITION M200910_N VALUES (NULL), SUBPARTITION M200910_NN VALUES (DEFAULT)),
    PARTITION M200911 VALUES LESS THAN (TO_DATE('20091201','YYYYMMDD'))
    (SUBPARTITION M200911_N VALUES (NULL), SUBPARTITION M200911_NN VALUES (DEFAULT)),
    PARTITION M200912 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD'))
    (SUBPARTITION M200912_N VALUES (NULL), SUBPARTITION M200912_NN VALUES (DEFAULT)),
    PARTITION M201001 VALUES LESS THAN (TO_DATE('20100201','YYYYMMDD'))
    (SUBPARTITION M201001_N VALUES (NULL), SUBPARTITION M201001_NN VALUES (DEFAULT)),
    PARTITION M201002 VALUES LESS THAN (TO_DATE('20100301','YYYYMMDD'))
    (SUBPARTITION M201002_N VALUES (NULL), SUBPARTITION M201002_NN VALUES (DEFAULT)),
    PARTITION M210001 VALUES LESS THAN (MAXVALUE))
    (SUBPARTITION M210001_N VALUES (NULL), SUBPARTITION M210001_NN VALUES (DEFAULT))
    ;

    Hi Hoek,
    the DB version is 10.2 (italian version, then SET is correct).
    ...there's something strange: now I can INSERT rows but I can't update them!
    I'm using this command string:
    UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
    id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
    And this is the error:
    Error SQL: ORA-14402: updating partition key column would cause a partition change
    14402. 00000 - "updating partition key column would cause a partition change"
    *Cause:    An UPDATE statement attempted to change the value of a partition
    key column causing migration of the row to another partition
    *Action:   Do not attempt to update a partition key column or make sure that
    the new partition key is within the range containing the old
    partition key.
    I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
    Do u agree or it's possible an update on a field that implies a partition change?
    Regards Steve

  • Problem with internal speakers of MacBook Pro

    Hi,
    I wanted to know if anyone have experienced a problem with internal speakers of Mac Book Pro. In my MackBook the Internal speaker volume goes down automatically. I checked the System Preferences>Sound>Output , from there I check that it is in the middle ( Balance) However, the problem is still the exists. Just for testing I played an audio file and I moved the bar toward the right speaker it is the same and when I move toward the left speaker the whole sound goes off . Looks like one speaker stops working completely. Then I checked the Utilities > Audio MIDI Setup > Configure Speakers  from there I checked both left and right speakers and the channel frequency is fine. Still same issue.  I have no idea what is going on , I really need your suggestions to get this fixed.
    Thanks in advance.

    Try the following:
    http://support.apple.com/kb/HT1411 Apple Portables: Resetting the System Management Controller (SMC) and http://support.apple.com/kb/PH11243 OS X Mountain Lion: Reset your computer’s PRAM 
    Also, consider installing Boom

  • Problems with a table in PDF`S footer

    Dear sirs,
    We are having problems when trying to run a PDF with Adobe LiveCycle Designer tool.
    We are working with a PDF which is composed of a header, the main body and a footer. We have created a table (table1) at the footer and
    another one at the main body (table2). This last table (table2) may overflow therefore it will genarate two pages for our PDF.
    On both pages appear the header and the footer correctly but in the last page it does not write the data from the table included in the footer (table1).
    We have no problems with the table included in the main body
    In the attachments, I send you the screenshots of both pages in which I have marked in red the part where we have error.
    May you help us to solve our problem?
    Thanks in advance your help.
    Edited by: emgaitan on Mar 16, 2010 2:18 PM

    Wardell,
    Check the data in RSA3 for the extractor that you use to bring data .
    You must be using the data source 0CO_OM_CCA_09. Check the data and reconcile and you will get it.
    Let me know if you need anything else.
    Thanks
    Ravi Thothadri
    [email protected]

Maybe you are looking for