How to create a temp table in the memory, not in disk?

in sql server, you can create a temp table in the memory instead of disk,
then you can do the insert, delete,update and select on it.
after finishing, just release it.
in Oracle,
I am wonderfing how to create a temp table in the memory, not in disk?
thanks,

Thanks for rectifying me Howard.
I just read your full article on this too and its very well explained here:
http://www.dizwell.com/prod/node/357
Few lines from your article
It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
Thanks and Regards

Similar Messages

  • HOW TO create a temp table or a record group at run time

    i have a a tabular form and i dont want to allow the user entering duplicate
    records while he is in insert mode and the inserted records are new and not exsisting in the database.
    so i want to know how to create a temp table or a record group at run time to hold the inserted valuse and compare if they are exsiting in previous rows or no.
    please help!

    As was stated above, there are better ways to do it. But if you still wish to create a temporary block to hold the inserted records, then you can do this:
    Create a non-database block with items that have the same data types as the database table. When the user creates a new record, insert the record in the non-database block. Then, before the commit, compare the records in the non-database block with those in the database block, one at a time, item by item. If the record is not a duplicate, copy the record to the database block. Commit the records, and delete the records in the non-database block.

  • How to create a dynamic table were the JTable columns keep varying

    How to create a dynamic table were the JTable columns keep varying based on the input to the jtable

    Oooh, I lied. DefaultTableModel has an API for adding and
    removing columns. I didn't know that. You should have read
    the API.
    As for preferring to extend AbstractTableModel rather than
    DefaultTableModel, I think it's more correct. DefaultTableModel
    is a simple implementation of Abstract for basic cases. It isn't
    intended to be extended. I figure most people extending
    DefaultTableModel are also extending JFrame, JPanel, and Thread
    instead of encapsulating the first two and implementing
    Runnable for the third.

  • How to create a partition table on the basis of substring of column val

    Hi All,
    I have table
    Create table Mytable
    ( Col1 number,
    Col2 number,
    Col3 varchar2(20)
    insert into mytable values(11,2,'20110901');
    insert into mytable values(12,2,'20110902');
    insert into mytable values(13,2,'20110903');
    insert into mytable values(14,2,'20110904');
    insert into mytable values(15,2,'20110905');
    insert into mytable values(16,2,'20110906');
    Col3 data have the date value in the form of yyyymmdd format.
    I want to create a 30 partitions on the basis of day on col3.
    how can i achive this. i tried range partition but how can i get day of col3?
    any help appriciated.
    Edited by: P:) on Sep 28, 2011 5:56 PM

    Hi,
    the first point would be to use the correct data type for col3 and make it a date. Then I can see no reason why you couldn't range partition based on the date.
    Andre

  • How to create a custom table in the below format

    Dear Friends
              can any one please let me know hot to create a custom table as below
    outpatient
    |employeeno | class | startdate | enddate | spouse |1stchild | 2nchild|  Rate | amount|
    My FO wants to enter in the SM30 as above ......i.e he wants to have spouse ,1st child and 2nd child under one group........so he asking me to make as one group
    and give a heading as outpatient.........similary i have to give for in patient.
    Please could any one tell is it possible.
    regards
    syamala...

    Under the SAP forums section, there is ABAP development and in That there is ABAP General.
    SAP forums > ABAP development > ABAP General.
    Post in that forum.
    Regards
    AK
    Please reward if helpful

  • How to Create a Temporary Table with SQL Server

    I know you can create a temporary table in SQL Server 2000, but not quite sure how to do it in CFMX 7, i.e., does the SQL go inside a <CFQUERY dbtype="query"> tag?
    I'm pulling the main set of records from an Oracle server (1st data source), but it does not contain employee names, only employee IDs.  Since I need to show the employee name along with the Emp ID, I'm then pulling a list of "current" employee names from a SQL Server (2nd data source), which is the main database on our CF server.
    I've got a QofQ that works fine, except it only matches EmpIDs that exist in both result sets.  Employees who are no longer employed, don't match, and don't display.  Since I can't do a LEFT OUTER JOIN with a QofQ, what I need to do is get the records from the Oracle server into the SQL Server.  Preferably in a temporary table.
    I was hoping if I could get those Oracle records written to a temp table on the main SQL Server, in same database as the Employee Name table, I could then write a normal <CFQUERY> that uses a LEFT OUTER JOIN.
    I think I could probably write a Stored Procedure that would execute the SQL to create the temporary table, but am trying to avoid having to write the SP, and do it the simplest way.
    This query will be a program that can be run hundreds of times per day, with a form that allows users to select date ranges, locations, and other options.  That starts the queries, which creates the report.  So I just need the temp table to exist only until all the SQL has run, and the <CFOUTPUT> has generated a report.
    If the premise is right, I just need some help with the syntax for creating a SQL Server temp table, when you want to write records to it from an external data source.  I'm trying the following, but getting an error:
    <CFQUERY name="ITE_Temp" datasource="SkynetSQL">
    CREATE TABLE #MyTemp
    (   INSERT INTO #MyTemp
    ITE2.TrueFile char (7) NOT NULL,
    ITE2.CountOfEmployee int NULL,
    ITE2.DTL_SUBTOT decimal NULL,
    ITE2.EMPTYPE char (3) NULL,
    ITE2.ARPT_CD char (3) NULL
    </CFQUERY>
    So I actually created a permanent table on the SQL Server, and wrote the below SQL, which does work, and does write the records to table.  I can then write another CFQUERY with a LEFT OUTER JOIN, and get all the records, including those that don't have matching employee name:
    <CFQUERY datasource="SkynetSQL">
    <CFLOOP index="i" from="1" to = "#ITE2.RecordCount#">
    INSERT INTO ITE_Temp
       (FullFile,
       EmployeeCount,
       DTL_Amount,
       EmployeeType,
       station)
    VALUES  ('#ITE2.TrueFile[i]#',
       #ITE2.CountOfEmployee[i]#,
       #ITE2.DTL_SUBTOT[i]#,
       '#ITE2.EMPTYPE[i]#',
       '#ITE2.ARPT_CD[i]#')
    </CFLOOP>
    </CFQUERY>
    But, I hate to have to create a table and physically write to it.  For one, it seems slower, and doing it in temp would be in memory, and probably much faster, correct?  Is there some way to code the above, so that it does something similar, but in a TEMPORARY TABLE?   If I can figure out how to do this, I can pull data from multiple data sources and servers, and using SQL Server temp tables, work with the data as if it was all on the same SQL Server, and do some cool reports.
    Everything I've done for the past few years, has all been from data from a single source, whether SQL Server, or another server.  Now I need to start writing reports where data can come from 3 or 4 different servers, and be able to do joins (inner and outer).  Thanks for any advice/help.  Much appreciated.
    Gary

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • How to create a cutoms table with a heading

    Dear Freinds,
    I have a requirement where i have to create the Custom as below .........my functional is
    saying that he want table as below
                                              outpatient  
    employeeno
    class
    startdate
    enddate
    spouse
    1stchild
    2nchild
    How can we create like this table having outpatient  as heading
    and a fields  as
    employeeno , class,startdate,enddate,spouse,1stchild,2ndchild
    how can we create in a custom table..... i have never seenlike the above requiremnt.
    Please suggest me how to create. I can send the Excel sheet where they have given the above requiremnt...... plelase any body can suggest me so that i can your personnel id's . Pleast a bit urgent.
    regards
    syamala

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • When analytical queries create implicit temp tables?

    Hi,
    We have a DSS project on Oracle 9i Release 2 running on HP-UX. The project includes lots of SQL Analytical queries which handle huge data set, and makes lots of hash/merge joins and sorts. When I look at execution plans of the queries, I see that some of them create implicit temp tables and execute on it, but some not (creating window(buffer) ). I wonder how the optimizer decides to create implicit temp table when executing analytical queries. And also is three a SQL hint to force to create implicit temp table?
    Regards

    Hi,
    We have a DSS project on Oracle 9i Release 2 running on HP-UX. The project includes lots of SQL Analytical queries which handle huge data set, and makes lots of hash/merge joins and sorts. When I look at execution plans of the queries, I see that some of them create implicit temp tables and execute on it, but some not (creating window(buffer) ). I wonder how the optimizer decides to create implicit temp table when executing analytical queries. And also is three a SQL hint to force to create implicit temp table?
    Regards

  • PL/SQL to create a temp table that will be dropped after session ends

    Is it possible in PL/SQL to create a temp table that will be dropped after the session ends? Please provide example if possible. I can create a global temp table in PL/SQL but I am not sure how (if possible) to have it 'drop' once the session ends.
    DB: 10g
    OS: Wiindoze 2003 Server
    :-)

    As others have mentioned (but probably not clearly explained), Oracle treats temporary tables differently to SQL Server.
    In SQL Server you create a temporary table and it gets dropped (automatically I assume, I dont do SQL Server) after the session finishes. This will obviously allow each session to "request" a temporary table to use, then use it, and not have to worry about cleaning up the database after the session has finished.
    Oracle takes a different approach...
    On the assumption that each session is likely to be creating a temporary table for the same purposes, with the same structure, Oracle let's you create a Global Temporary Table a.k.a. GTT (which you've already come across). You only have to create this table once and you leave it on the database. This then means that any code written to use that table doesn't have to be dynamic code and can be verified and checked at compile time, just like code written for any other table. The difference of a GTT from a regular table is that any data you put into that table can only be seen by that session and will not interfere with any data of other sessions and, when you either commit, or end the session (depending on the "on commit delete rows" or "on commit preserve rows" option used when creating the GTT), that data from your own session will automatically be removed and hence the table is cleaned up that way, whilst the actual table itself remains.
    Some people from SQL Server backgrounds try and create and drop tables dynamically in their PL/SQL code, but this leads to problems...
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    execute immediate 'create table my_temp (x number)';
      3    insert into my_temp values (1);
      4    execute immediate 'drop table my_temp';
      5* end;
    SQL> /
      insert into my_temp values (1);
    ERROR at line 3:
    ORA-06550: line 3, column 15:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 3, column 3:
    PL/SQL: SQL Statement ignoredi.e. the code will not compile for direct DML statements trying to use that table.
    They then try and get around this issue by making their DML statements dynamic too...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure my_proc is
      2  begin
      3    execute immediate 'create table my_temp (x number)';
      4    execute immediate 'insert into my_temp values (''A'')';
      5    execute immediate 'drop table my_temp';
      6* end;
    SQL> /
    Procedure created.... which looks great and it compiles ok... but... when they try and run it...
    SQL> exec my_proc;
    BEGIN my_proc; END;
    ERROR at line 1:
    ORA-01722: invalid number
    ORA-06512: at "SCOTT.MY_PROC", line 4
    ORA-06512: at line 1... oops the code has a bug in it. Our DML statement was invalid.
    This is really something that would have been caught at compile time, if the statement had been a direct DML statement rather than dynamic. And thus we see the problem with people trying to write all their code as dynamic SQL... it's more likely to contain bugs that won't be detected at compile time and only come to light at run time... sometimes only under certain conditions and sometimes once it's got into a production environment. Bad Idea!!!! ;)
    Far better to never create tables (or most other database objects) at run time. Just create them once as part of the database design/implementation and use them as required, allowing you to catch the most common coding errors up front before they get anywhere near a test environment or worse still, a production environment.

  • How to create a generalized version of the detailed polygons?

    How to create a generalized version of the detailed polygons?
    I have a table of detailed polygons (100+ vertices) and I want to get generalized version of these polygons.
    For example, assume I have a polygon with 100 vertices. Distance between vertex n and n+1 is 1.0.
    I want to get geometry (generalized polygon, line or point) where distance between vertex n and n+1 is 10.0 or more (I want vertices to be considered as one vertex if distance between them is less then 10.0).
    Is it possible to create generalized version of polygons on the fly?
    Any help is appreciated.
    Thanks.

    Scenario A:
    If all of your polygons have no interaction among them (No polygon shares any boundary with any other ones).
    In this case you can use the sdo_util.simplify in 10g to reduce the vertices in your polygons which returns new polygon geometries on the fly.
    If you found that simplify is not doing exactly what you want, you can always roll out your own implementation using PL/SQL or the new SDOAPI JGeoemtry class in Java. Both will give you complete access to the coordinate arrays in a polygon and update them back to the database after you have simplified them in your code.
    Scenario B:
    If your polygons share boundaries, then the above methods will not work since the simplification process may not preserve the topology among your polygons. What you can do then is to use the Java topo package to create a new topology by adding all of your polygons to to an empty topology (which you first create in the database and then load into memory using oracle.spatial.topo.TopoMap). Once you have a topology built in the memory, you can use methods such as oracle.spatial.topo.TopoMap.changeEdgeCoords() to simplify the edges of your polygons. You can then recreate the simplified polygons from the topology. This is just a rough guide; for more details you need to check out the java doc for the various packages mentioned above which are shipped with 10g spatial.

  • How to Create Event polling table

    hi,
    1)How to Create Event polling table
    2) wahts RPD stands for.
    3) when we are prefer Dynamic variables.
    thanks.
    raj

    1) http://obiee101.blogspot.com/2008/07/obiee-managing-cache-emptyingpurging.html
    2) Repository Project Design ?
    - More than likely the extension RPD was not used by anything else when Siebel Analytics first started using it, no doubt the 'RP' is repository, so use 'Definition' or 'Design' as you like. Im pretty sure there is nothing in the documentation but i've not checked, maybe you could check and let us know?
    3) Dynamic variables would be something like 'CURRENT_MONTH' where the same query does not need to fire per user (ie SESSION variable) but needs to be periodically refreshed. Another use of you dynamic variable might be 'LAST_ETL_DATE' or somethng similar which might implement with your event polling table. By including the Variable within a Business Model, all cache for the Business Model is purged whenever the Variable's value changes.

  • How to create variant for table/view ?

    Hi,
    When I go through SM30, I find a radio button called variant. I don't know the effect.
    Can anyone tell me how to create variant for table / view ?
    I want to know when we need to create variant for table/view.
    Best regards,
    Chris Gu

    hi ,
    Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
    For further information about selection screens, refer to Selection Screens in the ABAP User's Guide.
    If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant
    Procedure
    To create a new variant:
           1.      On the ABAP Editor initial screen, enter the name of the program for which you want to create a variant, select Variants, and choose Change.
           2.      On the variant maintenance initial screen, enter the name of the variant to be created.
    Note the naming convention for variants (see below).
           3.      Choose Create.
    If the program has more than one selection screen, a dialog box for screen assignment appears. The dialog box does not appear if the program only has one selection screen. The selection screen appears in this case.
           4.      If there is more than one selection screen, select the screens for which you want to create the variant
    5.      Choose Continue.
    The (first) selection screen for the report appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them and to fill the fields with values. If you keep scrolling forwards, the Continue button appears on the last selection screen.
           6.      Enter the desired selection values, including multiple selection and dynamic selection.
           7.      Choose Continue.

  • How 2 create dynamic internal table and can we pass it to gui_download FM

    HI all,
         How can we create a dynamic internal table?
    I have a requirement where  i have to create an internal table with the no. of fields depending on the selection screen values, i think tat can be possible though dynamic creation only.
             How to solve this issue..?Pointers will be very much useful..
    Thanks
    Sunny.

    hi
    Follow the code it will help you out....
    REPORT  YUSMM_TEXT2                             .
    *TABLES
    TABLES: MARA,    " General Material Data
            MAKT,    " Material Descriptions
            T002.    " Language Keys
    * GLOBAL TYPE-POOL
    TYPE-POOLS : SLIS.
    * GLOBAL TYPES
    TYPES: BEGIN OF TP_LANG ,
             SPRAS LIKE T002-SPRAS,
             LAISO LIKE T002-LAISO,
             SRNO(3) TYPE N,
           END OF TP_LANG.
    TYPES: BEGIN OF TP_MATNR,
             MATNR LIKE MARA-MATNR,
             BEGRU LIKE MARA-BEGRU,
           END OF TP_MATNR.
    * DECLARATION FOR GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
    DATA:GT_MAKT    TYPE STANDARD TABLE OF MAKT,  "Materialkurztexte,
         GT_THEAD   TYPE STANDARD TABLE OF THEAD, "SAPscript: Text-Header,
         GT_LINETAB TYPE STANDARD TABLE OF TLINE, "SAPscript: Text-Zeilen,
         GT_T002    TYPE STANDARD TABLE OF T002. "Language key
    DATA: BEGIN OF GV_TEXT_OUTPUT_LINE,
                MATNR LIKE MARA-MATNR,
                BEGRU LIKE MARA-BEGRU,
                MAKTX LIKE MAKT-MAKTX,
                LTXT40(1250) TYPE C,
                SRNO(3) TYPE N,
                SPRAS LIKE T002-SPRAS,
             END OF GV_TEXT_OUTPUT_LINE.
    DATA: GT_MATNR TYPE STANDARD TABLE OF TP_MATNR,
          WA_GT_MATNR TYPE TP_MATNR.
    DATA: GT_LANG TYPE STANDARD TABLE OF TP_LANG,
          WA_GT_LANG TYPE TP_LANG.
    DATA: GT_TEXT_OUTPUT_LINE LIKE STANDARD TABLE OF GV_TEXT_OUTPUT_LINE,
          GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
          GV_FIELDCAT         LIKE LINE OF GT_FIELDCAT,
          CT_GT_FIELDCAT_IN LIKE GV_FIELDCAT,
          GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
          GV_REPID            TYPE SY-REPID.
    DATA: BEGIN OF GV,
            FORMER_ERROR       LIKE  SY-MARKY,     " Fehlermeldung bereits
            FILE_OPEN(1),                          " Flag open file
            REC_LENGTH         TYPE  I,            " record length
            MATNR              TYPE  MARA-MATNR,   " material
            REPID              TYPE  SYST-REPID,
            RETCO              TYPE  SY-SUBRC,
          END OF GV.
    DATA: GV_MAKT             TYPE MAKT,
          GV_T002             TYPE T002,
          GV_LANGU            TYPE THEAD-TDSPRAS.
    * DECLARATION FOR FIELD-SYMBOLS
    FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
                   <FS_DATA1> TYPE REF TO DATA,
                   <FS_2>    TYPE STANDARD TABLE,
                   <FS_22>   TYPE STANDARD TABLE,
                   <FS_1>,
                   <FS_11>,
                   <F>,
                   <FA>,
                   <LWA_LINE_WA>,
                   <LWA_LINE_WA1>.
    DATA: IT_FLDCAT TYPE LVC_T_FCAT.
    DATA: T_FLDCAT1   TYPE SLIS_T_FIELDCAT_ALV.
    DATA: L_LT TYPE SLIS_LAYOUT_ALV.
    DATA: WA_IT_FLDCAT TYPE LVC_S_FCAT.
    DATA: WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA: GP_TABLE TYPE REF TO DATA.
    DATA: WA_NEWLINE TYPE REF TO DATA.
    *DECLARATION FOR CONSTANTS
    CONSTANTS:
       BEGIN OF GC,
         TDID_GRUN     TYPE THEAD-TDID     VALUE 'GRUN',
         TDOBJECT_MAT  TYPE THEAD-TDOBJECT VALUE 'MATERIAL',
         ON(01)        TYPE C              VALUE 'X',
         YES(01)       TYPE C              VALUE 'X',
         TXT(25)       TYPE C              VALUE 'MATERIAL DETAILS',
         MAT(25)       TYPE C              VALUE 'MATERIAL NUMBER',
         AUT(25)       TYPE C              VALUE 'AUTHORIZATION GROUP',
         FOUND         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         RC_OK         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         OFF           TYPE SY-SUBRC       VALUE '00',  " return code
         FALSE         TYPE SY-SUBRC       VALUE '00',  " boolean
         TRUE          TYPE SY-SUBRC       VALUE '01',  " boolean
      END OF GC.
    * DECLARATION FOR VARIABLES
    DATA: V(3) TYPE N,
          STR TYPE STRING,
          STR1 TYPE STRING,
          V_VAR(3) TYPE N,
          V_VAR1(3) TYPE N,
          V_FIELDNAME(15) TYPE C,
          V_CHAR(15) TYPE C,
          V_LINES(3) TYPE N,
          MAKTEXT LIKE MAKT-MAKTX,
          LT_DATA        TYPE   REF TO DATA,
          LT_DATA1        TYPE   REF TO DATA,
          LWA_LINE       TYPE   REF TO  DATA,
          LWA_LINE1 TYPE REF TO DATA.
    *SELECTION-SCREEN AND PARAMETERS
    SELECTION-SCREEN: BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:
    S_MATNR FOR MARA-MATNR,  "MATERIAL NUMBER
    S_MTART FOR MARA-MTART,  "MATERIAL TEXT
    S_LANG FOR MAKT-SPRAS.   "LANGUAGE
    PARAMETER: GP_SIZE TYPE I DEFAULT 200. "DATA LENGTH
    SELECTION-SCREEN: END OF BLOCK A1.
    * AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      IF GP_SIZE < 0.
        MESSAGE E002(00).
      ENDIF.
      IF GP_SIZE > 50000.
        MESSAGE W130(26) WITH TEXT-004.
        SET CURSOR FIELD 'gp_size'.
      ENDIF.
    * INITIALIZATION
    INITIALIZATION.
      GV-REPID = SY-REPID.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM GET_MARA_DATA
                TABLES
                  GT_TEXT_OUTPUT_LINE
                USING
                  S_MATNR[]
                  S_MTART[]
                  GP_SIZE
                CHANGING
                  GV-RETCO
      PERFORM GET_MAT_TEXT
                 TABLES
                   GT_MAKT
                   GT_TEXT_OUTPUT_LINE
                   GT_THEAD
                   GT_LINETAB
                 USING
                   GC
                   GV-RETCO
                 CHANGING
                   GV_TEXT_OUTPUT_LINE
                   GV_MAKT
      PERFORM GET_LANG.
      PERFORM DYNAMIC_TABLES.
      PERFORM POPULATE_FINAL_TABLE.
      PERFORM POPULATE_DYNAMIC_TABLE.
    * END-OF-SELECTION
    END-OF-SELECTION.
      PERFORM DATA_OUTPUT.
    *&      Form  get_mara_data
    *       Materialdaten lesen
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->it_s_matnr  Parameter Materialnummer
    *      -->it_s_mtart  Parameter Materialart
    *      -->if_gp_size  Parameter Anzahl Materialnummern
    FORM GET_MARA_DATA  TABLES   CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                       GV_TEXT_OUTPUT_LINE
                        USING    IT_S_MATNR LIKE S_MATNR[]
                                 IT_S_MTART LIKE S_MTART[]
                                 IF_GP_SIZE
                        CHANGING IF_GV-RETCO.                   "#EC *
    * MARA in die Übergabestruktur einlesen
      SELECT MATNR BEGRU
            FROM MARA UP TO IF_GP_SIZE ROWS
            APPENDING CORRESPONDING FIELDS OF TABLE GT_MATNR
                     WHERE MATNR IN IT_S_MATNR
                       AND MTART IN IT_S_MTART.
      IF_GV-RETCO = SY-SUBRC.
    ENDFORM.                    " get_mara_data
    *&      Form  get_mat_text
    *       Kurz- und Langtexte zum Material lesen
    *      <->ct_gt_makt              Materialkurztexte
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      <->ct_gt_thead             Kopftabelle für ALV
    *      <->ct_gt_linetab           Zeilentabelle für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_gv_text_output_line  Struktur Ausgabetabelle
    *      <--cf_gv_makt              Struktru Materialkurztexte
    FORM GET_MAT_TEXT  TABLES   CT_GT_MAKT             STRUCTURE MAKT
                                CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                                    GV_TEXT_OUTPUT_LINE
                                CT_GT_THEAD            STRUCTURE THEAD
                                CT_GT_LINETAB          STRUCTURE TLINE
                       USING
                                IF_GC                  LIKE GC
                                IF_GV-RETCO
                       CHANGING CF_GV_TEXT_OUTPUT_LINE LIKE
                                                       GV_TEXT_OUTPUT_LINE
                                CF_GV_MAKT             LIKE GV_MAKT
      DATA: STRG TYPE STRING,
            STRG1(1255) TYPE C.
      IF IF_GV-RETCO = IF_GC-FOUND.
    * Materialkurztexte in alles Sprachen einlesen
        SELECT * FROM MAKT APPENDING TABLE CT_GT_MAKT
                 FOR ALL ENTRIES IN GT_MATNR "ct_gt_text_output_line
                 WHERE MATNR = GT_MATNR-MATNR " ct_gt_text_output_line-matnr
    * Kurztexte in die sprachabhängigen Felder bringen
        LOOP AT GT_MATNR INTO WA_GT_MATNR.
          LOOP AT CT_GT_MAKT INTO CF_GV_MAKT
                 WHERE MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-BEGRU = WA_GT_MATNR-BEGRU.
            CF_GV_TEXT_OUTPUT_LINE-MAKTX = CF_GV_MAKT-MAKTX.
            CF_GV_TEXT_OUTPUT_LINE-SPRAS = CF_GV_MAKT-SPRAS.
    * LANGTEXT
            CLEAR CT_GT_THEAD[].
            CT_GT_THEAD-TDOBJECT = IF_GC-TDOBJECT_MAT.
            CT_GT_THEAD-TDNAME   = WA_GT_MATNR-MATNR.
            CT_GT_THEAD-TDID     = IF_GC-TDID_GRUN.
            CT_GT_THEAD-TDSPRAS  = CF_GV_MAKT-SPRAS.
            CALL FUNCTION 'TEXT_READ'
              EXPORTING
                I_HEADER   = CT_GT_THEAD
                I_READONLY = IF_GC-ON
              IMPORTING
                E_HEADER   = CT_GT_THEAD
              TABLES
                T_LINES    = CT_GT_LINETAB[]
              EXCEPTIONS
                NOTFOUND   = 1.
            IF SY-SUBRC = IF_GC-FOUND.
              LOOP AT  CT_GT_LINETAB.
                STRG = CT_GT_LINETAB-TDLINE.
                IF STRG1 <> ' '.
                  CONCATENATE STRG1 ';' STRG INTO STRG1.
                ELSE.
                  STRG1 = STRG.
                ENDIF.
              ENDLOOP.
              CF_GV_TEXT_OUTPUT_LINE-LTXT40 = STRG1.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
              CLEAR CF_GV_TEXT_OUTPUT_LINE.
              STRG1 = ' '.
            ELSE.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
            ENDIF.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " get_mat_text
    *&      Form  data_output
    *       Daten mit ALV ausgeben
    *      <->ct_GT_FIELDCAT          Feldkatalog für ALV
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->P_GS_LAYOUT             Layout für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_GV_REPID             Zur Zeit aufgerufener Reportname
    *      <--cf_gv_fieldcat          Struktur Feldkatalog
    *      <--cf_gv                   Globale Variablen
    FORM DATA_OUTPUT.
      PERFORM FIELDCATBUILD.
      PERFORM LAYOUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = GV-REPID
          I_CALLBACK_PF_STATUS_SET = 'EVENT_SET_STATUS_01'
          I_CALLBACK_USER_COMMAND  = 'EVENT_USER_COMMAND'
          IS_LAYOUT                = L_LT
          IT_FIELDCAT              = T_FLDCAT1[]
        TABLES
          T_OUTTAB                 = <FS_2>
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
      IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " data_output
    *&      Form  fieldcatbuild
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELDCATBUILD. " TABLES   ct_gt_fieldcat_in STRUCTURE gv_fieldcat.
      LOOP AT IT_FLDCAT INTO WA_IT_FLDCAT.
        WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
        WA_IT_FLDCAT1-TABNAME =  WA_IT_FLDCAT-TABNAME.
        WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-FIELDNAME.
        APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
        CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
      ENDLOOP.
    ENDFORM.                    " fieldcatbuild
    * Form event_set_status_01*
    FORM EVENT_SET_STATUS_01 USING LT_EXCL TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'ABCD' .
    ENDFORM. "EVENT_SET_STATUS_01
    *& Form Name: event_user_command *
    *& Form Desc: For Handling USER_COMMAND *
    FORM EVENT_USER_COMMAND USING
    IF_UCOMM TYPE SY-UCOMM
    IS_SELFIELD TYPE SLIS_SELFIELD.
      CASE IF_UCOMM.
        WHEN 'DOWNLOAD'.
          PERFORM POPULATE_DOWNLOAD_TABLE.
          DATA: L_LENGHT TYPE I.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              FILENAME              = 'C:data.xls'
              FILETYPE              = 'ASC'
              WRITE_FIELD_SEPARATOR = 'X'
              TRUNC_TRAILING_BLANKS = 'X'
              DAT_MODE              = 'X'
            IMPORTING
              FILELENGTH            = L_LENGHT
            TABLES
              DATA_TAB              = <FS_22>.
          IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF L_LENGHT NE GC-FOUND.
            MESSAGE S398(00) WITH 'DATA downloaded to c:data.xls'.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "event_user_command
    *&      Form  get_lang
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_LANG.
      SELECT SPRAS
               LAISO FROM T002 INTO CORRESPONDING FIELDS OF TABLE GT_LANG
                      WHERE SPRAS IN S_LANG.
      DESCRIBE TABLE GT_LANG LINES V_LINES.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V = V + 1.
        WA_GT_LANG-SRNO = V.
        MODIFY GT_LANG FROM WA_GT_LANG TRANSPORTING SRNO.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'MATEDESC-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 40.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'BASDAT-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 255.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      V_FIELDNAME = 'MATNR'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'Matnr'.
      WA_IT_FLDCAT-INTLEN = 18.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 1.
      V_FIELDNAME = 'BEGRU'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'BEGRU'.
      WA_IT_FLDCAT-INTLEN = 4.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 2.
    ENDFORM.                    " get_lang
    *&      Form  dynamic_tables
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DYNAMIC_TABLES.
      ASSIGN LT_DATA TO <FS_DATA>.
    * Creating the Dynamic Internal Table
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT      " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA>     " Dynamic Internal Table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA>->* TO <FS_1>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_1> TO <FS_2>.
    * Creating a Workarea
      CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
    ENDFORM.                    " dynamic_tables
    *&      Form  populate_final_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_FINAL_TABLE.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        READ TABLE GT_LANG INTO WA_GT_LANG
                  WITH KEY SPRAS = GV_TEXT_OUTPUT_LINE-SPRAS.
        IF SY-SUBRC EQ GC-FOUND.
          GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
        ENDIF.
        MODIFY GT_TEXT_OUTPUT_LINE FROM GV_TEXT_OUTPUT_LINE.
      ENDLOOP.
    ENDFORM.                    " populate_final_table
    *&      Form  populate_dynamic_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DYNAMIC_TABLE.
      DATA: INDX TYPE SY-TABIX.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA> TO <FS_2>.
          CLEAR <LWA_LINE_WA>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_dynamic_table
    *&      Form  LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM LAYOUT.
      CLEAR L_LT.
      L_LT-ZEBRA = GC-YES.
      L_LT-COLWIDTH_OPTIMIZE = 'X'.
      L_LT-WINDOW_TITLEBAR = GC-TXT.
    ENDFORM.                    " LAYOUT
    *&      Form  populate_download_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DOWNLOAD_TABLE.
      ASSIGN LT_DATA1 TO <FS_DATA1>.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT         " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA1>  " Dynamic Internal table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA1>->* TO <FS_11>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_11> TO <FS_22>.
    * Creating a Workarea
      CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
      DATA: STRN1 TYPE STRING,
            STRN2 TYPE STRING,
            INDX TYPE SY-TABIX.
      ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-MAT.
      ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-AUT.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V_VAR1 = WA_GT_LANG-SRNO + 2.
        CONCATENATE 'MATERIALDESCRIPTION-'  WA_GT_LANG-LAISO INTO STRN1.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN1.
        V_VAR1 = WA_GT_LANG-SRNO + V_LINES + 2.
        CONCATENATE 'BASICDATA-' WA_GT_LANG-LAISO INTO STRN2.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN2.
      ENDLOOP.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      CLEAR <LWA_LINE_WA1>.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      V_VAR1 = 0.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO EQ WA_GT_LANG-SRNO.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
            <FA> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
    *        STR = GV_TEXT_OUTPUT_LINE-LTXT40.
    *        SEARCH STR FOR ';'.
    *        DO.
    *          IF SY-SUBRC = 0.
    *            SPLIT STR AT ';' INTO STR1 STR.
    *            <FA> = STR1.
    *            APPEND <LWA_LINE_WA1> TO <FS_22>.
    *            SEARCH STR FOR ';'.
    *            CLEAR <LWA_LINE_WA1>.
    *          ELSE.
    *            EXIT.
    *          ENDIF.
    *        ENDDO.
    *        <FA> = STR.
    *        APPEND <LWA_LINE_WA1> TO <FS_22>.
            <FA> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA1> TO <FS_22>.
          CLEAR <LWA_LINE_WA1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_download_table
    thanks
    Nitya

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • How to create a booking table (make online reservation)

    Hi everyone,
    I'm just wondering if any of you know how to create a booking
    table, like a booking seat for an airplane... I have to do the
    booking table as I'm doing a Japanese Restaurant website for my
    project.. At the moment, I'm using PHP, MySQL and HTML..
    Could anyone help me, please?
    Cheers,
    Nova

    You first need to check with your host to see which type of
    server side
    scripting language they support. If they support PHP, try,
    http://www.jellyform.com/
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Blog:
    http://avenuedesigners.com/blog/
    Web dev articles, photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "mastacraft" <[email protected]> wrote in
    message
    news:f3pote$d16$[email protected]..
    > Hello,
    >
    > I need to create a booking form for a website- So wen
    they fill out form
    > for
    > bookings. Should have tab for club appearance. Magazine
    ads. Etc It needs
    > to
    > lead to this email : [email protected]
    >
    > I'm really not sure how the best way is to do this, i
    understand it's
    > probably
    > a really simple process.
    >
    > Regards,
    >

Maybe you are looking for