I need to display, a record  count on a column within a table per month

This is what i currently have...but not what i am looking for...
select creation_date,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'01', 1,0)) JAN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'02', 1,0)) FEB,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'03', 1,0)) MAR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'04', 1,0)) APR,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'05', 1,0)) MAY,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'06', 1,0)) JUN,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'07', 1,0)) JUL,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'08', 1,0)) AUG,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'09', 1,0)) SEP,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'10', 1,0)) OCT,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'11', 1,0)) NOV,
sum(DECODE(to_char(creation_date, 'MM/DD/YYYY HH24:MI:SS'),'12', 1,0)) DEC,
count(*) TOTAL
from applsys.fnd_user
where creation_date > to_date('01/01/2010','MM-DD-YYYY')
GROUP BY creation_date
order by 1;
I need the amount of users added to be displayed per month..together with a total...
output similar to this:
COYDIV      JAN     FEB     MAR     APR     MAY     JUN     JUL     AUG     SEP     OCT     NOV     DEC      TOTAL
101     4     0     1     0     0     0     0     0     0     0     0     0     5
102     0     3     0     0     0     0     0     0     0     0     0     0     3
103     0     1     1     0     0     0     0     0     0     0     0     0     2
104     0     1     0     0     0     0     0     0     0     0     0     0     1
105     0     0     1     0     0     0     0     0     0     0     0     0     1
107     1     0     0     0     0     0     0     0     0     0     0     0     1
108     0     1     0     0     0     0     0     0     0     0     0     0     1
109     2     0     2     0     0     0     0     0     0     0     0     0     4
117     0     0     2     0     0     0     0     0     0     0     0     0     2
118     0     0     1     0     0     0     0     0     0     0     0     0     1
119     0     0     1     0     0     0     0     0     0     0     0     0     1
122     0     1     0     0     0     0     0     0     0     0     0     0     1
201     1     0     0     0     0     0     0     0     0     0     0     0     1
401     4     0     1     0     0     0     0     0     0     0     0     0     5
403     0     1     0     0     0     0     0     0     0     0     0     0     1
603     0     0     1     0     0     0     0     0     0     0     0     0     1
609     0     0     3     0     0     0     0     0     0     0     0     0     3
612     1     0     0     0     0     0     0     0     0     0     0     0     1
615     0     2     0     0     0     0     0     0     0     0     0     0     2
619     0     0     1     0     0     0     0     0     0     0     0     0     1
2001     0     2     2     0     0     0     0     0     0     0     0     0     4
2201     0     1     2     0     0     0     0     0     0     0     0     0     3
2301     0     0     1     0     0     0     0     0     0     0     0     0     1
2302     0     1     0     0     0     0     0     0     0     0     0     0     1
2303     0     0     1     0     0     0     0     0     0     0     0     0     1
5001     0     2     3     0     0     0     0     0     0     0     0     0     5
TOTAL     13     16     24     0     0     0     0     0     0     0     0     0     53
any ideas on how i can remedy my script

Ok here goes
1. boldVersion 11.1.0.7.0
2. boldsample data
"USER_ID","USER_NAME", "LAST_UPDATE_DATE", "LAST_UPDATED_BY", "CREATION_DATE", "CREATED_BY","LAST_UPDATE_LOGIN","SESSION_NUMBER","START_DATE","END_DATE","DESCRIPTION", "LAST_LOGON_DATE","PASSWORD_DATE","PASSWORD_ACCESSES_LEFT","PASSWORD_LIFESPAN_ACCESSES","PASSWORD_LIFESPAN_DAYS","EMPLOYEE_ID","EMAIL_ADDRESS","FAX","CUSTOMER_ID","SUPPLIER_ID","WEB_PASSWORD","USER_GUID","GCN_CODE_COMBINATION_ID","PERSON_PARTY_ID"
2289, [email protected], 3/24/2010 12:37:23 PM, 2289, 1/18/2010 12:22:49 PM, 1295, 4975366, 24, 1/18/2010, ,Cecilia Buthelezi,4/6/2010 8:46:36 AM,3/24/2010 12:37:23 PM,,,30,8180,[email protected],,,,,,,20702
2269, [email protected], 3/24/2010 3:40:47 PM, 2269, 1/14/2010 3:42:58 PM, 1295, 4917252, 10, 1/14/2010, ,Heather Summers, 3/24/2010 3:40:48 PM,3/24/2010 3:40:47 PM,,,30,2237,[email protected],,,,,,,7169
3. boldexpected out put
JAN     FEB     MAR     APR     MAY     JUN     JUL     AUG     SEP     OCT     NOV     DEC      TOTAL
4     0     1     0     0     0     0     0     0     0     0     0     5
0     3     0     0     0     0     0     0     0     0     0     0     3
TOTAL     13     16     24     0     0     0     0     0     0     0     0     0     53
etc
4. boldExplanation of expected output
a select statement using the creation date, for users added per month and total users added for months in which users were added.
thanks
Edited by: user11978142 on Apr 6, 2010 5:46 AM

