Field Symbol

Hi,
   I want to transfer my internal table data to excel sheet. But i have created internal table by using field symbol which is without header line. Problem is that when i am tranferring the data by using WS_DOWNLOAD,GUI_DOWNLOAD and WS_EXCEL , header line is not tranffered.
Thanks and Regards,
Hetal Patel

Hi,
As you told Internal table is without header line, then how will the header line get transferred, if u are talking about the last record, is not comin in the file, then u might have not appended it properly into the  internal table. If possible paste the piece of code here.
Thanks & Regards,
Navneeth K.

Similar Messages

  • In webdynpro ,Passing field symbols as values to class methods

    Hi
    Please tell me the ways of accessing database in webdynpro abap(not directly). I am calling Class method for accessing database. As currently I am directly accessing database in my webdynpro application. I have created a class and method for the same.
    In my method I want to use select statement which will return table with values to webdynpro application. So for select statement(Calling Method) I need to use my field symbol values as where in clause .
    Could anyone please help with example code?
    Thanks,
    Ujjwal

    data: in_line type ref to data.
    CREATE DATA in_line LIKE LINE OF <dyn_tab>.
      ASSIGN in_line->* TO <dyn_wa>.
    You can create a data reference and assign it to a field symbol and change the values. direclty passing field symbols is not possible.
    Abhi

  • How to revert back a SAP NOTE? Dump- Field symbol has not yet been assigned

    Hi Experts,
    We r getting dump(cause: Field symbol has not yet been assigned) in production for ABUMN tx, so, when debugged, it came to know that, the Field symbol is coming from REUSE_ALV_LIST_DISPLAY!!
    So, for some reason the system message text is not getting output in ALV-->Dump!!
    So, found a NOTE causing this problem!!
    So, pls. let me know that, How to revert back this/any SAP NOTE? pls. in detail steps wise!!
    thanq
    Edited by: Srinivas on Jan 24, 2008 4:32 PM

    Hi
    In SNOTE tcode,  select the Note that you implemented and click on 'RESET SAP Note Implementation'
    shylesh

  • Modify DB by single field using Field Symbol

    Hi,
      please help me ,actually i have not use the field symbol in any object. i have one requirement ,i have to modify the DB by field STATUS using Field symbol ,
    I am sending u my code so please help me how can i modify DB using field symbol..
              gw_msg3_status1   = k_status1 .
              LOOP AT gi_msg3 INTO gs_msg3.
                gs_msg3-status  = gw_msg3_status1 .
                gs_msg3-issue   = lw_issuno.
           MODIFY gi_msg3 FROM gs_msg3 TRANSPORTING status.
                MODIFY gi_msg3 INDEX sy-tabix FROM gs_msg3 TRANSPORTING issue status.
              ENDLOOP.
    Thanks & Regards,
    Meenakshi

    perform dboperation_table using 'SET' 'BIRTHDT' '=' <fs>.
        perform dboperation_table using 'WHERE' 'PARTNER' '='  <fs>
        perform dboperation_update using 'BUT000'.
    form dboperation_table
    using p_type
          p_var1
          p_var2
          p_var3.
      data: t_l type cmst_str_data.
      data: d_cx_root            type ref to cx_root,
            d_text               type string.
      try.
          clear t_l.
          if p_var3 is not initial.
            t_l = p_var3.
            condense t_l.
            concatenate '''' t_l '''' into t_l.
          endif.
          concatenate p_var1 p_var2 t_l into t_l
          separated by space.
          case p_type.
            when 'SET'.   append t_l to g_s_t.
            when 'WHERE'. append t_l to g_w_t.
          endcase.
        catch cx_root into d_cx_root.
          d_text = d_cx_root->get_text( ).
          message a398(00) with  d_text.
      endtry.
    endform.                    "DBOPERATION_table
    form dboperation_update
    using  p_tabname type zdboperation-tabname.
      data: tabname type bus_table.
      data: d_cx_root            type ref to cx_root,
            d_text               type string.
      try.
          tabname-tabname = p_tabname.
          call function 'ZDBOPERATION_UPDATE'
            in update task
            exporting
              tabname     = tabname
            tables
              where_table = g_w_t
              set_table   = g_s_t.
        catch cx_root into d_cx_root.
          d_text = d_cx_root->get_text( ).
          message a398(00) with  d_text.
      endtry.
    endform.                    "DBOPERATION_update
    Hope it will help you.
    Regards,
    Madan.

  • Field symbols and READ TABLE with system code 4

    Hi,
    I have a hashed table and I am using field symbols to point to it to retrieve the field content. I then use it in the READ TABLE statement in the following way:
    Loop at x_data assign <fs>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c1>.
    ASSIGN COMPONENT 'xxx' OF STRUCTURE <fs> TO <c2>.
    READ TABLE ZZZZ assign <fs> with table key a1 = <c1>
                                               a2 = <c2>.
    If sy-subrc = 0.
    endif.
    I ran the debugger and I keep getting a 4. I am not able to get the value from a1 and a2 to see what it is and why it is causing a 4 sy-subrc. I know the value from the hashed table and the values c1 and c2 are the same, so the sy-subrc should be 0.
    How would I read a hashed table using field symbols? I know that usig a standard table, I have to sort the table on the key fields() before I actually can do the READ TABLE using the binary search.
    Please advise. Thanks
    RT

    Hai Rob
    Go  through the following Code
    Field-Symbols are place holders for existing fields.
    A Field-Symbol does not physically reserve space for a field but points to a field, which is not known until run time of the program.
    Field-Symbols are like Pointers in Programming language ‘ C ‘.
    Syntax check is not effective.
    Syntax :
    Data : v1(4) value ‘abcd’.
    Field-symbols <fs>.
    Assign v1 to <fs>.
    Write:/ <fs>.
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.
    DO 4 TIMES.
    LINE-COL1 = SY-INDEX.
    LINE-COL2 = SY-INDEX ** 2.
    APPEND LINE TO ITAB.
    ENDDO.
    READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.
    <FS>-COL2 = 100.
    READ TABLE ITAB WITH TABLE KEY COL1 = 3 ASSIGNING <FS>.
    DELETE ITAB INDEX 3.
    IF <FS> IS ASSIGNED.
    WRITE '<FS> is assigned!'.
    ENDIF.
    LOOP AT ITAB ASSIGNING <FS>.
    WRITE: / <FS>-COL1, <FS>-COL2.
    ENDLOOP.
    The output is:
    1 1
    2 100
    4 16
    Thanks & regards
    Sreenivasulu P

  • Loop at  field-symbol  (any table) into string ?

    Hi Everyone,
    I need little help, I have a requirement to extract table content with columns names as the header.
    After doing some search I figured out the best way to this since table name will be only avaialbe at runtime through
    a selection field . my problem is to loop through field-symbol and convert a structure to string value so that I can
    write to the file.
    REPORT  zlab_tbl_export.
    DATA table_name(30) VALUE 'ZSMARTTS_HTML'.
    DATA v_file(100) VALUE 'c:\sap_export.txt'.
    DATA line(1000).
    DATA: o_data TYPE REF TO data.
    CREATE DATA o_data TYPE TABLE OF (table_name).
    FIELD-SYMBOLS: <table> TYPE ANY TABLE.
    ASSIGN o_data->* TO <table>.
    SELECT * UP TO 100 ROWS FROM (table_name) INTO TABLE <table>.
    OPEN DATASET v_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    >>>>>>> LOOP at <table> into line.   >>>>>>>>>>>>  " Here the code breaks and fail
      TRANSFER line to v_file. 
      WRITE :/ line.          
    ENDLOOP.
    CLOSE DATASET v_file.
    Exception Message
    |Error analysis                                                                                |
    |    You attempted to move one data object to another.                                             |
    |    This is not possible here because the conversion of a data object                             |
    |    of type "v" to type "C" is not supported.                                                     |
    |                                                                                |
    |      List of internal ABAP types:                                                                |
    |                                                                                |
    |      C    Text (Character)                                                                       |
    |      N    Numerical text                                                                         |
    |      D    Date (YYYYMMDD)                                                                        |
    |      T    Time (HHMMSS)                                                                          |
    |      X    Hexadecimal                                                                            |
    |      I    Integer                                                                                |
    |      P    Packed number                                                                          |
    |      F    Floating point number                                                                  |
    |                                                                                |
    |      h    Internal table                                                                         |
    |      r    Object reference                                                                       |
    |      l    Data reference                                                                         |
    |      g    String of type C                                                                       |
    |      y    String of type X                                                                       |
    |      s    2-byte integer with plus/minus sign                                                    |
    |      b    1-byte integer without plus/minus sign                                                 |
    |      u    Structure (flat structure)                                                             |
    |      v    Structure (deep structure)                                                             |

    Hi Everyone, I need little help, I have a requirement to extract table content with columns names as the header. After doing some search I figured out the best way to this since table name will be only avaialbe at runtime through a selection field . my problem is to loop through field-symbol and convert a structure to string value so that I can write to the file.
    thie is the code
    REPORT  zlab_tbl_export.
    DATA table_name(30) VALUE 'ZSMARTTS_HTML'.
    DATA v_file(100) VALUE 'c:\sap_export.txt'.
    DATA line(1000).
    DATA: o_data TYPE REF TO data.
    CREATE DATA o_data TYPE TABLE OF (table_name).
    FIELD-SYMBOLS: <table> TYPE ANY TABLE.
    ASSIGN o_data->* TO <table>.
    SELECT * UP TO 100 ROWS FROM (table_name) INTO TABLE <table>.
    OPEN DATASET v_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP at <table> into line.   " Fail here
      TRANSFER line to v_file. 
      WRITE :/ line.           
    ENDLOOP.
    CLOSE DATASET v_file.
    and this is the exception:
    Error analysis                                                                               
    You attempted to move one data object to another.                                            
        This is not possible here because the conversion of a data object                            
        of type v to type C is not supported.                                                    
    Edited by: Misbah on Jan 7, 2010 11:50 PM

  • "Read table" and field symbols

    Hello all,
    I have a (hopefully simple) question. Let's suppose I want to do the following:
    loop at itab1 assigning <fs1>.
      read table itab2 assigning <fs2> with table key <fs1>-field1.
      if sy-subrc eq 0.
        move <fs2>-field1 to ls_out-field1.
      endif.
      read table itab3 assigning <fs3> with table key <fs1>-field2.
      if sy-subrc eq 0.
        move <fs3>-field1 to ls_out-field2.
      endif.
    endloop.
    It's also possible to do the following instead:
    loop at itab1 assigning <fs1>.
      unassign: <fs2>,
                <fs3>.
      read table itab2 assigning <fs2> with table key <fs1>-field1.
      read table itab3 assigning <fs3> with table key <fs1>-field2.
      if <fs2> is assigned.
        move <fs2>-field1 to ls_out-field1.
      endif.
      if <fs3> is assigned.
        move <fs3>-field1 to ls_out-field2.
      endif.
    endloop.
    My question is: is it "better" to check sy-subrc after each read, and then do a move statement within that if statement, or is it better to check whether the field symbol is assigned each time I want to fill in a field and read everything at the same time?
    I'm only really concerned about the case where you don't want to drop out of the loop after the read (so if the read fails you just don't fill any data in). I'm also discounting potential human error (otherwise the sy-subrc method wins hands-down).

    Just to close this one (albeit somewhat belatedly). I asked Harry Dietz (the ABAP Performance blogging fella) what he would suggest, and he says sy-subrc all the way. Checking that an integer is zero is considerably faster than checking for the assignment, or otherwise, of a field symbol. Furthermore, whilst the field symbol method has the potential to be faster than the sy-subrc method given some compiler optimizations, unfortunately these optimizations don't exist in the ABAP compiler - they're there in the Java compiler though! Shame really. Apparently the ABAP compiler is a pretty simple beast.
    Anyway - thanks Harry for clearing this one up!

  • Error while trying to run Bex Query -------- Field symbol is not assigned.

    Hello Every body,
    I am facing the following error after giving some value in Selection screen and trying to run the Bex Query
    ERROR : Field symbol is not assigned.
    Thanks in advance,
    Praveen

    can u plz give details of variables, what it is build on and the value u r inputing,
    also is thr any dump.
    double click on the error message it shows u. it will give u the detailed error message. post that too

  • Field symbol has not yet been assigned. ???

    Dear Experts ,
    W hen i tried to execute my program this error appears :
    Short text
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLSLVC" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 32821).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    and Here is my CODE :
    *& Report  ZPO
    Report  ZPO1.
    type-pools slis.
      PARAMETERS : PO_Doc like EKBE-EBELN DEFAULT '4800000007'.
      PARAMETERS : Plant TYPE WERKS DEFAULT '1000'.
      PARAMETERS : PO_ORG TYPE EKORG DEFAULT ''.
      data TtlS type mara-wesch .
      data TtlH type mara-wesch .
      data Ttl type mara-wesch .
      data ZEKBE type TABLE OF EKBE.
      data ZEKBER type EKBE.
      data ZEKPO type TABLE OF EKPO.
      data ZEKPOR type EKPO.
      data ZEKKOR TYPE EKKO.
      data ZNAME1F type LFA1-LIFNR.
      data ZWGBEZF TYPE T023T-WGBEZ.
      data i type n.
      data counter type n.
    types : begin of SBAGDS,
      Serial Type n, "Purchase Order
      EBELN like EKKO-EBELN, "Purchase Order
      MATNR like EKPO-MATNR, "Material
      TXZ01 like EKPO-TXZ01, "Short Text
      MATKL like EKPO-MATKL, "Material Group
      WGBEZ like T023T-WGBEZ, "Material Group Desc"
      SUBMI like EKKO-SUBMI, "GPM
      CHARG like EKBE-CHARG, "Batch
      LIFNR like EKKO-LIFNR, "Vendor
      NAME1 like LFA1-NAME1, "Vendor Name
      RECV like mara-wesch, "Received Quantity
      REVR like mara-wesch, "Reversed Quantity
      DELV like mara-wesch, "Delivered Quantity
    end of SBAGDS .
    DATA : BAGDS TYPE SBAGDS OCCURS 0 WITH HEADER LINE.
    data Struc like BAGDS.
    data: gr_table like BAGDS OCCURS 0 WITH HEADER LINE.
    data: gt_fieldcat type slis_t_fieldcat_alv, gt_outtab type SBAGDS occurs 0 with header line.
    INITIALIZATION.
    i = 0.
    counter = 0 .
    perform field_cat_init using gt_fieldcat[].
    FORM field_cat_init using rt_fieldcat type slis_t_fieldcat_alv.
    data: ls_fieldcat type slis_fieldcat_alv,
             pos type i value 1.
    clear LS_FIELDCAT.
    *Column 1
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'Serial'.
    ls_fieldcat-SELTEXT_L      = 'Serial'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 2
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'EBELN'.
    ls_fieldcat-SELTEXT_L      = 'Purchase Order'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 3
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'MATNR'.
    ls_fieldcat-SELTEXT_L      = 'Material'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 4
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'TXZ01'.
    ls_fieldcat-SELTEXT_L      = 'Short Text'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 5
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'MATKL'.
    ls_fieldcat-SELTEXT_L      = 'Material Group'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 6
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'WGBEZ'.
    ls_fieldcat-SELTEXT_L      = 'Material Group Desc'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 7
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'SUBMI'.
    ls_fieldcat-SELTEXT_L      = 'GPM'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 8
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'CHARG'.
    ls_fieldcat-SELTEXT_L      = 'Batch'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 9
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'LIFNR'.
    ls_fieldcat-SELTEXT_L      = 'Vendor'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 10
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'NAME1'.
    ls_fieldcat-SELTEXT_L      = 'Vendor Name'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 11
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'RECV'.
    ls_fieldcat-SELTEXT_L      = 'Received Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 12
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'REVR'.
    ls_fieldcat-SELTEXT_L      = 'Reversed Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    *Column 13
    ls_fieldcat-col_pos           = pos.
    ls_fieldcat-fieldname        = 'DELV'.
    ls_fieldcat-SELTEXT_L      = 'Delivered Quantity'.
    ls_fieldcat-DDICTXT          = 'L'.
    append ls_fieldcat to rt_fieldcat.
    clear ls_fieldcat.
    pos = pos + 1.
    endform.
    START-OF-SELECTION.
           select SINGLE * from EKKO into ZEKKOR where EBELN = PO_DOC.
           select SINGLE * from EKPO into ZEKPOR where EBELN = PO_DOC.
           select SINGLE NAME1 from LFA1 into ZNAME1F where LIFNR = ZEKKOR-LIFNR.
    *         ' Buliding Structure
              Struc-EBELN = ZEKPOR-EBELN.
              Struc-SUBMI = ZEKKOR-SUBMI.
              Struc-LIFNR = ZEKKOR-LIFNR.
              Struc-Name1 = ZNAME1F.
           select * from EKPO into TABLE ZEKPO where EBELN = PO_Doc and WERKS = plant.
           LOOP at ZEKPO into ZEKPOR.
               select SINGLE WGBEZ from T023T into ZWGBEZF  WHERE MATKL = ZEKPOR-MATKL .
               counter = counter + 1.
    *         ' Buliding Structure
              Struc-Serial = counter.
              Struc-MATNR = ZEKPOR-MATNR.
              Struc-TXZ01 = ZEKPOR-TXZ01.
              Struc-MATKL = ZEKPOR-MATKL.
              Struc-WGBEZ = ZWGBEZF.
    *          Calcualting Debit transactions from PO History
               select * from EKBE into table ZEKBE where EBELN = PO_Doc and MATNR = ZEKPOR-MATNR and  EBELP = ZEKPOR-EBELP and BWART NOT LIKE '' and SHKZG = 'S'.
               LOOP AT ZEKBE INTO ZEKBER.
                   TtlS = TtlS + ZEKBER-MENGE.
               ENDLOOP.
    *          ' Buliding Structure
               Struc-CHARG = ZEKBER-CHARG.
               Struc-RECV = TtlS.
               Ttl = TtlS.
               clear TtlS.
    *         Calcualting Credit transactions from PO History
             select * from EKBE into table ZEKBE where EBELN = PO_Doc and MATNR = ZEKPOR-MATNR and  EBELP = ZEKPOR-EBELP and BWART NOT LIKE '' and SHKZG = 'H'.
               LOOP AT ZEKBE INTO ZEKBER.
                   TtlH = TtlH + ZEKBER-MENGE.
               ENDLOOP.
    *          ' Buliding Structure
               Struc-REVR = TtlH.
    *          Calculating Total Delivered
               Ttl = Ttl - TtlH.
               clear TtlH.
    *          ' Buliding Structure
               Struc-DELV = Ttl.
               clear Ttl.
    *      Writtng ITAB
           APPEND Struc to BAGDS.
           ENDLOOP.
    *      Reading ITAB
    *       WRITE : / , 'ITAB Begin : '    .
    *       loop at  BAGDS into Struc.
    *         counter = counter + 1.
    *         write : /,'Serial : ',counter.
    *         write : / ,'PO : ',Struc-EBELN.
    *         write : / ,'Vendor : ',Struc-LIFNR.
    *         write : / ,'Vendor Name : ',Struc-NAME1.
    *         write : / ,'Material : ',Struc-MATNR.
    *         write : /,'Short Text: ',Struc-TXZ01.
    *         write : / ,'Model : ',Struc-MATKL.
    *         write : / ,'Model Desc : ',Struc-WGBEZ.
    *         write : /,'GPM : ',Struc-SUBMI.
    *         write : /,'Lot : ',Struc-CHARG.
    *         write : /,'Received : ',Struc-RECV.
    *         write : /,'Reversed : ',Struc-REVR.
    *         write : /,'Delivered : ',Struc-DELV,/,/,/.
    *       ENDLOOP.
    * Call ALV Grid Viewer
    *BREAK-POINT.
    gr_Table[] = BAGDS[].
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
                 I_STRUCTURE_NAME   = 'SBAGDS'
                 IT_FIELDCAT          = gt_fieldcat[]
            TABLES
                 T_OUTTAB                  = gr_Table.
    Please Advise
    Edited by: Sap Sap on Jul 27, 2009 12:18 PM
    Edited by: Sap Sap on Jul 27, 2009 12:22 PM
    Edited by: Sap Sap on Jul 27, 2009 12:22 PM

    Hi,
    The problem seems to be in your ALV grid display.
    The reason must be your field catalog.
    Just check your fieldcatalog.
    The value in the fieldname field of the fieldcatalog should be same as the fieldname in your internal table and should be in capital letters.
    Probably you must have mistyped some field.
    Kinldy check.
    Regards,
    Ankur Parab

  • How can i concatenate single quote to a field symbol

    hi
    i have a senario where i have to concatenate a single quote (') to the field symbol. it is simple but i' m not able to do that.
    concatenate ''' <f> ''' into lv_f.
    CONCATENATE lv_condition_temp lv_f INTO
                                   lv_condition_temp
                                           SEPARATED BY space.
    this is the code which i used. could someone help me in solving this...
    thanks & regards,
    subha....

    hi
    i tried using the following code
    data : lv_text(10) type c.
    concatenate ''' <f> ''' into lv_text.
    it is giving me a spelling or incorrect comma error.
    thanks & regards,
    subhashini.

  • Field symbol with top of page in reuse_alv_list

    When using the top_of_page in REUSE_ALV_LIST_DISPLAY
    I had in the old programm reference to values in the outtab for the header in the new programm I use dynamic tables and I wonder how to add those values in a header.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  i_callback_program       = h_repid
                  i_callback_pf_status_set = 'SET_PF_STATUS'
                  i_callback_user_command  = 'USER_COMMAND'
    *            i_structure_name         = 'ZDOORBEL_ALV'
    *            IT_EVENTS                = TEVENTS
                  is_layout                = slayout
                  it_fieldcat              = it_fieldcat[]
                  it_sort                  = tsort[]
                  i_save                   = a_save
                  is_variant               = variant
             TABLES
                  t_outtab                 = <ta_output>
    in my top_of_page I try to read the current row of <ta_output> but I have no clue on how to do it. I gives the error that there is no workarea assigned to <ta_output>
    anybody knows how to read the current line of <ta_output>  in top_of_page ?
    kind regards
    arthur de smidt

    I have
    * fieldsymbols voor dynamische ALV tabel
    FIELD-SYMBOLS: <ta_output> TYPE table ,
                  <ta_color> TYPE table,
                  <l_line>  TYPE ANY,
                  <wa_output> type any,
                  <wa>  TYPE ANY,
                   <l_field> TYPE ANY,
                   <fs> TYPE ty_pernrs.
    FORM top_of_page.
      CREATE DATA new_line LIKE LINE OF <ta_output>.
      ASSIGN new_line->* TO <wa_output>.
      read table <ta_output> assigning <wa_output> index sy-tabix.
    if ra_pernr = 'X'.
      if <wa_output>-week = space or <wa_output>-pernr = '00000000'.
    but still it says that the
    The data object "<WA_OUTPUT>" has no structure and therefore no
    component called "WEEK" . .
    Edited by: A. de Smidt on Jun 26, 2008 11:07 AM

  • Field-symbols v/s Object references in OO-ABAP

    Hi,
    can anyone please tell me what is the difference between using field-symbols and object references in OO ABAP? Is there a specific need for field-symbols now that we have references?
    Thanks.
    Shakul.

    Hi ,
    Please note that both Field symbols & Object References are different .
    You can use Field symbols during the following situations
    1) When you want to modify the value of internal table, the field symbol would be useful since you do not have to use any Modify statement as in case of work area. The Field symbol works as a pointer and any changes to the field symbol will directly affect the value of the internal table
    2) Make sure that you do not reassign the field symbol within a Loop iteration
    3) Field symbols are useful when you work with dynamic internal tables ( tables whose structure is determined during run time)
    4) After Read an internal table ( Read itab...) into a Field symbol, make sure you do a Sy-subrc check or check if the field symbol is assigned.IF not this will give you a run time error
    You can use Object References while creating an object to a class. They are instances of a class.
    Thanks,
    Chakram Govindarajan

  • ALV report with internal in field symbol

    Hi Shifu ABAP,
    I have ALV report.
    My problem is when I tried to do sum using the sum icon. I got a message 'desired operation cannot be performed for column 'Dignostic delay'. Is it because I used field symbol, then when I clicked on the column it didn't recorgnise the field.
    FYI.
    1)The internal table for my ALV report is stored in field symbol.
    2)I dont have a problem to display the report.
    3)I had to set 'do_sum' at ALV field category, still doesn't work
    My source code to define ALV category.
    loop at i_qpcd into wa_qpcd.
    CLEAR ls_fieldcat2.
    ls_fieldcat2-col_pos = pos2.
    ls_fieldcat2-fieldname = wa_qpcd-code.
    ls_fieldcat2-reptext_ddic = wa_qpcd-desc.
    ls_fieldcat2-just = 'C'.
    ls_fieldcat2-do_sum = 'X'.
    APPEND ls_fieldcat2 TO gt_fieldcat2.
    endloop.
    My source code call the ALV FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
         i_callback_program         = 'ZMPMR001_Q1OOT'
         i_callback_pf_status_set = 'PF_STATUS_SET'
         is_layout                        = ls_layout
         it_fieldcat                       = gt_fieldcat2[]
         is_print                          = ls_print
    TABLES
         t_outtab                         = <l_table>
    EXCEPTIONS
         program_error                 = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Thanks a lot in advance for your attention.

    my situation is like this, declare the internal tble
    1) data : begin of itab occurs 0,          
                code like qpcd-code,
                desc like QPCT-KURZTEXT,
              end of itab.
    2) populate the itab like this
    code           desc
    01              desc 1
    02              desc 2
    03              desc 3
    3) take the selected record converted it into new dynamic internal table using field symbol declare as table, now the component of this new table are 01, 02 and 03.
    4) populate the new table with some data, so technically my new table structure will be like this
    01         02         03
    1           0          1
    0           0          3
    2           2          2
    5) display the new table in ALV report, in ALV I tried to sum-up each of column.
    6) Question : HOW can I convert the componet 01, 02 and 03 as an integer/numeric field.
    Regards
    Nislina

  • Field symbol has not yet been defined-ALV Grid Display in Report

    Hi all,
              Iam calling a Function module for ALV grid display in Report programming. Its throwing the Error message Field Symbol has not yet defined. Can any one suggest what i have to do regarding it?

    Hi,
    <li> This is problem with fieldcatalog.
    <li> Check field names or table name in small letters in quotes while building fieldcatalog internal table
    <li> Check the fieldcatalog internal table , whether it has same fields as in data table which is shown using GRID_DISPLAY function module.
    Thanks
    Venkat.O

  • Right way to declare field symbols

    i am new to field symbols, pls  help
    i want to know which  is the right way of declaration ?
    types: begin of typ_tab,
               vbeln  type vbap-vbeln,
               posnr type vbap-posnr,
               matnr  type vbap-matnr,
              end of typ_tab.
    data:  itab type standard table of typ_tab,
              wa  type typ_tab.
    field-symbols: <f_t> type standard table, 
                           <f_w> type any,                or      <f_w>  like  line of typ_tab,  ??
                            <f_s> type any.
    select  vbeln posnr  ....... into itab......
    assign  itab to <f_t>.
    assign wa  to <f_w>.
    loop at <f_t> assigning <f_w>.
    assign component 'vbeln' of structure <f_w>  to <f_s>.
    write : / <f_s>.
    endloop.
    OR
    loop at itab assigning <f_w>. 
    write: / <f_w>-vbeln.
    endloop. 
    r these 2 statements correctt ? if so then which one  to use,  pls show with an example. wats the diff btwn above 2  types of  looping statements ?   how to use read statement on this ?

    Hello Saurajit,
    Both the way are correct. And it depends on the requirement, which one to use.
    <f_w> TYPE ty_tab - is TYPED field symbol - if you know TYPE before runtime you can use this. It will just work like a static work area.
    <f_w> TYPE any - is not TYPED and structure of this field symbol is defined during runtime using ASSIGN statement. And fields of the structure is read by ASSIGN COMPONENT <<field name>> statement.

  • Field-Symbols: How to retrieve data into an internal table from FS

    Hello All,
    I am working on field symbols.I have declared the field symbols as shown.
    FIELD-SYMBOLS: <gt_pos_data>  TYPE table,
                               <wa_pos_data> like <gt_pos_data>.
    Data: Begin of itab occurs 0,
               field1(5) type c,
               field2(10)_type c,
             end of itab.
    The FS  <gt_pos_data> has 100 fields but I need to move only two fields from this FS to my internal table itab.I am doing the following.
    loop at <gt_pos_data> assigning <wa_pos_data>.
    itab-field1 = <wa_pos_data>-field1.
    itab-field2 = <wa_pos_data>-field2.
    append itab.
    clear itab.
    endloop.
    But it is giving me an error saying "<wa_pos_data> is a table without header line and therefore has no componet FIELD1".How to achieve this requirement?
    Thanks in advance
    Sandeep

    <wa_pos_data> should be defined LIKE LINE OF <gt_pos_data>, but it will still have no structure, so you need to assign a field symbol to the component as well.
    FIELD-SYMBOLS: <gt_pos_data> TYPE table,
                               <wa_pos_data> like LINE OF <gt_pos_data>,
                               <field> type any.
    Data: Begin of itab occurs 0,
    field1(5) type c,
    field2(10)_type c,
    end of itab.
    loop at <gt_pos_data> assigning <wa_pos_data>.
    assign componet 'FIELD1' of structure <wa_pos_data> to <field>.
    if sy-subrc  = 0.
    itab-field1 = <field>.
    endif.
    assign componet 'FIELD2' of structure <wa_pos_data> to <field>.
    if sy-subrc  = 0.
    itab-field2 = <field>.
    endif.
    append itab.
    clear itab.
    endloop.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Print preview using Crystal Report

    Hello All, In SBO 8.8 or in 2007 with add-on (like B1UP) it is possible to have a cystal report launched by the preview buttons. It works perfectly when the document is stored in the DB, the preview is blanked if you don't have the document validated

  • Printer Utility Crashes, Mac OS X10.9.5

    Had a problem with the scanner - wouldn't work - so I reinstalled the software and drivers. Both printer and scanner functions work properly. However, I now I get a "HP Utility quit unexpectedly message.  Restarted and repaired permissions - still cr

  • How to remove corrupt share point?

    Hi All, I have a corrupt sharepoint that is killing my backups, I'm in need of some help getting rid of this "beast". OS X Server 10.5.4 Advanced. Mac Mini 1.83 GHz 2GB RAM. Server runs on internal drive, backs up to external firewire drive. Server h

  • How to get the column name and table name from xml file

    I have one XML file, I generated xsd file from that xml file but the problem is i dont know table name and column name. So my question is how can I retrieve the data from that xml file?

  • Where is the output for PWM on NI 7774 connected to motion control card 7356

    Hi, I have NI motion control card 7356 which interfaced through 7774 interface board. PWM outputs are written to be on pins 5 and 9 on Digital IO, yet there is no indication about the whereabouts of these PWMs on the interface board (7774). Would you