Is it possible to use internal table field name as variable?

data : temp_string(10) type c.
data : result type string.
temp_string = 'field1'.
loop at itab1 into str1.
  result =  str1-temp_string. "error here"
endloop.
HI.
think this code not executable and actually fail to compile.
is it possible to put structure field name with variable?
anyone can help me ? please
thank you.
Regards
Bae

You may use of COMPONENT of your structure.
FIELD-SYMBOLS: <F>.
ASSIGN COMPONENT I OF STRUCTURE F TO <F>.
To find index of component you may use
DESCRIBE FIELD f INTO td.
(But SAP beware us)
Regards

Similar Messages

  • Internal table field name problem

    Dear All,
              I am declaring one internal table & fetching data using inner join. Following is my structure of internal table but it is not fetching data into MATNR1, the data is there in the table.
    Kindly suggest why this is happening?
    Regards,
    Dilip Gupchup
    internal table
    data : begin of sales_to_purchase_link_itab occurs 10,
    *******FOR P O RELATED INFORMATION
             EBELN LIKE EKKN-EBELN,"DOCUMENT NO
             AEDAT LIKE EKPO-AEDAT,"P O DATE
             EBELP LIKE EKKN-EBELP," ITEM
             MATNR LIKE EKPO-MATNR,"MATERIAL
             MENGE LIKE EKKN-MENGE,"QUANTITY
             SAKTO LIKE EKKN-SAKTO,"G/L Account Number
             NETWR LIKE EKKN-NETWR,"Net order value in PO
    *******END FOR P O RELATED INFORMATION
    *******FOR SALES ORDER RELATED INFORMATION
             VBELN LIKE EKKN-VBELN,"SALES DOC NO
             VBELP LIKE EKKN-VBELP,"SALES DOC ITEM
             MATNR1 LIKE VBAP-MATNR,"SALES MATERIAL
             ERDAT LIKE VBAP-ERDAT,"SALES DOC DATE
             ARKTX LIKE VBAP-ARKTX,"MATERIAL DESCRIPTION
             ZMENG LIKE VBAP-ZMENG,"QUANTITY
             NETPR LIKE VBAP-NETPR,"SALE VALUE
    *******FOR SALES ORDER RELATED INFORMATION
       end of sales_to_purchase_link_itab.
    select query
    select
    ekkn~ebeln
    EKKN~EBELP
    EKKN~SAKTO
    EKKO~AEDAT
    ekko~bukrs
    EKPO~MATNR
    EKPO~MENGE
    EKPO~NETWR
    vbap~vbeln
    ekkn~vbelp
    vbap~arktx
    VBAP~MATNR
    into corresponding fields of table
    sales_to_purchase_link_itab from ekkn
    inner join ekko on ekknebeln eq ekkoebeln "UP TO 10 ROWS.
    INNER JOIN EKPO ON EKKOEBELN EQ EKPOEBELN
    inner join vbap on ekknvbeln eq vbapvbeln
    WHERE
    EKPO~AEDAT IN S_ERDAT1.

    Hi,
    or change your coding like that:
    DATA rep LIKE sy-repid.
    TYPE-POOLS : slis.
    DATA : fcat TYPE slis_t_fieldcat_alv.
    DATA wa TYPE  slis_fieldcat_alv.
    DATA : BEGIN OF fld OCCURS 0,
    name(50),
    END OF fld.
    rep = sy-repid.
    *only possible if fields of itab are defined with LIKE !
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
              i_program_name         = rep
              i_internal_tabname     = 'SALES_TO_PURCHASE_LINK_ITAB'
              i_client_never_display = 'X'
              i_inclname             = rep
         CHANGING
              ct_fieldcat            = fcat.
    LOOP AT fcat INTO wa.
      CONCATENATE wa-ref_tabname '~' wa-fieldname INTO fld-name.
      APPEND fld.
    ENDLOOP.
    SELECT (fld)
    INTO TABLE sales_to_purchase_link_itab
    FROM ekkn
    INNER JOIN ekko ON ekkn~ebeln EQ ekko~ebeln "UP TO 10 ROWS.
    INNER JOIN ekpo ON ekko~ebeln EQ ekpo~ebeln
    INNER JOIN vbap ON ekkn~vbeln EQ vbap~vbeln
    WHERE
    ekpo~aedat IN s_erdat1.
    Andreas

  • How to find internal table column names

    Hi Friends,
    I have declared one internal table with 45 fields.
    Here is my situation.
    I need to create dynamic table with all above 45 fields and some more fields (approx 10 fields).
    I got the solution for creating dynamic table. Only thing is
    I have to assign all the above 75 columns to  other internal table.
    is there any way we can read internal table field names in the program.
    we can acheive this by hard coding the all 75 field names.
    since it is 75 columns, i want to pass one by one field dynamically to the other table.
    Pls give me a solution.
    thanks in advance.

    HI,
    Find the code for dynamical internal table., which helps to increase the fields in the internal table dynamically.
    REPORT ZTEST_R3.
    FIELD-SYMBOLS: <L_TABLE> TYPE TABLE,
    <L_LINE> TYPE ANY,
    <L_FIELD> TYPE ANY.
    DATA: IS_LVC_CAT TYPE LVC_S_FCAT,
    IT_LVC_CAT TYPE LVC_T_FCAT.
    DATA: NEW_TABLE TYPE REF TO DATA,
    NEW_LINE TYPE REF TO DATA.
    START-OF-SELECTION.
    IS_LVC_CAT-FIELDNAME = 'KUNNR'.
    APPEND IS_LVC_CAT TO IT_LVC_CAT.
    IS_LVC_CAT-FIELDNAME = 'NAME1'.
    APPEND IS_LVC_CAT TO IT_LVC_CAT.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
    EXPORTING
    IT_FIELDCATALOG = IT_LVC_CAT
    IMPORTING
    EP_TABLE = NEW_TABLE.
    *Create a new Line with the same structure of the table.
    ASSIGN NEW_TABLE->* TO <L_TABLE>.
    CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>.
    ASSIGN NEW_LINE->* TO <L_LINE>.
    DO 2 TIMES.
    ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <L_LINE> TO <L_FIELD>.
    <L_FIELD> = SY-INDEX.
    ASSIGN COMPONENT 'NAME1' OF STRUCTURE <L_LINE> TO <L_FIELD>.
    <L_FIELD> = 'A'.
    INSERT <L_LINE> INTO TABLE <L_TABLE>.
    ENDDO.
    LOOP AT <L_TABLE> INTO <L_LINE>.
    WRITE:/ <L_LINE>.
    ENDLOOP.
    READ TABLE <L_TABLE> INTO <L_LINE> INDEX 2.
    <L_LINE>+10(2) = 'B'.
    MODIFY <L_TABLE> FROM <L_LINE> INDEX 2.
    LOOP AT <L_TABLE> INTO <L_LINE>.
    WRITE:/ <L_LINE>.
    ENDLOOP.

  • Coloring of Particular Cells in a dynamic internal table(field symbols)

    Hi,
         I have a requirement to introduce color into some particular cells in a dynamic internal table(Field symbol) based on some conditions.I know that color can be introduced at cell level in the case of static internal table.But, can anybody tell me whether it is possible to introduce color to particular cells in the dynamic internal table(Field Symbol) .Please suggest me on this issue.
    Thanks in advance,
    Rajesh

    Hi,
    This is the sample coding for the colour cell report.
    Kindly go through it. It will helps u.
    REPORT YMS_COLOURTEST .
    DATA: BEGIN OF TP OCCURS 10, ID, NR(8), TEXT(255), END OF TP.
    DATA: LENGTH TYPE I VALUE 8, " Length of list
    TESTSTRING(15) TYPE C VALUE '012345678901234',
    WIDTH TYPE I. " Width of list
    DATA: TXT_REPORT LIKE DOKHL-OBJECT.
    START-OF-SELECTION.
    PERFORM HEADING.
    PERFORM OUTPUT_BODY.
    FORM HEADING.
    FORMAT INTENSIFIED OFF. " Remove any INTENSIFIED
    ULINE AT (WIDTH). " Upper frame border
    FORMAT COLOR COL_HEADING INTENSIFIED." Title color
    WRITE: / SY-VLINE. " Left border
    WRITE: 'No |Colour |intensified |intensified off|',
    'inverse' NO-GAP.
    WRITE: AT WIDTH SY-VLINE. " Right border
    ULINE AT (WIDTH). " Line below titles
    FORMAT COLOR OFF.
    ENDFORM.
    FORM OUTPUT_BODY.
    DO LENGTH TIMES.
    PERFORM WRITE_LINE USING SY-INDEX.
    ENDDO.
    ENDFORM.
    FORM WRITE_LINE USING COUNT TYPE I.
    DATA: HELP(14) TYPE C,
    COUNT1 TYPE I.
    COUNT1 = SY-INDEX - 1.
    WRITE: / SY-VLINE NO-GAP.
    WRITE: (4) COUNT1 COLOR COL_KEY INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    CASE COUNT1.
    WHEN '0'.
    HELP = 'COL_BACKGROUND'.
    WHEN '1'.
    HELP = 'COL_HEADING'.
    WHEN '2'.
    HELP = 'COL_NORMAL'.
    WHEN '3'.
    HELP = 'COL_TOTAL'.
    WHEN '4'.
    HELP = 'COL_KEY'.
    WHEN '5'.
    HELP = 'COL_POSITIVE'.
    WHEN '6'.
    HELP = 'COL_NEGATIVE'.
    WHEN '7'.
    HELP = 'COL_GROUP'.
    ENDCASE.
    WRITE: HELP COLOR COL_KEY INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INTENSIFIED OFF NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INVERSE NO-GAP.
    WRITE AT WIDTH SY-VLINE NO-GAP.
    ENDFORM.
    Thanks,
    Shankar

  • How to specify for a internal table field so that number of digits = 9

    In if condition how can i specify that
    if country = 'US'
    then the account number should be equal to 9 digits only.
    <removed_by_moderator>
    Edited by: Julius Bussche on Aug 6, 2008 1:41 PM

    You can set the internal table field to the biggest length possible, according to your requirements, and then work on something like the following. If the condition is met and you have to shorten the account number... try something similar to this:
    DATA e TYPE string VALUE 'Test string'.
    * I'm using 2 as an example here.
    SHIFT e BY 2 PLACES RIGHT CIRCULAR.
    SHIFT e BY 2 PLACES LEFT.
    WRITE :/, e.
    Avraham

  • Abap Logic for performance tuning not working when using Internal tables

    Hi,
    I wrote this piece of code that is working correctly that is select SUM of cost from DSO where Plant is the same for Sales Items.
    LOOP AT RESULT_PACKAGE INTO rp.
    SELECT SUM( /N/S_STRDCOST ) FROM /N/ADSP_DPIT00 INTO
    rp-/N/S_STRDCOST
    WHERE /N42/S_SALESITEM = rp-/N42/S_ITEMID AND /N42/S_PLPLANT EQ
    rp-/N42/S_SOURCE.
    MODIFY RESULT_PACKAGE FROM rp.
    Clear rp.
    ENDLOOP.
    Now I try to rewrite it for performance tunning using internal table  but I am getting 0 values. can't figure out whats the problem and been struggling fixing it.
    TYPES : begin of ty_DSO_TABLE,
             /N42/S_STRDCOST TYPE /N/ADSP_DSPC00-/N/S_STRDCOST,
             /N42/S_ITEMID TYPE /N/ADSP_DSPC00-/N/S_ITEMID,
           end of ty_DSO_TABLE.
    DATA: it_DSO_TABLE type hashed table of ty_DSO_TABLE with unique key
    /N/S_ITEMID,
         wa_DSO_TABLE type ty_DSO_TABLE.
    Field-symbols:  <rp> TYPE tys_TG_1.
    LOOP AT RESULT_PACKAGE assigning <rp>.
      clear wa_DSO_TABLE.
    Read table IT_DSO_TABLE into wa_DSO_TABLE with table key /N/S_ITEMID
      = <rp>-/N/S_ITEMID.
      if sy-subrc ne 0.
          select SUM( /N/S_STRDCOST )  into CORRESPONDING
          FIELDS OF wa_DSO_TABLE from
          /N/ADSP_DPIT00 WHERE /N/S_SALESITEM =  <rp>-/N/S_ITEMID AND
          /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
         if sy-subrc eq 0.
              <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
         endif.
    endif.
    ENDLOOP.
    Any idea whats wrong with the code
    thanks

    Hi Vaidya,
    According to the code which you have written, there is no value in table IT_DSO_TABLE when you are trying to read the values.And after the read statement you have given a condition for sy-subrc. Hence the select statement is actually not even getting executed. *Also you have not assigned the final value back to the ResultPackage.*_
    So Kindly correct your code as follows:
    Data: wa_dso type ty_DSO_TABLE.
    LOOP AT RESULT_PACKAGE assigning <rp>.
    clear wa_DSO_TABLE.
    select SUM( /N/S_STRDCOST ) into CORRESPONDING
    FIELDS OF wa_DSO_TABLE from
    /N/ADSP_DPIT00 WHERE /N/S_SALESITEM = <rp>-/N/S_ITEMID AND
    /N/S_PLPLANT EQ <rp>-/N/S_SOURCE.
    if sy-subrc eq 0.
    <rp>-/N/S_STRDCOST = wa_DSO_TABLE-/N/S_STRDCOST.
    MODIFY RESULT_PACKAGE FROM <rp>.
    endif.
    ENDLOOP.
    Hope this helps you.
    Regards,
    Satyam

  • Using internal tables in BI 7 Start routines

    Hi All
    I tried searching for using internal tables in a start routine in BI 7 could not find the right pointers.
    This is what I am trying to do is the following:
    In a DSO ZSD_O01  I have a sales order and sales order item number and this DSO also contains the Contract number and the contract Item number.
    The DSO structure is as follows:
    /BIC/AZSD_O0100
    DOC_NUMBER
    ITEM
    CONTRACT
    CITEMNUM
    I want to read the data in this DSO into a internal table. But the key fields in this DSO is DOC_NUMBER and ITEM so I want to read this data into a internal table only for the first data package into the internal table. Thereafter I want to lookup into the internal table given the doc_number and ITEM to find the CONTRACT and CITEMNUM.
    Can any of you kindly show me how to :
    - Read data from a DSO into a internal table
    - Read the internal table for the first data package
    - How do I make the access in the internal table fast when my lookup in the internal table is not on the
      DSO key columns but on a different key column
    Appreciate your help
    Thanks
    Karen

    Hi Karen ,
    It will be helpful if you tell your requirement  as the approach you suggested is not looks convincing .May be their is some easy way and we can suggest you better approach
    -how to check for source_package = 1
    You need to hard code it .
    We decide package size at DTP level so you can declare a global variable .let say you have 50000 size of your  package then use global variable as counter and read only when record_count is <= 50000 .
    -how to declare the internal table so the values in it exists between different data packages
    Declare a global table and select data into it .A global table retain data across  the packages .
    - The key on which I need to lookup in the internal table is not the key fields as in the DSO
    Its ok .Let say you are doing lookup on A B and C field of DSO1 and the values may duplicate  in your source .then you just need to read the internal table having data from DSO2  with key field  A B C .
    Better if you set them as semantic keys at DTP level so that all  duplicate entries of A B  C will appear in same package .
    global Declarations
    In your start routine you will have this following code :
      TYPES:
          tyt_SC_1        TYPE STANDARD TABLE OF tys_SC_1
                            WITH NON-UNIQUE DEFAULT KEY.
    $$ begin of global - insert your declaration only below this line  -
    ...   insert your code here
    $$ end of global - insert your declaration only before this line   -
    One question
    Why you want to populate values for 1 source package only not for all ?This will be helpful to understand your requirement and may be we can fulfill it in some other manner .
    Regards,
    Jaya Tiwari

  • Report using internal table events

    Hi,
    i have an internal table with  the fields 1. profitcenter 2. company code 3. gl account 4. amount
    for each profit center i need to seggregate accounts based on company code.
    the report should look like the one below.
    please suggest some code using internal table events at new , at end etc. as im not using alv. your help will be rewarded
    regards,
    ravi.
    -Profitcenter-companycodeglaccount-amount---
    -pfcenter1----
    glaccount1-1000---
    glaccount2-2000---
    4444-total--3000---
    glaccount1-4000---
    glaccount2-1000---
    3333-total--5000---
    -profitcentre1*total8000---
    profitcentre2.........

    Hi.
    TYPES: BEGIN OF G_I_DATA,
             PROFIT(4)   TYPE C,
             COMPANY(4)  TYPE C,
             ACCOUNT(10) TYPE C,
             AMOUNT      TYPE P,
           END OF G_I_DATA.
    DATA: G_IT_DATA TYPE TABLE OF G_I_DATA,
          G_WA_DATA TYPE G_I_DATA.
    DATA: G_SUM_COMPANY  TYPE P,
          G_SUM_PROFIT   TYPE P,
          G_AMOUNT       TYPE P.
      G_WA_DATA-PROFIT = '0001'.
      G_WA_DATA-COMPANY = '1111'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
      G_WA_DATA-AMOUNT = 2000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0001'.
      G_WA_DATA-COMPANY = '1111'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
      G_WA_DATA-AMOUNT = 3000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0001'.
      G_WA_DATA-COMPANY = '2222'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
      G_WA_DATA-AMOUNT = 4000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0001'.
      G_WA_DATA-COMPANY = '2222'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
      G_WA_DATA-AMOUNT = 5000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0002'.
      G_WA_DATA-COMPANY = '1111'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
      G_WA_DATA-AMOUNT = 2000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0002'.
      G_WA_DATA-COMPANY = '1111'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
      G_WA_DATA-AMOUNT = 3000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0002'.
      G_WA_DATA-COMPANY = '2222'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT1'.
      G_WA_DATA-AMOUNT = 4000.
      APPEND G_WA_DATA TO G_IT_DATA.
      G_WA_DATA-PROFIT = '0002'.
      G_WA_DATA-COMPANY = '2222'.
      G_WA_DATA-ACCOUNT = 'ACCOUNT2'.
      G_WA_DATA-AMOUNT = 5000.
      APPEND G_WA_DATA TO G_IT_DATA.
      SORT G_IT_DATA BY PROFIT COMPANY ACCOUNT.
      WRITE: /6 'ProfitCenter', 20 'CompanyCode',
              34 'Glaccount', 48 'Amount'.
      WRITE: /6 SY-ULINE(50).
      LOOP AT G_IT_DATA INTO G_WA_DATA.
        AT NEW PROFIT.
          WRITE: /6 G_WA_DATA-PROFIT.
        ENDAT.
        G_AMOUNT = G_WA_DATA-AMOUNT.
        AT NEW ACCOUNT.
          WRITE: /34 G_WA_DATA-ACCOUNT,
                 48  G_AMOUNT.
        ENDAT.
        G_SUM_PROFIT = G_SUM_PROFIT + G_WA_DATA-AMOUNT.
        G_SUM_COMPANY = G_SUM_COMPANY + G_WA_DATA-AMOUNT.
        AT END OF COMPANY.
          WRITE: /20 G_WA_DATA-COMPANY,
                  34 'Totle',
                  48 G_SUM_COMPANY.
          CLEAR G_SUM_COMPANY.
          WRITE: /6 '*******'.
        ENDAT.
        AT END OF PROFIT.
          WRITE: /6 G_WA_DATA-PROFIT,
                  20 'Totle',
                  48 G_SUM_PROFIT.
          CLEAR G_SUM_PROFIT.
          WRITE: /6 '*************************************'.
        ENDAT.
      ENDLOOP.

  • How to populate dynamic internal table fields with data??

    Hi Folks,
    How to assign a particular internal table field to a dynamically assigned internal table?
    I have an excel sheet, and i upload the excel sheet data into an internal IT_EXLOAD table using FM ALSM_EXCEL_TO_INTERNAL_TABLE
    Now i created a dynamic internal table which has the same column as in my DB table.
    I have to fill the dynamically created Internal table with the IT_EXLOAD data dynamically.
    Suppose in future if i add some field in DB table and for that field if i add some column in excel sheet there is no need to change in the program.
    Looking for reply...
    Best Regards,
    Sayak

    hi,
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_path
                i_begin_col             = '1'
                i_begin_row             = '2'
                i_end_col               = '2'
                i_end_row               = '1000'
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
    *declare intern_tmp as internal table tb_data in wich you want the data
    *and declare a field symbol <fs_123>
    LOOP AT intern.
        ASSIGN COMPONENT intern-col OF STRUCTURE
        intern_tmp TO <fs_123>.
        IF NOT <fs_123> IS ASSIGNED.
          CLEAR intern.
          CLEAR intern_tmp.
          CONTINUE.
        ENDIF.
        <fs_123> = intern-value.
        AT END OF row.
          CLEAR tb_data.
          MOVE-CORRESPONDING: intern_tmp TO tb_data.
          APPEND tb_data.
          CLEAR intern_tmp.
        ENDAT.
        CLEAR intern.
      ENDLOOP.
    **paste this code and you can see the data in ur tables dynamically.
    Thanks
    Nitin Sachdeva

  • Is there any other option for using internal table in badi

    hi
    i know we cannot use internal table in badi
    but is der any other option
    plz write in d codez too
    with Regards
    Rohan Shetty
    Edited by: Rohan Shetty on May 6, 2008 2:14 PM

    of course you can use internal table in BAdi, do like this.
    data: itab type table of ....
    data: wa type ...
    Example:
    data: itab type (standard, sorted, hashed) table of mara.
    data: wa type mara.
    Or create your own type within the badi.
    types: begin of ty_xxx,
                fielda  type c,
                fieldb  type n,
                fieldc  type d.
    types: end   of ty_xxx
    data: itab type table of ty_xxx.
    data: wa type ty_xxx.
    Edited by: Micky Oestreich on May 6, 2008 2:16 PM

  • Accessing Dynamic Internal table fields

    Hello All,
    I have one internal table ep_tabx having 138 columns whose data is getting displayed
    by using function module reuse_alv_grid_display.
    Now my query is, i have created one custom button on the appl toolbar to download ep_tabx data.
    IF the user changes the the layout of the output at runtime and then presses that custom button
    then i have created one dynamic internal table using call method cl_alv_table_create=>create_dynamic_table suppose <dyn_table> whose struc will be that of
    dynamic fieldcatalog returned by using FM REUSE_ALV_GRID_LAYOUT_INFO_GET.
    And then I have put a loop on the int table ep_tabx and move corresponding to the int table
    <dyn_table>. But when i download the <dyn_table> data through GUI_DOWNLOAD the
    date fields data is not getting downloaded correctly. I have 4 date fields in my ep_tabx.
    In the alv grid output the date is getting displayed like 08/30/2004(ie mon/date/yr) but in download
    file it comes like 20040830(ie yr/mon/date and that too without /).How to access the dynamic
    internal tables fields separately so asto convert them in the pgm before the download.
    Kindly Help.
    Thanks in advance.
    Mansi

    Hi,
    Search in SDN you would get loads of info on accessing dynamic itab's .
    in order to convert your date format use WRITE stmt to convert the value in your itab before passing it to download FM.
    Regards,
    Raghavendra

  • Selecting records from DB table with out using internal tables

    hi,
    i need to retrieve values from a database table based on few fields and date as well. however, i need to check whether the date is less or equal to the current date and along with that i should get the appropriate record. how can i do that with out using internal table.
    field1-----date---
    11111----
    20070219
    11111--20070214 <---
    11111----
    20070205
    in the above scenario i should get the second record
    Regards,
    Kranthi.

    Try:
    REPORT ztest MESSAGE-ID 00.
    TABLES bkpf.
    SELECT * FROM bkpf
      UP TO 1 ROWS
      WHERE budat <= sy-datum
      ORDER BY budat DESCENDING.
    ENDSELECT.
    Rob

  • SAP Query using internal table because of multiple records in KONV

    Hi
    Im using abap code to write to an internal table, how do you get the internal table fields to show in query report.
    Reason I have added abap code is I have a query for purchase order tables EKKO and EKPO. I would like to show any conditions attached to these purchase orders using EKKO-KNUMV = to KONV-KNUMV.
    Prolem is KONV can have multiple records. So added code to write records from KONV to a internal table. Problem is how do I get the internal table files to show in query report. Have added fields as additional fields and included them in the field group.   
    In info sturcture I have defined internal table in code 'DATA'  included  the select in 'Record procesing'
    Any help will be appreciated. Thanks

    Yes, and the problem is that sometimes that item has two of the same conditions.  One that SAP enters automatically and one that the end  user enters.  I want to understand how this is happening so that I can fix it.

  • How to check two internal table fields

    Hi all,
    I need to check two internal table fields are equal or not means which statement i can use.
    Not internal table ,table contents i need to check i.e
    it1-pernr = it2-pernr.
    like this
    if i put loop it'll check one table field for one loop.
    if i put two loop means some fields reflecting 2 in it1 then it'll pring 4 times like that.i want to print whatever in internal table only .
    pernr(0001) two times there in it1 means
    it1-pernr = it2-pernr then
    it's printing
    0001
    0001
    0001
    0001
    like this but actually in it1 only two records.
    Anybody know solution.tell me.
    Thanks
    Regards,
    Nandha

    Hi,
    code for your view
    data : begin of it1 occurs 0,
           z_pernr like pa9012-pernr,
           z_fac_c like pa9012-zz_fac_c,
           end of it1.
    data : it2 like Zsc1 occurs 0 with header line,
    It1 data
    pernr   FAC C
    0001   5555
    0001   5555
    0002   4444
    0003   3333
    0006   8888
    It2 data
    pernr   FAC C
    0001   5555
    0001   5555
    0005   6666
    0003   3333
    output(My code)
    loop at it2 .
    loop at it1 where pernr = it2-pernr.
      write:/01 it1-1pernr,
            10 it1-z_fac_c.
    endloop.
    endloop.
    out put i need.
    0001   5555
    0001   5555
    0002   4444
    0003   3333
    Thanks,
    Nandha

  • Internal Table field description.

    Hi everybody, I need in runtime the datails of a internal table field, for example the description of the field's data type. Do you know how can I get that information? Thanks and Regards.

    Use RTTI .
    [http://www.liveabap.com/index.php?abapid=11|http://www.liveabap.com/index.php?abapid=11]

Maybe you are looking for

  • My ipod wont let me in  some of my apps

    my 4th gen ipod touch keeps taking me out of my apps and reloading my ipod only helps for a little can someone help me

  • Has anyone tried to actually get a hold of apple support and had them reply

    Have been attempting to get apple support for over one hour - continue you to receive notice that I will have assistance in two minutes Nothing happens I wish to link my phone with my car - having difficult time of it

  • Payment method decliened

    Hello all i use iphone 4s Recently my debit card(visa) was expired and i got new card from the bank and now when i am updating it in my phone i get error like mentioned in the subject i tried to change the card but still same problem i would be very

  • Check statistics in Infocube

    Hi all, When i go to Right click --> Manage button and then Performance tab of any infocube i get 3 areas for concern. Check index which is Green for my infocubes. Check aggr index is also Green for my infocubes. Check Statistics --> This is where i

  • Win7. Odd opening of pdf files found on links

    I use Acrobat 8 Pro. If  I do a Google search and find a link that has a pdf as part of it, clicking on the link brings up Acrobat Pro, which  produces a message that it cannot use the Reader in my browser, FireFox. When I  close Pro, the pdf appears