Similar Messages

  • Right now I am working in a temporary site format. I am hosting the website on my own computer. How to I take it from a temporary site to a live site? Do I need to upgrade my service with abode and does this cost more per month?

    Right now I am working in a temporary site format. I am hosting the website on my own computer. How to I take it from a temporary site to a live site? Do I need to upgrade my service with abode and does this cost more per month?

    Hi Traci,
    To push the site live, you will need to:
    Publish a trial site on BC (File menu> Publish)
    Then, go to the admin dashboard of your site and the launch the site live by paying for it or redeeming a free site.
    Add domain to the site
    Change name-servers at domain registrar
    For steps 3 and 4, kindly refer to the following link:
    http://docs.businesscatalyst.com/user-manual#!/site-settings/site-domains/change-the-domai n-name-of-your-site
    The following link might also be helpful:
    Launching a Muse Site | Adobe Muse CC
    Regards,
    Sonam

  • Query to display all records count of all tables in a schema

    Hi,
    I need to count all the records of all my tables in a certain schema and display the max amount of the record count. Do you have a script for this one??

    SQL> create function countrec(in_tab in varchar2) return number is
      2  retval number;
      3  begin
      4    execute immediate 'select count(*) from '||in_tab into retval;
      5    return retval;
      6  end;
      7  /
    Function created.
    SQL> select table_name, countrec(table_name)
      2  from tabs;
    TABLE_NAME                     COUNTREC(TABLE_NAME)
    QUERY_TOOL_DATA_COLLECTION                        5
    TEST01                                            0
    T1                                               14
    EMP                                              14
    SALGRADE                                          5
    FILES                                             0
    PROVA                                             0
    TEST                                              0
    T_MASTER                                          1
    T_CHILD                                           3
    TAB_ONE                                          30
    TAB_TWO                                          10
    A                                                 3
    B                                                 4
    C                                                 3
    D                                                 3
    BONUS                                             0
    DEPT                                              4
    18 rows selected.Max

  • How to display a record count in a text field?

    I am trying to return a record count of a query and place that count in a text field on my search page in APEX. I have that text field defined under Items on the search page. How do I get a query record count to display in my text field?
    Thanks,
    John
    Edited by: user7381760 on Jan 22, 2009 3:47 PM

    Hi Dan,
    Thank you for your reply and yes I was able to select "Source Type" and "SQL Query". The SQL expression I used was:
    SELECT COUNT(ID) FROM master_table;
    This worked great to count the total number of records from the master_table. However what I am trying to do is to get a record count each time I complete a search from my search page. I have input fields on this page and a GO button which executes the query. The SQL query is location in one place under Regions/Display Point. My display field on my search page is named P16_COUNT2 and I was trying to make this work inside the main query code. I tryed something like this, COUNT(ID) INTO :P16_COUNT2, to pass the record count each time I execute the GO botton to P16_COUNT2 field. This I could not get to work. Any ideas how to proceed?
    Regards,
    John

  • Need to display only leaf and not the node using tree table

    Hi,
    Am using Jdeveloper 11.1.2.0.0 . As per requirement , am having Department - Employee View wherein Department is the parent considered as node and Employee as a child which is considered as a leaf. Having dragged and dropped the DepartmentView as a tree table -> shuttle department id and department name to be displayed -> added EmployeeView to the same and shuttled employee id along with the first and last name. so this works as it has to be in the below structure...
    10 ADF
    256 A
    257 B
    258 C
    20 JAVA
    259 D
    260 E
    Code for the same ..
    <af:treeTable value="#{bindings.DepartmentsView.treeModel}" var="node"
    selectionListener="#{bindings.DepartmentsView.treeModel.makeCurrent}" rowSelection="single" id="tt1">
    <f:facet name="nodeStamp">
    <af:column id="c1">
    <af:outputText value="#{node}" id="ot1"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp">
    <af:outputText value="#{node}" id="ot2"/>
    </f:facet>
    </af:treeTable>
    *Here comes my requirement , need to display only the leaf nodes which has employee name [Employees] and need to hide the node [Department] in the below structure....*
    256 A
    257 B
    258 C
    259 D
    260 E
    Things tried to achieve the requirement....
    1. Got only the EmployeeName in the nodeStamp facet as below. Hence am getting only Employee name but the issue is am getting the icon for the node [Parent - Department]. Now how do i hide the same.
    <af:treeTable value="#{bindings.DepartmentsView.treeModel}" var="node"
    selectionListener="#{bindings.DepartmentsView.treeModel.makeCurrent}" rowSelection="single" id="tt1">
    <f:facet name="nodeStamp">
    <af:column id="c1">
    <af:outputText *value="#{node.FirstName}"* id="ot1"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp">
    <af:outputText value="#{node}" id="ot2"/>
    </f:facet>
    </af:treeTable>
    Please do suggest some solution....
    Thanks and Regards,
    Vinitha G

    Hi,
    Thanks for the reply. As the project has already implemented tree table they do not wanna change any logic written for the same. So they wanted to just display only the leaf node data using treetable component. Can you please suggest.
    Thanks and Regards,
    Vinitha G

  • How to update all the record for a particular column in a table based on search criteria.

    Hi All,
    I am new to ADF. I have a requirement, where i have to perform mass update on a table.
    Scenario:
    Ex: I have a dept manual search region. where i search with deptId: 20. I get 20 records in my table. now i have  another region where i have a inputchoice list which contains all the columns names that exists in dept table. Beside that i have a input text box and an update button
    Now user, first searches with dept id:20 and clicks on search button, where it shows 20 record in the table. He then select a column from input choicelist(ex: ManagerId), then enters new value in the input box(ex: abc) then clicks on update button.
    Now i want, all the records in the ManagerId column with dept id:20 to be updated with the new value "abc"
    Can anyone help me with the code.
    Thanks in advance..

    Hi,
    If you go to your VO and generate the ViewObjectImpl, in there you can create a method which will contain two parameters, 1 the attribute name and 2 the value.
    Then you can follow something like explained in this post:
    ADF Tutorial: How to apply bulk actions to a view object rows
    The only difference is that you will need to create a method like this:
    public void updateAttribute(String attribute, Integer value){
            RowSetIterator iter = createRowSetIterator(null);
            while (iter.hasNext()){
                Row row = iter.next();
                row.setAttribute(attribute, value);
    Then you expose that as a client interface and then after you filter your table by your criteria you just need to execute this method passing the right parameters.
    Regards

  • How to make a particular record in a particular column in a table as a link

    Hi All,
    I have a table in which the data is getting populated from the response of the BAPI.
    I have a column in this table which is not related to the BAPI response. I am binding the column with locally created attribute which is related to the custom controller also.
    The name of this column is LINK. The records for this column is "click to view".
    According to the requirement,I have two webservices which I am suppose to use in the same table.
    So the "click to view" should be enbled for the records from one webservice and should be disabled for the other.
    Now I have successfully added the column LINK and the record for it is also"click to view" as i have set it.But its not acting as a link.
    So kindly help me out.Looking forward to you.
    Regards
    DK

    Hi Dipendra,
    You can dynamically change TableCellEditor as you want a LINK at one time and no LINK(i.e. TextView ) at other time.
    You can get the handle for your table with IWDTable interface and then get handle for your table column with IWDTableColumn. Once you get these you can change the TableCellEditor for that column at runtime.
    I would sugesst you to read <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7f531207-0301-0010-5f9c-8652a3232ae0">this</a> document for further details on how to set TableCellEditor at runtime etc.
    Hope this helps,
    Regards,
    Mausam

  • Record count is more in the Fact tables when compared to Cube data!

    When i delete request from my cube it is not getting deleted from the fact table. Cube shows around 3.5 million records but when I checked in the fact table it was showing more than 11 million records.

    Hi Kingsley,
       You may try this approach.
       1. Use TCode listschema
       2. Select the type of cube abd give the cube name as well.
       3. This will display the table sinvolved in the cube(star schema).
       4. Select the Ftable listed there and see the number of rows in it.
       Inorder to delete the entire data from cube, you may need to delete all the load requests that has happened before as well.
       Hope this helps...
    Thanks,
    Raj

  • Record count is double in the Fact tables when compared to Cube data!

    Hello BW Gurus,
    I have 2 question to be answered!
    1. I have a cube which consist of 3 years of data. Due to some bad data in it, I have dropped the cube data completely from fact and dim tables and did an init. from ODS. the load failed due to "No SID found for value '2000000000000000000000010' of characteristic 0MAT_PLANT". I have run a RSRV test to find if there is any inconsistency in SID's for 0MAT_PLANT but everything looks great. Considering the time span in mind to finish the load I have removed that record from PSA and re-pushed the data from PSA which was successful, however I wanted to know if anyone has come across such kind of error.
    2. The load finished successfully in the cube but the performance of the cube was very bad coz my cube request shows only 3.5 million records but when I checked in the fact table it was showing double i.e. 7 million records, which is because I deleted the failed init. request and re-pushed the data from PSA. can anyone suggest me how to overcome this I mean how to bring back my fact table records to 3.5 million?
    please advise me and thanks so much!
    Swathi.

    hi Swathi,
    1. for 0mat_plant no sid, beside rsrv, you can try rsd1, infoobject maintenance, there is menu (about 3rd from left) 'fill sid ...'.
    for infocube update, please make sure you 'delete data',
    'fact and dim...'. check again if fact table counts 0 records then you can update from ods with 'initialize'. or if you go by psa then delete data both infocube and ods (from ods to cube should sufficient).
    2. for performance, check in infocube -> manage -> performance, make sure index and statistic is green. you can create index there, also refresh the statistic.
    hope this helps.

  • Need to display the BW documents as a column in the Bex report

    Hi,
    I know, from Bex you can Goto "Goto -> Documents" or "Goto -> Documents for navigation status" context menu to display documents.
    But I was wondering, is there a way to display the documents as a column in the report, instead of going through the menu?
    Thanks a bunch.

    Sonali,
    the very purpose of it being a document is that it can have any data that might be required to identify the value like an image etc... this would be the reason why you cannot display the document directly on the page..
    Options are :
    1. When loading the data - have a routine that looks into the document and populates the text attribute of the IOBJ
    2. Use a virtual characteristic to pick up the value of the characteristic and fetch the document content ( Not sure if this can be done )
    3. If you are using Web reporting - use the table interface to fetch the value of the document and put it into the cell.
    Arun
    Assign points if it helps..

  • Mail needs to be sent after updating the salary column of emp table

    Hi,
    we have table test_emp_table, oracle form based application is running on this table...
    it conatins salary column, we have requirement that, when every any update to the salary column, a mail needs to be sent to concerned person with new and old salary values..
    I did that using the following procedure...
    ===========
    -- Create Temporary Table to hold the Updated values
    create table email_parameters
    ( id number primary key,
    oldsal varchar2(10),
    newsal varchar2(10),
    ename varchar2(100));
    --- Create Procedure
    CREATE OR REPLACE PROCEDURE send_email_new (
    l_job IN NUMBER ) is
    l_oldsal varchar2(100);
    l_newsal varchar2(100);
    l_emp_name varchar2(100);
    l_message varchar2(100);
    BEGIN
    SELECT oldsal
    INTO l_oldsal
    FROM email_parameters
    WHERE ID = l_job;
         SELECT newsal
    INTO l_newsal
    FROM email_parameters
    WHERE ID = l_job;
         SELECT ename
    INTO l_emp_name
    FROM email_parameters
    WHERE ID = l_job;
         l_message:=
    'Employee Name= '
    || l_emp_name
    || chr(10)||chr(10)
    || 'Old Salary= '
    || l_oldsal
         || chr(10)||chr(10)
    || 'New Salary= '
    || l_newsal;
    send_mail(l_message);
    DELETE FROM email_parameters
    WHERE ID = l_job;
         EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (DBMS_UTILITY.format_error_stack);
    DBMS_OUTPUT.put_line (DBMS_UTILITY.format_call_stack);
    END;
    --- Create Trigger
    create or replace trigger send_email_trg
    after update on TEST_EMP_TABLE
    for each row
    declare
    l_job number;
    begin
    dbms_job.submit (job => l_job,
    what => 'send_email_new(job);' );
    insert into email_parameters
    values (l_job, :old.sal,:new.sal,:new.ename);
    end send_email_trg;
    -- Create Procedure for Sending Mail
    create or replace procedure send_mail(l_message varchar2) is
    c utl_smtp.connection;
    PROCEDURE send_header(name VARCHAR2, header VARCHAR2) AS
    BEGIN
    utl_smtp.write_data(c,name ||':'|| header || UTL_TCP.CRLF);
    END;
    BEGIN
    c := utl_smtp.open_connection('192.168.0.18');
    utl_smtp.helo(c, 'abc.com');
    utl_smtp.mail(c, '[email protected]');
    utl_smtp.rcpt(c, '[email protected]');
    utl_smtp.open_data(c);
    send_header('From', '[email protected]');
    send_header('To', '[email protected]');
    send_header('Subject', 'Warning: Employee Solary has been updated!');
    utl_smtp.write_data(c, UTL_TCP.CRLF || l_message);
    utl_smtp.close_data(c);
    utl_smtp.quit(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    utl_smtp.quit(c);
    EXCEPTION
    WHEN utl_smtp.transient_error
    OR utl_smtp.permanent_error THEN
    NULL;
    END;
    raise_application_error(-20000, SQLERRM);
    END;
    ====================
    But I have doubt, if there is any problem with mail server, if user is updating salary column from form based application at same time....
    will table trigger allows him to save the new record or not????? or will he get any errors????

    thanks justin...
    I have written that code..but it works...problem is ...i am not able to understand the flow...what happens in the order, until mail is sent...
    i have another code.....
    I have written with out dbms_job, i have witten directly in the trigger itself...
    Tom suggested the procedure, what i have given above..but not the below procedure....
    I am not able to understand, what is the difference between them.....
    CREATE OR REPLACE TRIGGER test_emp_table_trg
    AFTER UPDATE
    ON test_emp_table
    FOR EACH ROW
    WHEN (NEW.sal <> OLD.sal)
    DECLARE
    l_employee_name VARCHAR2 (240);
    l_old_sal VARCHAR2 (240);
    l_new_sal VARCHAR2 (240);
    l_message VARCHAR2 (240);
    BEGIN
    /* Gets the employee full name */
    BEGIN
    SELECT ename
    INTO l_employee_name
    FROM test_emp_table
    WHERE empno = :OLD.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_employee_name := NULL;
    END;
    /* Gets the old Salary */
    BEGIN
    SELECT sal
    INTO l_old_sal
    FROM test_emp_table
    WHERE empno = :OLD.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_old_sal := 0;
    END;
    /* Gets the new position name */
    BEGIN
    SELECT sal
    INTO l_new_sal
    FROM test_emp_table
    WHERE empno= :NEW.empno;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_new_sal := 0;
    END;
    l_message:=
    'Employee Name= '
    || l_employee_name
    || 'Old Salary= '
    || l_old_sal
    || 'New Salary= '
    || l_new_sal;
    BEGIN
    send_mail (l_message);
    END;
    ==========
    can you please describe it clearly???
    thanks in advance my dear friend????
    Edited by: oraDBA2 on Oct 4, 2008 10:26 PM

  • Need to put flag in one of the column of internal table

    TYPES : BEGIN OF ty_bseg.
              INCLUDE STRUCTURE bseg.
    TYPES : flag(1) TYPE c.
    TYPES : END OF ty_bseg.
    DATA : gt_bseg TYPE TABLE OF ty_bseg.
    SELECT * FROM bseg
                INTO TABLE <b>gt_bseg</b>
                FOR ALL ENTRIES IN gt_bsak
                WHERE bukrs = gt_bsak-bukrs
                AND   belnr = gt_bsak-belnr
                AND   gjahr = gt_bsak-gjahr.
    Now I have to fill 'X' in the internal table gt_bseg.
    how can I fill all the records of itab gt_bseg with flag 'X'.
    For better performance... is there any command like  modify  or...?

    Hi Sam,
    Use the following code.
    *Code start
    loop at gt_bseg.
    gt_bseg-flag = 'X'.
    modify table gt_bseg transporting flag.
    endloop.
    *Code ends
    Cheers,
    Vikram
    Pls reward for helpful replies!!

  • Finding column count with dynamic columns and dynamic tables

    I've done some PL/SQL for awhile now but was trying to devise a solution for the following problem:
    I wish to find the number of times a specific value for a column exists in all the tables that contain the field and I have access to see with the current user. The column name and value will be passed in via parameters.
    I was hoping to use something like
    select table_name from all_tab_columns where column_name = <variable table name>;
    then use the results from this to create a select statment based off the tables from the select above. I know the difference between dba_tab_columns and all_tab_columns - I want to make sure that I only retrieve the values i have access to.
    Can anyone point me to some guide / website / reference material I can read to catch up on the idea of creating this statment?
    Thank you.

    Hi,
    it's a test version.
    You can naturally tune it, but it seemed to work:
    declare
    pi_column VARCHAR2(30) := 'DEPTNO';
    pi_value VARCHAR2(4000) := '20';
    v_count NUMBER := 0;
    v_count_tab NUMBER;
    BEGIN
    FOR I IN (select owner, table_name from dba_tab_columns
              where column_name = pi_column
    LOOP
        EXECUTE IMMEDIATE 'SELECT count(*) FROM '||i.owner||'.'||i.table_name||
                          ' WHERE '||pi_column||' = :pi_value'  INTO v_count_tab USING pi_value; 
        v_count := v_count + v_count_tab;
    END LOOP;                   
    dbms_output.put_line(v_count);
    END;Regards

  • Records repeat in some column of final table

    In my final table Some records are repeated in some columns .
    I have tried sorting and delete adjacent syntax.
    cant avoid repeating entries.
    Please give me some hint.
    <<Moved from MM forum to ABAP forum>>
    Edited by: Csaba Szommer on Feb 9, 2011 9:30 AM

    hi all
    LOOP AT IT_FINAL.
          IF IT_FINAL-BLART = 'AA'.
            IF SY-SUBRC = 0.
              MOVE-CORRESPONDING IT_FINAL TO IT_AA.
              APPEND IT_AA.
            ENDIF.
            READ TABLE IT_AA WITH KEY BELNR = IT_FINAL-BELNR
                                      GJAHR = IT_FINAL-GJAHR
                                      BUKRS = IT_FINAL-BUKRS
                                      WERKS = IT_FINAL-WERKS
                                      HKONT = IT_FINAL-HKONT
                                      TXT50 = IT_FINAL-TXT50
                                      PSWBT = IT_FINAL-PSWBT TRANSPORTING PSWBT.
            IF SY-SUBRC = 0.
              IT_FINAL-PSWBT1 = IT_AA-PSWBT.
              MODIFY IT_FINAL TRANSPORTING PSWBT1 WHERE BLART = IT_AA-BLART
                                                    AND BELNR = IT_AA-BELNR
                                                    AND GJAHR = IT_AA-GJAHR
                                                    AND BUKRS = IT_AA-BUKRS
                                                    AND WERKS = IT_AA-WERKS
                                                    AND HKONT = IT_AA-HKONT
                                                    AND TXT50 = IT_AA-TXT50
                                                    AND PSWBT = IT_AA-PSWBT.
            ENDIF.
          ENDIF.
    same logic i used for other doc types.
    SORT IT_FINAL_NEW BY
    HKONT WERKS PSWBT1  PSWBT2  PSWBT3  PSWBT4  PSWBT5  PSWBT6  PSWBT7  PSWBT8  PSWBT9  PSWBT10
                                 PSWBT11 PSWBT12 PSWBT13 PSWBT14 PSWBT15 PSWBT16 PSWBT17 PSWBT18 PSWBT19 PSWBT20
                                 PSWBT21 PSWBT22 PSWBT23 PSWBT24 PSWBT25 PSWBT26 PSWBT27 PSWBT28 PSWBT29 PSWBT30
                                 PSWBT31 PSWBT32 PSWBT33 PSWBT34 PSWBT35 PSWBT36 PSWBT37 PSWBT38 PSWBT39 PSWBT40
                                 PSWBT41 PSWBT42 PSWBT43 PSWBT44 PSWBT45 PSWBT46 PSWBT47 PSWBT48 PSWBT49 PSWBT50
                                 PSWBT51.
      DELETE ADJACENT DUPLICATES FROM IT_FINAL_NEW COMPARING
                HKONT WERKS PSWBT1  PSWBT2  PSWBT3  PSWBT4  PSWBT5  PSWBT6  PSWBT7  PSWBT8  PSWBT9  PSWBT10
                                 PSWBT11 PSWBT12 PSWBT13 PSWBT14 PSWBT15 PSWBT16 PSWBT17 PSWBT18 PSWBT19 PSWBT20
                                 PSWBT21 PSWBT22 PSWBT23 PSWBT24 PSWBT25 PSWBT26 PSWBT27 PSWBT28 PSWBT29 PSWBT30
                                 PSWBT31 PSWBT32 PSWBT33 PSWBT34 PSWBT35 PSWBT36 PSWBT37 PSWBT38 PSWBT39 PSWBT40
                                 PSWBT41 PSWBT42 PSWBT43 PSWBT44 PSWBT45 PSWBT46 PSWBT47 PSWBT48 PSWBT49 PSWBT50
                                 PSWBT51.
    But not solved the problem.

  • How to insert records with LONG RAW columns from one table to another

    Does anybody know how to use subquery to insert records with columns of LONG RAW datatype from one table to another? Can I add a WHERE clause in the subquery statement? Thanks.

    Insert into ... Select statements are not supported for long or long raw. You will have to either use PL/SQL or convert your long raw to blobs.

Maybe you are looking for

  • Confusion between references in recursion

    Hi all, I am trying to create B+ trees for a database. My algorithm for the insert function is: void insert(page_no, entry, newchildentry ) if page_no is not a leaf ,say N find i such that Ki <= entry's key value < K i+1   //choose subtree insert(new

  • Performance based maintenance

    I have made performance based maintenance plan , in this plan i have assin counter with annual estimate 100 nos and my Maintenance plan cycle lenth 10000 nos .  ( annual estimate i kept 100 nos because  i need  maintenance order counter baase only )

  • Yahtzee

    I am making a simple yahtzee program but it's not working right. Please look at this and tell me what I'm doing wrong. Thanks! public class Yahtzee public static void main() int a, b, c, d, e; Dice one = new Dice(); Dice two = new Dice(); Dice three

  • Game output from iPad 2 to HDTV

    Can I output any Game app from my iPad 2 to my HDTV or just specially designed games?

  • Avi files to imovie 08

    hi all, just bought ilife 08. looks awesome but have a problem. all my imported clips from my digital camera are avi files, how do i import them to imovie 08? in 06 i just imported the files but in 08 i see it's only quicktime files you can import ho