Normalization concept

why we go for normalization in designing operational systems and why
we avoid it in designing data warehousing systems.

Hi,
denormalization in DWH is for performance reason.
For more detail look at [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/concept.htm#i1006409]Oracle Data warehousing Guide,
see section "Contrasting OLTP and Data Warehousing Environments"
Regards,
oleg

Similar Messages

  • More than 1000 columns

    In which database i can create more than 1000 columns in a table

    Hi.
    I can´t imagine a problem in the real life where you need such number of columns.
    I can´t imagine how you will administer such object.
    I think that you don´t know the database normalization concept.
    There are a lot of documentation out there about this concept, search in the web "database normalization" and take a minute for reading.
    Regards.
    Daniel
    [If you think my writing is bad, you must listen to me speaking! ;-) ]

  • Update a column keeping old values and adding new one

    I have to update a column...
    Select * from test;
    RULE_NBR TYPE_TEXT
    30     AAX,AAR,AAV,AAB,AAK
    40     BBD,WWN,AAF,AAB,AAK
    now I have to add BBB,WWW where rule_nbr = 30 and CCC,TTT where rule_nbr = 40
    so this update stmt will do...
    UPDATE TEST
    SET type_text = 'AAX,AAR,AAV,AAB,AAK,BBB,WWW'
    WHERE rule_nbr = '30';
    update test
    set TYPE_TEXT = 'BBD,WWN,AAF,AAB,AAK,CCC,TTT'
    where rule_nbr = '40';
    Just wondering is there any other way to update the same

    user1692585 wrote:
    I have to update a column...
    Select * from test;
    RULE_NBR TYPE_TEXT
    30     AAX,AAR,AAV,AAB,AAK
    40     BBD,WWN,AAF,AAB,AAK
    now I have to add BBB,WWW where rule_nbr = 30 and CCC,TTT where rule_nbr = 40
    so this update stmt will do...
    UPDATE TEST
    SET type_text = 'AAX,AAR,AAV,AAB,AAK,BBB,WWW'
    WHERE rule_nbr = '30';
    update test
    set TYPE_TEXT = 'BBD,WWN,AAF,AAB,AAK,CCC,TTT'
    where rule_nbr = '40';
    Just wondering is there any other way to update the sameYou can do something liek below..But few questions - Why are you storing data like this..It is against normalization concept..You should store the RULE_TEXT values in multiple rows.That is how you should design your data model in an RDBMS
    update test
    set type_text = type_text||decode(rule_nbr,30,',BBB,WWW',40,',CCC,TTT')
    where rule_nbr in (30,40);Edited by: jeneesh on Apr 25, 2013 2:28 PM

  • Help needed in understanding the concept of hierarchical queries

    I really need help in this matter. I have a flafile containing about 4000 rows. It is from my supplier, it's structure is as follows:
    create table Flatfile
    (Pgroup varchar2(30),
    Pclass varchar2(30),
    Manufacturer varchar2(30),
    Article varchar2(30),
    Price Number(6,2));
    Insert into Flatfile Values
    ('Application Software','Database Software','Oracle','Oracle 10G',115);
    Insert into Flatfile Values
    ('Application Software','Database Software','Microsoft','MS SQL Server 2000',200);
    Insert into Flatfile Values
    ('Application Software','Spreadsheet Software','Microsoft','Excel',100);
    Insert into Flatfile Values
    ('Monitor','15"','Acer','Acer 15"" TFT superscreen',199);
    Insert into Flatfile Values
    ('Monitor','15"','Sony','Sony R1500 flat',225);
    Insert into Flatfile Values
    ('Monitor','17"','Philips','Philips Flatscreen',250);
    Insert into Flatfile Values
    ('Monitor','19"','Viewsonic','Viewsonic PLasma Monitor',275);
    Insert into Flatfile Values
    ('Processor','AMD','AMD','FX-55',600);
    Insert into Flatfile Values
    ('Processor','Intel','Intel','P4 3 GHZ',399);
    My goal is to make a hierarchical query with the start with and connect by clauses. From what I have read is that I need to normalize the data of the flatfile.
    How do I achieve a table which I can query so that the query will represent the hierarchy that exists. Namely
    Pgroup
    ++Pclasse
    Application Software
    ++Database Software
    ++Spreadsheet Software
    So a 2-level hierarchy. I'd like to understand this simple concept first. I built on the knowledge that I gain. So the questions are:
    1.What do I need to do to make the table so that I can use a hierarchical query on it?
    2. How should the query syntax be?
    3. Is it also possible to get the data in the hierarchical query sorted asec?
    I would only like to use the simple structures of the start with and connect by clauses first. I've read there are some new additions to 10G. The problem with the examples used by the tutorials is that the tables are already made so that they are suitable for hierarchical queries. I hope to understand it by this example. And take it a step further.
    Sincerely,
    Pete

    Primarily hierarchy query serves to process tree-like structures which RDBMS simulates using through parent-child relation, often in a single table (see famoust
    EMP table where employee can have the manager who is an employee at the same time).
    In your case it could look like:
    SQL> select pgroup, pclass from flatfile;
    PGROUP                         PCLASS
    Application Software           Database Software
    Application Software           Database Software
    Application Software           Spreadsheet Software
    Monitor                        15"
    Monitor                        15"
    Monitor                        17"
    Monitor                        19"
    Processor                      AMD
    Processor                      Intel
                                   Application Software
                                   Monitor
                                   Processor
    12 rows selected.
    SQL> select decode(level,1,pclass,'  ' || pclass), Manufacturer from flatfile
      2  start with pgroup is null
      3  connect by prior pclass = pgroup
      4  /
    DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
    Application Software
      Database Software              Oracle
      Database Software              Microsoft
      Spreadsheet Software           Microsoft
    Monitor
      15"                            Acer
      15"                            Sony
      17"                            Philips
      19"                            Viewsonic
    Processor
      AMD                            AMD
      Intel                          Intel
    12 rows selected.The hierarchy syntax is described completely in the documentation including
    LEVEL and PRIOR keywords.
    As for the ordering question you can use siblings ordering:
    SQL> select decode(level,1,pclass,'  ' || pclass), Manufacturer from flatfile
      2  start with pgroup is null
      3  connect by prior pclass = pgroup
      4  order siblings by 1 desc
      5  /
    DECODE(LEVEL,1,PCLASS,''||PCLASS MANUFACTURER
    Processor
      Intel                          Intel
      AMD                            AMD
    Monitor
      19"                            Viewsonic
      17"                            Philips
      15"                            Acer
      15"                            Sony
    Application Software
      Spreadsheet Software           Microsoft
      Database Software              Oracle
      Database Software              Microsoft
    12 rows selected.Rgds.

  • Fact and Dimension vs Normalization

    I have a huge chunk of table with some columns and massive amount of data.I want to automate the entire system hence I need to modify the arrangement of the table.I have 2 options: 1) Arrange it into fact and dimension tables. and 2) Normalize the table,which already is in 2NF,to 3NF.
    Need help in getting to know which of the options is better and some case studies supporting the decision. Thank You...

    I would say it is a matter of concept. Mainly depending upon how the data is modified.
    In an OLTP environment you would use 3rd NF.
    In an DWH environment you would use a denormalized dimension table (cube) + fact tables.
    Many single rows updates, parallel user DML = OLTP
    Large bulk inserts/Deletes, (almost) no updates, mostly select access = DWH

  • Best practices for using Normalizer in ASA and in AIP-SSM

    Both PIX OS 7.x and IPS 5.x software have a concept of "traffic normalization". PIX OS on ASA can do virtual reassembly, IPS on SSM (so far as I know) can do physical reassembly and fragmentation of IP packets. Also, both ASA and SSM can do TCP normalization. For example, they both can "check inconsistent retransmissions" and protect against "TTL evasion attacks". I realize that PIX OS has only basic normalization functions and the SSM is much more configurable.
    The question is: what are the best practices here? Is it better to disable some IP/TCP PIX OS checks / IPS signatures on ASA and/or SSM? Is it better to use just SSM for traffic normalization? Does anybody has personal experience here?
    Also, there is a BugID CSCsd04327 - "ASA all out of order packets are dropped when sending to ssm"
    "When ips ssm is inline slowness is reported. show service-policy shows that the number of out of order packets reported match exactly the number of no buffer drops (even with queue-limit option). Performance hit is not the result of tcp normalization (on IPS 5.x ssm) in this case, but rather an issue with asa normalizer."
    To me it seems to be more logical to have normalization function on the firewall, but there may be drawbacks in doing this.
    So, those who're using ASA with SSM, please share your experience.
    Thx.

    Yes, this is almost correct ;)
    TCP SRP (Stream Reassemly Processor) is turned OFF on the SSM and cannot be enabled, contrary to 4200 appliances, but IP FRP (Fragmentation Reassembly Processor) is functioning on the SSM.
    The testing of 7.2(1) shows the following:
    When you configure "policy-map" to send packets to the SSM the "tcp-map" parameter "queue-limit", which has the value of zero by default, is set to an X (the X is unknown). This means that the ASA now only accepts the TCP segments which are sent in the correct order. More specifically, the gaps in SEQs are not allowed anymore. When for example, the ASA receives a TCP segment which has a SEQ within the window, but the previous TCP segment has been lost, it sends an ACK to the sender to enforce retransmition of the lost segment. As a result the sender retransmits both segments. Only after that the ASA forwards both segments to the SSM. This basically means that SSM always sees in-order TCP segments. That it is why SRP is not needed on the SSM.
    There are at least two problems however.
    The first problem is the performance impact.
    ASA now acts almost like a proxy. And, so far as I know, it doesn't support SACK (Selective ACKs). First, when the ASA does TCP SEQ randomization it doesn't change SEQ values within the SACK TCP Option. This simply breakes SACK. Second, even if you turn randomization mechanism OFF, then, I believe, the ASA will not selectively ACK the lost TCP segments, as it simply doesn't support this mechanism.
    The second problem is THE SECURITY HOLE.
    By default the ASA doesn't check TCP checksums. The 4200 appliances do check by default. But as we now know the SRP is turned OFF on the SSM... So, this means that SSM module can easily be evaded. The hacker only needs to mix attacking traffic with the random TCP segments that have bad TCP checksum. The SSM module will see the mixture of the two and will not recognize the attack. The target host will drop TCP segments with the bad checksums and see only attacking traffic... This has been successfully verified in the lab.
    Of course, this security hole can be closed with the "tcp-map" parameter "checksum-verification", but it will definitely has performance impact.
    The last note: All of the above has never been documented by Cisco. So, use at your own risk, etc.
    I hope, you will read this message, Marcoa. All of this MUST be documented. Once again, the default behaviour of the ASA opens up a big security hole.
    Regards,
    Oleg Tipisov,
    REDCENTER,
    Moscow

  • How to check the database is running in which normalization

    All,
    I wanted to know in which normal form(1NF,2NF,BCNF) my database is working. How to find that...Suggestions Please .

    Tippu, I will agree with pretty much everything that the other posters have already posted.
    Related to the concept of normalization, in the database would be the definitions of primary key (PK), unique key (UK), and foreign key (FK) constainsts within the database. Looking at the constaints definded in the database by querying the rdbms dictionary view DBA_CONSTRAINTS might be of interest for trying to identify and understand the relationship between tables in your applications. However, there is no database requirement that these relationships be defined within the database.
    That is instead of declaring a PK on tableA there might just be a unique index and no FK to the header table, tableA, from its child detail table, tableB, declared in the database in this case. It would be totally up to the application to enforce this relationship. Still the view will provide information if most of the table relationships are formally defined in the database or not.
    HTH -- Mark D Powell --

  • I don't know what this concept is called... something about uniqueness

    Let's say I have a single table of maintenance tasks. The table will have the following columns:
    auto incrementing index
    task_name
    step_number
    step_name
    So, each task will have a series of steps to complete it. I want to make sure that the step_numbers are not duplicated within a given task. Of course, one way to solve this would be to have a separate table for each maintenance task, which would only hold records for each step. But I don't know the number of different tasks, and will likely be adding more and more, so adding a new table each time doesn't make sense. So, is this "uniqueness" something that I would have to check on the client side before updating, or is there a way to create a database constraint such as this. Oh, and if this concept has a specific name, I would appreciate hearing it.

    Well, then let's break down Centinul's response some.
    Normalization - see the wiki: http://en.wikipedia.org/wiki/Database_normalization
    His 'tasks' table uses a task_id as the primary key; can also be known as a surrogate key. The 'task_name' column is now just data. If you want to change the 'data' you can change it without affecting the relations between the tables. Change it to anything you want, as often as you want; it is just data. If you make 'task_name' the primary key you 'lock it in' and then it becomes part of the table-to-table relationship. Worse the task_name value would need to be duplicated in the task_steps table; you can't change it easily in either table because the tables are linked together.
    The 'tasks' table becomes a master table of all possible tasks with one record for each task.
    CREATE TABLE tasks
    ( task_id   NUMBER        PRIMARY KEY
    , task_name VARCHAR2(255) NOT NULL
    );His 'steps' table is, similar to the tasks table, a master table of all possible steps with one record for each possible task. There is no information in this table about what task a step belongs to. A step might be part of several tasks, or part of no tasks at all. As with the tasks table the step_id is just a number to make the records unique; it might be assigned a value using a sequence generator (Oracle sequence). The numbers don't have to be consecutive, can be positive, negative, include decimal values; the only requirement is that they are unique within the table.
    The step_name now becomes just a piece of data. Feel free to change the name whenever you like. The new name will show up in new queries but it won't affect the relationship between tables.
    CREATE TABLE steps
    ( step_id   NUMBER        PRIMARY KEY
    , step_name VARCHAR2(255) NOT NULL
    );Now the part that can look confusing at first. His task_steps table is known as an intersect table. It 'intersects' the tasks table and the 'task steps' table. The records in this table are what associates a step in the step table with a task in the tasks table.
    To tie the two tables together he has added a 'task_id' column to reference a record from the tasks table and has added a 'step_id' column to reference a record from the steps table. Each corresponding REFERENCES clause tells Oracle to enforce this relationship. So you CANNOT add a record with a task_id value that does not exist in the tasks table. And you CANN"OT add a record with a step_id value that does not exist in the steps table.
    But, you said that you want each step that is associated to a task to have a number from 1 to n; this means that each task will have a step one.
    So Centinul added a 'step_order' column; this is the same as what you referred to as 'step_number' so you could use your name if you like. The UNIQUE CONSTRAINT on task_id and step_order tellsl Oracle that the combination of these two values MUST BE UNIQUE within the table. Oracle still doesn't care what the values are as long as they are unique. You can have step_order values of 2, 6, -1 and Oracle won't care; that is a business rule that Oracle won't enforce without more help.
    {code}
    CREATE TABLE task_steps
    ( task_id NUMBER NOT NULL REFERENCES tasks(task_id)
    , step_id NUMBER NOT NULL REFERENCES steps(step_id)
    , step_order NUMBER NOT NULL
    , CONSTRAINT task_steps_pk PRIMARY KEY (task_id, step_id)
    , CONSTRAINT task_steps_uk UNIQUE (task_id, step_order)
    {code}
    He gave you the best example possible for what you want to do.
    To add a record to the task_steps table:
    1. select a record that already exists from the tasks table and use the task_id value of that record
    2. select a record that already exists from the steps table and use the step_id value of that record
    3. determine the largest value of step_order that already exists in the task_steps table, add 1 to it, and use the new value for step_order for the new record.
    Step #3 is the tricky part since there may be several users or processes trying to add records at the same time. This is why this business rule is often only used for applications such as INVOICE and LINEITEM wher the same process creates the parent (INVOICE - task for your example) and all of the LINEITEM (task_steps) records at the same time.
    Does that help explain what Centinul was suggesting?

  • Free goods concept in STO

    hi all,
    i have an issue regarding free goods for STO betn plants.
    our concept is to give free goods for ex- 10 out of 100 are free goods.
    when i am creating a po with item catagory U, the free goods indicator is become vanice. so i am unable to process this free goods.
    so if any settings is thr , then pls let me know.
    regards,
    susanta

    hi
    ru selling ur goods to ur plant?
    in sto ur not selling the material to ur plant
    so the issue of free goods is not there
    thats why u cant see any kind of basic cost condition in that
    as the material is transfer from one plant to another the inventory changes and so the the price in material master is get updated for the another plznt
    refer following docs
    with delivery
    http://help.sap.com/bp_blv1600/V5600/BBLibrary/HTML/134_EN_IN.htm
    without  delivery
    http://help.sap.com/bp_blv1600/V5600/BBLibrary/HTML/135_EN_IN.htm
    hope it clears
    regards
    kunal
    award if helpful

  • Concept of free –m command in Linux

    I wanted to know the concept of free –m command as there are different rows of Mem, -/+ buffers/cache & Swap in the output. As an example, it is showing 195 as free Mem in my server but 13850 in the free section of the -/+ buffers/cache. The output needs in depth knowledge of the different parameters of the command.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    This is my understanding. used and free column in line 2 can be used to find out total used and free memory for applications
    [oracle@test ~]$ free
    total used free shared buffers cached
    Mem: 264122724 253692112 10430612 0 2074864 178696468
    -/+ buffers/cache: 72920780 191201944
    Swap: 8388600 0 8388600
    select 264122724/1024/1024 "Total RAM" FROM DUAL; (264122724 ---from line 1 Mem)
    Total RAM
    251.887058
    select (253692112-(2074864+178696468)) "used for applications" from dual; (used from line 1 - (buffers + cached) from line 1)
    used for applications
    --------------------- (matches with used from line 2)
    72920780
    select 10430612+2074864+178696468 "total free for applications" from dual;
    total free for applications
    191201944 (matches with free from line 2)
    Edited by: vlethakula on Jan 17, 2013 7:18 AM

  • HR-ABAP-Infotypes concept

    Hi Masters,
                           Can you please let me know the perfect reason for infotypes concept in HR-ABAP.
    1 Why we are using infotypes and exactly what is purpose?
    2.Why we are using LDB's why cannot we extract data directly from database tables?
    3.Can you please give me clear explanations about these infotypes.

    Hi
    Infotype(s) are used in the Personnel Management (PA) module primarily. This is where personnel master data is stored. Data is grouped according to subject matter. The Human Resources component aims to enable the user to process employee data in an effective structure in accordance with business requirements. The data structure of infotypes mirrors a logical set of data records. Infotypes can be identified by their four-digit keys, for example, the Addresses infotype (0006). To facilitate reporting on past employee data, infotypes can be saved for specific periods.
    Some people use the term HR ABAP to describe the method of managing the infotype data. Typically HR logical databases are used which offers more secure methods of accessing the infotype data. Once the infotypes are declared, you can use standard macros to access the data. Table TRMAC holds the macro name and the code behind it. This makes developing HR programs much quicker and easy to turn around.
    HR uses INFOTYPES instead of tables.
    There are different sub modules exist in HR.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/bb/bdb041575911d189240000e8323d3a/frameset.htm
    see this link you would get information about types of infotypes
    Logical databases are special ABAP programs that retrieve data and make it available toapplication programs. The most common use of logical databases is still to read data fromdatabase tables by linkin them to executable ABAP programs.
    Logical databases contain Open SQL statements that read data from the database.You do not therefore need to use SQL in your own programs. The logical database reads theprogram, stores them in the program if necessary, and then passes them line by line to theapplication program or the function module LDB_PROCESS using an interface work area .
    For further info
    check link http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB.
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    <b>REward fi suefull</b>

  • Java package concept in ABAP Objects

    Hi, just a question on grouping of classes in ABAP Objects.
    In Java, you can group classes by "package" to avoid
    namespace collision, my question, in ABAP Objects, how
    do you group classes to avoid namespace collision?
    I know that there is package concept in SAP/ABAP but it
    is different concept in Java.
    Thanks in advanced for your reply.

    Hello One and Lonley,
    the package concept in ABAP and Java is quite different. In java the package name is part of the development object in ABAP not. So any class pool name is global unique. In combination with the restriction on 30 chars this leads often to somehow cryptic names.
    The only way to escape this somehow is the excessive use of local classes. That mean classes defined within main programs. If you are on 7.00 you may check FuGr SAPLSAUNIT_TREE_CTRL_LISTENER for this technique.
    Best Regards
      klaus

  • Can not change the number of decimal places in the normalization of result

    dear all
        i want to see the proportion of some data, for example, the income of May is 300, and the total income is 1000, i need to display it like 33.33% . so i set the
    Calculate single values as normalization of result, and then it display 33.333%, i like to display only two number of decimal places, so i set the number of decimal places as 0.00, but i doesn't work, it still display three decimal numbers.
        maybe you say i can use the percentage function like %CT %GT %RT, but i need to allow external access to my query, so the i can not use those functions.
        can somebody helps me ? your advice is appreciated.

    hi,thanks for your advice, but that doesn't suit for my problem.
    before i set the normalization of result, i can change the decimal values. After that i cann't.
    In your thread, someone proposes use the T-code OY04. but this wouldn't help. As i change to other key figure, such as user quantity, when i set normalization of result, it still display 3 decimal values.
    i think the point maybe lie in the normalization of result. please advise... thanks...

  • SNC - Sistema de Normalização Contabilistica - Portugal

    Bom dia,
    No decorrer deste ano foi aprovado em concelho de ministros o novo Sistema de Normalização Contabilistica, que entrará em vigor no inicio do ano de 2010 em Portugal.
    Alguem tem a noção dos impactos e que metodologias se deverá aplicar para que a transição para esta nova realidade se efectue de forma pacifica?
    Terá a SAP alguma estratégia para a alteração para esta nova realidade? (tenho conhecimento da ferramenta SLO - system landscape optimization, para a alteração do plano de contas, mas esta nova abordagem não se resume á alteração do plano de contas, mas sim a um conjunto de principios contabilisticos que deverão ser repeitados pelas empresas).
    Qual a vossa opinião sobre este assunto?

    Oi Jackson
    Sugiro você dar uma olhada nas best practices.
    http://service.sap.com/bestpractices
    Selecione baseline packages > Portugal > Technical > Content Library
    Ali você vai achar o guia de configuração, fluxo do processo e procedimento de negócio para todos módulos e processos de negócio suportados.
    * vale também para outros países inclusive o Brasil.
    Abraço
    Eduardo Chagas

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

Maybe you are looking for

  • IPod will not power up. Computer will not recogize, and will not sync.

    It was working fine until I advanced music track. Received a low battery notice, and it went dark...The battery had been fully charges earlier. I can't get the computer to even recognize it, or charge, or anything. It just seems dead. Any ideas guys.

  • Photoshop CS4 install issues

    I have a computer I just rebuilt with a new board, processor and memory.  I installed a clean copy of Windows Vista Business on a freshly formatted 300 gig hardrive.  I previously had purchased a download copy of Photoshop CS4.  I downloaded my softw

  • When i click on my pictures a black screen with a exclamation point appears

    So I've never had any problem with my computer before..... I have Iphoto 9. When i click on my pictures, they all appear in all photos. However if i click on them, it goes blank i hvae a black screen with a exclamation point that appears. Please help

  • Anyone experiencing timeline issues? No drop down in three way cc saturation

    Hi not quite sure when, probably with in the last week or so I've noticed that a project i started a while ago has become buggy.  The timeline needle doesnt scrub, different sequences show up sparraticcaly, saturation doesn't drop down in three way c

  • SMC urgente

    Hi bigadmin, please, help me!!! When I run the smc command, I have the error I put here. I searched a lot informations in internet to solve this problem, but I didn't. Can you help me?? Thanks a lot #DISPLAY=myhost:0.0 #export DISPLAY # smc& java.lan