Simple command to refresh data of all declared internal tables & variables!

Hi All,
I have declared many internal tables & variables in my program in declaration include.
Is there any Simple command which can refresh data of all declared internal tables & variables!
Instead of clearing & refreshing each i.table & variable i want to use single command to refresh data.
Is this possible!
Thanks in advance.
Thanks,
Deep.

CLEAR: lv_field1,
             lv_field2,
             lt_itab1[],
             lt_itab2[].
ONE simple command (CLEAR), can initialize fields, workareas, field-symbols,.... and internal tables.

Similar Messages

  • Moving  data in all the internal tables to the final table  t_data

    hi all,
    how to data in all the internal tables to the final table  t_data
    *selecting fields from bkpf table
      SELECT     bukrs
                 belnr
                 gjahr
                 bldat
                 xblnr
                 usnam
         FROM    bkpf
         INTO TABLE t_bkpf
        WHERE  bukrs  EQ po_bukrs AND
               belnr IN  so_belnr  AND
               budat IN  so_budat  AND
               blart IN  so_blart.
      IF t_bkpf[] IS INITIAL.
        MESSAGE a999(zfi_ap_gl) WITH text-011.
        STOP.
      ELSE.
    *selecting fields from  bseg table.
        SELECT  bukrs
                belnr
                gjahr
                koart
                shkzg
                dmbtr
                zuonr
                sgtxt
                kostl
                hkont
                lifnr
                prctr
                FROM bseg
                INTO  TABLE  t_bseg
                FOR ALL ENTRIES IN t_bkpf
              WHERE bukrs EQ  t_bkpf-bukrs AND
                    belnr EQ t_bkpf-belnr AND
                    gjahr EQ t_bkpf-gjahr AND
                    lifnr IN so_lifnr.
      ENDIF.
      IF t_bseg[] IS INITIAL.
        MESSAGE a999(zfi_ap_gl) WITH text-011.
        STOP.
      ELSE.
    *selecting the companies address from adrc table
        SELECT  SINGLE addrnumber street str_suppl2 city1
                       region post_code1
                       FROM adrc
                       INTO wa_adrc
                       WHERE addrnumber EQ w_adrnr.
    *selecting adrnr from the lfa1 table
        SELECT lifnr adrnr name1 ort01 regio pstlz
                     FROM lfa1
                     INTO TABLE t_adrnr
                     FOR ALL ENTRIES IN t_bseg
                     WHERE  lifnr EQ t_bseg-lifnr.
        IF NOT t_adrnr[] IS INITIAL.
    *populating the t_vaddress table.
          SELECT  addrnumber
                  street
                  str_suppl2
                  FROM adrc
                  INTO TABLE t_vaddress
                  FOR ALL ENTRIES IN t_adrnr
                  WHERE addrnumber  EQ t_adrnr-adrnr.
    *populating the t_vendor table with the vendor address
          SELECT lifnr
                 adrnp_2
                 namev
                 name1
                 INTO TABLE t_vendor
                 FROM knvk
                 FOR ALL ENTRIES IN t_adrnr
                 WHERE  lifnr EQ t_adrnr-lifnr AND
                        adrnp_2 EQ t_adrnr-adrnr.
        ENDIF.
      ENDIF.

    Loop the internal table which is having the maximum number of records,then use read table....for other internal tables....in that loop and then append them into final internal table.
    Ex-LOOP AT IT_VBRP INTO WA_VBRP.
        WA_FINAL-WERKS = WA_VBRP-WERKS_I.
        WA_FINAL-KUNAG = WA_VBRP-KUNAG.
        WA_FINAL-AEDAT = WA_VBRP-AEDAT.
        READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_VBRP-KNUMV
                                                 KPOSN = WA_VBRP-POSNR_I.
        IF SY-SUBRC EQ 0.
          WA_FINAL-KSCHL = WA_KONV-KSCHL.
          CLEAR WA_KONV.
        ENDIF.
        READ TABLE IT_KNA1 INTO WA_KNA1  WITH KEY KUNNR = WA_VBRP-KUNAG.
        IF SY-SUBRC EQ 0.
          WA_FINAL-NAME1 = WA_KNA1-NAME1.
          CLEAR WA_KNA1.
        ENDIF.
        ENDIF.
        APPEND WA_FINAL TO IT_FINAL.
        CLEAR: WA_FINAL,WA_KONV,wa_kna1.
      ENDLOOP.

  • BEx not refreshing data on all embedded queries:One variable, one variant:

    Good day
    I have the following challenge. I have created a BEx workbook and inserted one query multiple times into this workbook. I have removed the result area of each query to a separate sheet to enable the use of different filter values and to use some excel formatting to change fonts, colours etc.
    I have created a ocalday variable selection to this query. The data must be displayed for the last day of each month for a period of 12 months from a certain ocalday. I created and saved a variant for this, adding the last ocalday of each month from 2009/05/31 to 2010/04/30 in the selection option of the variable, thus it looks like this in the variable selection of single values:
    2009/05/31
    2009/06/30
    2009/07/31
    Etc
    Etc
    I have ticked the option u201Crefresh queries when opening workbooku201D in the properties of the query and applied it to all. When the user opens the workbook, the users must select the variant on the variable selection screen and refresh all the queries.
    Now, my challenge comes in where only one query is refreshed with the required dates. All the other results cannot be found and it displays the last date in the variant (ie. 2009/04/30). You need to go and refresh each query separately, using the same variant. This is time consuming as some workbooks have > 50 queries.
    Thus, one query embedded multiple times, one variable, one variantu2026u2026
    Why does the variant not apply to all the embedded queries when data is refreshed?
    Your expert assistance will be appreciated.
    Have a nice day
    Cj

    Hi,
    When you have multiple queries in the workbook which have variables with that,refreshing the workbook,will prompt you the variable screen where you can enter the variables which can take effect in all the queries.
    Go to Workbook Settings->General tab->Check Refresh workbook on Open->Go to Variables tab->Check Process Varaibles on Refresh and Display Duplicate Variables Only Once.Save and reopen the workbook.
    Now it will prompt for variable screen where you ca enter the variable values which is common for all the queries.
    The data will be shown in all the ANalysis items based on the variables entered for the queries.
    Rgds,
    Murali
    Edited by: MuraliKrishnan E on Sep 10, 2009 2:21 PM

  • How to select data from all HR Master Tables(PA0000 to PA****)

    Hi Gurus!
    My requirement is to pick the changedon(AEDTM) , changedby(UNAME) and reason for change(PREAS)  from all tables (pa0000 to pa****)of HR  in which he made any change during a specific date.
    Now if it is specific for two or three tables then inner join can solve it. but now it is the matter of picking data from maximum 9999 tables for which inner join will not be accurate.
    plz suggest me any appropriate way to solve it out. or there is any table which store  the changes in All HR Master Tables.
    Thanking in Advance.
    Tahir Naqqash

    Hi,
    it is very tidious to get it in one go, as u know hr tables contains huge data.
    You can chack my wiki in https://wiki.sdn.sap.com/wiki/x/XYC0Aw .
    Here you need to make the following modification.
    1. in the selection screen set on date range with select option.
    2. in the select query, change select * by ur specified fields.
    3. change dynamic internal table and ALV as per ur required fields
    In this way you have to put the table name and the date range and will get the data.
    for repeation u can call the same job in background again and again store data in a seperate internal table and display finaly ..... but huge chance of getting 'Time Out ' error in that case for comparetively large day gap.
    Regards,
    Anirban

  • How to fetch the data from query to internal table ?

    Dear all ,
             I would like to fetch the query data(sq01) into my internal table ? is it possible to do that ?
    Best Regards,
    Carlos

    Hi
    Try this <b>RRW3_GET_QUERY_VIEW_DATA</b>
    Also, you can have a look at this...
    <a href="/people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii Query results into Internal table</a>
    Regards
    Raj

  • How to transfer data from a dynamic internal table

    Hi All
    I want to transfer data from a dynamic internal table<dyn_table>
    to a non dynamic internal table itab which should have the same structure as <dyn_table>.
    How can this be done?
    Regards,
    Harshit Rungta

    As stated earlier this can be done only through field symbols...
    You cannot create an non dynamic internal table with ANY structure...using DATA statement
    If the strucutre is defined well and good...you can create an non-dynamic internal table...
    If you do not know the structure then the internal table has to be dynamic...and to be generated using field symbols
    DATA: lv_ref TYPE REF TO data.
    FIELD-SYMBOLS: <fs_dyn_table> TYPE STANDARD TABLE.
    * You create a dynamic internal table...
    CREATE DATA lv_ref LIKE (your_dynamic_internal_table).
    ASSIGN lv_ref->* TO <fs_dyn_table>.
    Now...do the transfer.
    <fs_dyn_table> = "your_dynamic_internal_Table
    Hope it helps!

  • Query in SQL 2008R2 error Msg 1087, Level 15, State 2, Line 31 Must declare the table variable

    Hello Experts, 
    Can You help me; I get the follwing error in my query
    Msg 1087, Level 15, State 2, Line 31
    Must declare the table variable "@ASE_SUBART_GROEP".
    the @ASE_SUBART_GROEP is a self-defined table in this SQL environment.
    Maybe you know the error or the missing part
    Thanks in advance, Jos Dielemans

    I'm not familiar with SAP Business One unfortunately, so can only be of limited help here. But I'm going to guess that @ASE_SUBART_GROEP is a table variable passed to a stored procedure and is defined and passed down by the application, so you won't
    be able to copy-paste this code directly into management studio and get it to work.
    You could remove the join to return *all* records. Although the dataset might be very big
    SELECT T0.CardCode AS 'Klantnr'
    ,T0.CardName AS 'Klantnaam'
    ,T4.GroupName AS 'Klantgroep'
    ,T9.Descr AS 'Merknaam'
    ,T5.SlpName AS 'Verkoper'
    ,T3.MailCity AS 'Leverplaats'
    ,T7.NAME AS 'Leverland'
    ,T3.City AS 'Factuurplaats'
    ,T7.NAME AS 'Factuurland'
    ,T0.DocNum AS 'Documentnr'
    ,T0.DocDate AS 'Datum'
    ,Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) AS 'Jaar'
    ,RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2) AS 'Maand'
    ,(Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) + '-' + RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2)) AS 'Periode'
    ,T1.ItemCode AS 'Artikelnr'
    ,T2.ItemName AS 'Artikelnaam'
    ,T1.Quantity AS 'Aantal VEH'
    ,T2.SVolume AS 'Aantal EH per VEH'
    ,(T1.Quantity * T2.SVolume) AS 'Aantal EH'
    ,T8.UnitName AS 'EH-Naam'
    ,T6.ItmsGrpNam AS 'Artikelgroep'
    ,T2.U_ItemGrp AS 'Hoofdgroep'
    ,T10.NAME AS 'Subgroep'
    ,T1.CogsAcct AS 'Kostpr.rek.'
    ,T1.AcctCode AS 'Opbrengstrek.'
    ,T1.LineTotal AS 'BrutoOmzet'
    ,T0.DiscPrcnt AS 'Korting'
    ,(+ T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'NettoOmzet'
    FROM dbo.OINV T0
    INNER JOIN dbo.INV1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode
    INNER JOIN OCRG T4 ON T3.GroupCode = T4.Groupcode
    INNER JOIN OSLP T5 ON T3.SlpCode = T5.SlpCode
    INNER JOIN OITB T6 ON T2.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OCRY T7 ON T3.Country = T7.Code
    LEFT OUTER JOIN OLGT T8 ON T2.SVolUnit = T8.UnitCode
    LEFT OUTER JOIN UFD1 T9 ON T3.U_ZPgroep = T9.FldValue
    AND TableID = 'OCRD'
    AND FieldID = 2
    --LEFT OUTER JOIN @ASE_SUBART_GROEP T10 ON T2.U_ASE_SUB_ARTGROEP = T10.Code
    WHERE T0.DocDate >= '20120101'
    AND T0.Canceled = 'N'
    UNION ALL
    SELECT T0.CardCode AS 'Klantnr'
    ,T0.CardName AS 'Klantnaam'
    ,T4.GroupName AS 'Klantgroep'
    ,T9.Descr AS 'Merknaam'
    ,T5.SlpName AS 'Verkoper'
    ,T3.MailCity AS 'Leverplaats'
    ,T7.NAME AS 'Leverland'
    ,T3.City AS 'Factuurplaats'
    ,T7.NAME AS 'Factuurland'
    ,T0.DocNum AS 'Documentnr'
    ,T0.DocDate AS 'Datum'
    ,Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) AS 'Jaar'
    ,RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2) AS 'Maand'
    ,(Cast((Datepart(Year, T0.DocDate)) AS VARCHAR) + '-' + RIGHT('00' + CAST(DATEPART(MONTH, T0.DocDate) AS VARCHAR(2)), 2)) AS 'Periode'
    ,T1.ItemCode AS 'Artikelnr'
    ,T2.ItemName AS 'Artikelnaam'
    ,- T1.Quantity AS 'Aantal VEH'
    ,T2.SVolume AS 'Aantal EH per VEH'
    ,(- T1.Quantity * T2.SVolume) AS 'aantal EH'
    ,T8.UnitName AS 'EH-Naam'
    ,T6.ItmsGrpNam AS 'Artikelgroep'
    ,T2.U_ItemGrp AS 'Hoofdgroep'
    ,T10.NAME AS 'Subgroep'
    ,T1.CogsAcct AS 'Kostpr.rek.'
    ,T1.AcctCode AS 'Opbrengstrek.'
    ,- T1.LineTotal AS 'BrutoOmzet'
    ,T0.DiscPrcnt AS 'Korting'
    ,(+ T1.LineTotal * (100 - T0.DiscPrcnt) / 100) AS 'NettoOmzet'
    FROM dbo.ORIN T0
    INNER JOIN dbo.RIN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OCRD T3 ON T0.CardCode = T3.CardCode
    INNER JOIN OCRG T4 ON T3.GroupCode = T4.Groupcode
    INNER JOIN OSLP T5 ON T3.SlpCode = T5.SlpCode
    INNER JOIN OITB T6 ON T2.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OCRY T7 ON T3.Country = T7.Code
    LEFT OUTER JOIN OLGT T8 ON T2.SVolUnit = T8.UnitCode
    LEFT OUTER JOIN UFD1 T9 ON T3.U_ZPgroep = T9.FldValue
    AND TableID = 'OCRD'
    AND FieldID = 2
    --LEFT OUTER JOIN @ASE_SUBART_GROEP T10 ON T2.U_ASE_SUB_ARTGROEP = T10.Code
    WHERE T0.DocDate >= '20120101'
    AND T0.Canceled = 'N'
    ORDER BY T0.CardCode
    The join to the table variable has been commented out above, so the code should run. After that you might want to update the WHERE clause to include only particular sub-groups

  • Declaring internal tables

    why do we declare internal tables in this way
    TYPES: BEGIN OF ty_t501t,
           END OF ty_t501t.
    DATA: gt_list1 TYPE STANDARD TABLE OF ty_list1,
    why not this
    DATA: BEGIN OF ITAB OCCURS 0,
          END OF ITAB.

    Hi,
    Declaring internal table with a header line decreases performance.
    Its better to have internal table without header line and a work area to work with it.
    Its improves performance.
    Also wen u work with internal table with header line it creates confusion that whether ur working with the header line or body of the internal table.
    Also declaring internal table with header line is obsolete one.
    LOOP AT ITAB----
    >Working with header line.(Confusion whether ur referring header or body of internal table)
    LOOP AT ITAB INTO WA------>Working with internal table widout header line and an work area
    Regards,
    Lakshman.
    Edited by: Lakshman N on Aug 14, 2009 7:25 AM

  • Upload data from Excel to Internal table in ECC

    Hello SDN,
    Here I am facing a problem for uploading the data from excel sheet to internal table in ECC6.0
    Main problem is we don't have any FM ALSM_EXCEL_TO_INTERNAL_TABLE.
    Please provide me the solution how to upload the data from excel to internal table through class. If possible please provide me the sample code so that it will be very helpful for me.
    Waitingfor your valuable response.
    Thanks & Regards,
    Kumar.

    Hi,
    you can use OLE to acces (not only) excel, but this will only work in dialog processing.
    regards,
    Hans

  • To upload data from excel to internal table

    hi
    in excel sheet it contains 4 tabs.to upload data from excel to internal table i have used this fm
    text_convert_xls_to_sap .but error wil comeing.that error in tables parameter.iternal table does not contain data.ple help me.(v 6.0) ple give me one example with coding

    Hello,
    Take a look on this: [ABAP - Upload data from Excel to Sap using OO|https://wiki.sdn.sap.com/wiki/x/xOw].
    Regards.

  • Reading data from XML to Internal table

    Hi Experts,
    I got a requirement to read the data fom xml to internal table.is it possible to store deep internel table data into flat internal tables?my internel table contains 4 internel table and these 4 internel table contains 2 internel tables each...can any one help me o this...
    points will be rewarded...
    Regards,
    Rakhi

    Hi Rakhi,
    * Structure to Get the Client Details as in XML format
      DATA: BEGIN OF client,
              BEGIN OF Personal_Details,
                kunnr like kna1-kunnr,
                name1 like kna1-name1,
                adrnr like kna1-adrnr,
              END OF Personal_Details,
              BEGIN OF Address,
                street like adrc-street,
                city1  like adrc-city1,
              END OF Address,
              BEGIN OF Communication,
                fax_number like adrc-fax_number,
                tel_number like adrc-tel_number,
              END OF Communication,
            END OF client.
      DATA: it_client TYPE TABLE OF client WITH HEADER LINES,
            result LIKE client.
      DATA: xml_string TYPE string.
    *  Get the Client Details into the structure to be made as an XML string
      TRY.
    *  Convert the Structure to XML string
          CALL TRANSFORMATION  ('ID')
            SOURCE para = it_client
            RESULT XML xml_string.
    *  Convert the XML string to structure - result
          CALL TRANSFORMATION  ('ID')
            SOURCE XML xml_string
            RESULT para = result.
      CATCH cx_st_error.
      ENDTRY.
    best regards,
    Thangesh

  • Diference between DATA: and TYPES: on internal tables

    Hi people,
    Can somebody help me. I wanna know whats the diference between DATA: and TYPES: on internal tables
    and whitch has the best performance, here is a eg:
    DATA: BEGIN OF ti_sbook occurs 0,
              carrid   LIKE sbook-carrid,
              fldate   LIKE sbook-fldate,
              customid LIKE sbook-customid,
              loccuram LIKE sbook-loccuram,
           END OF ti_sbook.
    AND
    TYPES: BEGIN OF ti_sbook ,
              carrid   LIKE sbook-carrid,
              fldate   LIKE sbook-fldate,
              customid LIKE sbook-customid,
              loccuram LIKE sbook-loccuram,
           END OF ti_sbook.
    DATA: gw_sbook       TYPE  TABLE OF ti_sbook,
    gs_sbook       TYPE ti_sbook.
    witch of both types is better?
    thanks.

    Hi Marcelo,
    For compatibility matters is better to create internal tables with a work area separately. So yes it's better to use types. When you work with Object Oriented coding you will need to use internal tables defined with types. Also when defining tables with types is the new way of coding, the another coding is getting obsolete defined by SAP. That's why when working in ABAP with OO (Object Oriented) code you'll have to define tables with types and not the other way.
    Hope it helps.
    Regards,
    Gilberto Li

  • Is it possible to view all open internal tables in the 4.7 debugger?

    Hello,
    Is it possible to view all open internal tables in the 4.7 debugger?
    Thx.
    Andy

    As far as i know in 4,7 there is no new debugger. But it is the new debugger which brings the functionality so i fear you go no chance.
    And for the rest who is still struggling on what OP meant: He meant the tab "globals" on the variables tab of the new debugger.

  • HR abap :  how to declare internal table to fetch data from 0585 infotype

    Hi all ,
    I am able to fetch the data from pa0585 infotype for set of employee no , but the problem is as the fields in pa0585 (like Contr to ULIP , NSC , Medical Treatment,Contribution to Certain Pension Funds so on ..) will be changed dynamically and will be displayed based on the amount value in descending order iam not able to store the values of the fileds into internal table . I dont understand how to declare the internal table ..Please help in if u have solved this kind of problem.
    I shld get the output in this way ...
    Emp No     Name    Medical treatment       Contr to ULIP             ....... so on
    101          abc           10000                        150000                      .......so on
    102          xyz           12000                        150000                      .......so on
    My header shld be fixed and I shld display values in this way .... I can use write statement to display directly .
    Thanks ....

    Hi
    Decalre INFOTYPE
    Goto SE37 - Find FM -
    READINFOTYPE*

  • Declare Internal Table in Code or in Data Dictionary...Opinions needed?

    Is it better to define your internal table and all of its fields in a begin of/end of declaration stmt in your code's data definitions. Or, is it better to create a structure in the Data Dictionary, which means one line of code in your program? Why does one choose the method they prefer?
    I am thinking it is best to declare in Data Dictionary, especially since ABAP is now leaning towrds objects. However, I am seeing a lot of field by field definitions in programs. I am very interested in how most programmers accomplish this and why.    
                     Thank-You

    I would say that if the internal table is to be used in more than one program, then I would create a structure and/or table type in the ABAP dictionary.  If it is to be used in just one program, then I would define it locally.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Using Olive software in iWeb

    Has anyone ever created an iWeb site and used Olive Software to show a catalog or book? Just wondering if it will work. http://www.olivesoftware.com thanks

  • Downloading video from iPhoto to gmail

    I am trying to download a 1min video from iPhoto to gmail but am unable to b/c the file is too large. Is there an application that I can download to make this possible that possibly works like the iPhoto to gmail / facebook applications that I have a

  • This job fail

    Hi , I have scheduled a job and it failed with these errors : Error running job 62: ORA-12011: execution of 1 jobs failed ORA-06512: at "SYS.DBMS_IJOB", line 406 ORA-06512: at "SYS.DBMS_JOB", line 272 ORA-06512: at line 1 what i dun understand is tha

  • Tiger to SL

    I just purchased an iPad and it requires 10.5.8 or later to sync with iTunes. I have been happy with Tiger but now need to upgrade to SL. Anyone have recent experience doing this? I would like to do an upgrade install rather than wipe the drive and i

  • Complete file path

    I am trying to get a file to open, but it doesn't pass the complete path to the file. Does any one know how to get the complete path? I am using Windows 2000. else if (evt.getSource() == openButton)      {int returnVal = fc.showOpenDialog(this);