How to implement a table of ordered data ?

This is surely a very common question of database design.
Let us say that I am doing a web picture gallery, where I want the pictures to appear in a specific order. I am keeping the reference of the image files in a table, and I specifically want to be able to add a new picture between any two consecutive existing pictures. Nice to have would be a fast way to move a picture to another place, and support for concurrent access.
After some tries, my best solution seemed to be something like the following, but I suspect that it is still sub-optimal :
CREATE TABLE pics(
picid NUMBER PRIMARY KEY,
filename VARCHAR2(50),
ordernum NUMBER(38,10) UNIQUE
CREATE SEQUENCE pics_picid_seq;
CREATE SEQUENCE pics_ordernum_seq;
And I populate the table by using both sequences when I add the picture at the end of the list, or by calculating the ordernum as the average between the ordernums of the two pictures between which I want to insert the new picture (saying that the -1th picture has order 0).
Two drawbacks of this implementation :
- It looks like from two concurrent inserts at the same place, one will fail to the unique constraint.
- If a very very large number of pics can be inserted or moved, I may have to create a trigger locking the table and recalculating the ordernums (well that is probably the case only for huge examples).
So what is the best solution here if concurrency support is most important ? What if insert/update speed is most important ? What if "select order by" speed is most important ? Any other criteria ?

I don't expect rows to be stored in any perticular order Ooops! early Monday morning misreading of your original post. My apologies.
In your solution, isn't the full table update an issue when inserting pictures at place 1 ?Well , your solution will produce a duplicate ORDERNUM in that instance, or any other instance (hint, to make averaging work you'll need to store fractions).
Yes, my eary monday morning solution may suffer poor performance if you have lots of pictures and you re-organise them a lot. It will produce prettier values for ORDERNUM, which may be helpful if you need to display it to users, but this is probably not sufficient to save my implementation.
But if you are using averages of sequences it will be even more important to use a table API. The pictures in the twenty-fifth and twenty-sixth positions might have ORDERNUM values of 19.5 and 20 respectively or - sequence caching being what it is - 134 and 137. This may be hard for users to understand. You will need to translate offset from 1 into ORDERNUM (I guess by using ROWNUM, which is not without pitfalls).
Will transactions ensure that the picture of user B won't get inserted one place before where it should ? Concurrency is a big issue. Potentially, any user inserting a single picture is affecting the whole collection. (There's also the situation where no new pictures get added but the entire collection is re-ordered). We could make an argument that the whole table ought to be locked before anything gets done. However, full table locks are usually undesirable.
One way around this is to make the users specify the picture IDs they want the new picture to appear between, rather than place. This has the advantage of being independent of prior changes, unless the prior change also inserted a picture between 25 and 26, in which case it should fail.
I suppose there probably is a canonical design solution out there, I hope someone else knows where to find it.
Cheers, APC

Similar Messages

  • How to get pivot table by using dates

    Hi,
    How to get pivot table by using dates in column.
    Below is the sample table and its value is given.
    create table sample1
    Order_DATE       DATE,
    order_CODE       NUMBER,
    Order_COUNT   NUMBER
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,232);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,935);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,43);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,5713);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,11346);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,368);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,1380);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,133);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,7109);
    Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,14336);
    select * from sample1;So how to get the data like below.
              order_date
    order_code 30-sep-12 29-sep-12
    1 232 368
    2 935 1380
    3 43 133
    4 5713 7109
    5 11345 14336

    Using the extra data I inserted in my previous reply:select ORDER_CODE,
    SUM(DECODE(extract (month from ORDER_DATE),1,ORDER_COUNT,0)) JAN,
    SUM(DECODE(extract (month from ORDER_DATE),2,ORDER_COUNT,0)) FEB,
    SUM(DECODE(extract (month from ORDER_DATE),3,ORDER_COUNT,0)) MAR,
    SUM(DECODE(extract (month from ORDER_DATE),4,ORDER_COUNT,0)) APR,
    SUM(DECODE(extract (month from ORDER_DATE),5,ORDER_COUNT,0)) MAY,
    SUM(DECODE(extract (month from ORDER_DATE),6,ORDER_COUNT,0)) JUN,
    SUM(DECODE(extract (month from ORDER_DATE),7,ORDER_COUNT,0)) JUL,
    SUM(DECODE(extract (month from ORDER_DATE),8,ORDER_COUNT,0)) AUG,
    SUM(DECODE(extract (month from ORDER_DATE),9,ORDER_COUNT,0)) SEP,
    SUM(DECODE(extract (month from ORDER_DATE),10,ORDER_COUNT,0)) OCT,
    SUM(DECODE(extract (month from ORDER_DATE),11,ORDER_COUNT,0)) NOV,
    SUM(DECODE(extract (month from ORDER_DATE),12,ORDER_COUNT,0)) DEC
    from SAMPLE1
    where trunc(order_date, 'YY') = trunc(sysdate, 'YY')
    group by order_code
    order by order_code;
    ORDER_CODE JAN FEB MAR APR MAY JUN JUL AUG   SEP   OCT NOV DEC
             1   0   0   0   0   0   0   0   0   600   600   0   0
             2   0   0   0   0   0   0   0   0  2315  2315   0   0
             3   0   0   0   0   0   0   0   0   176   176   0   0
             4   0   0   0   0   0   0   0   0 12822 12822   0   0
             5   0   0   0   0   0   0   0   0 25682 25682   0   0Now a bit of explanation.
    1) Whenever you pivot rows to columns, no matter what version of Oracle and no matter what method you use, you have to decide in advance how many columns you are going to have and what the names of the columns are. This is a requirement of the SQL standard.
    2) I use the WHERE clause to get just the data for this year
    3) With EXTRACT, I get just the month without the year.
    4) Using DECODE, I put every month's data into the correct column
    5) Once I do all that, I can just GROUP BY order_code while SUMming all the data for each month.

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How to implement place holder columns in data template

    Hi,
    I have a requirement where I have to mimic the functionality of place holder columns in RDF using Data Templates in XML Publisher.
    How can I call a pl/sql function at element level when we try to group records in the data template.
    To make it simple , let us say I have a requirement to retrieve the address of an employee(address line 1,address line 2, city,country)
    In RDF what I do is define 4 place holder columns to capture address attributes, and in a formula column I set values to these attributes. How do I implement this in XML Publisher data template.
    When I tried to implement the above requirement using test variables, I was able to execute a pl/sql function after the group tag, but not within the group tag.
    I got the result for calc_values3 , but didn;t get anythng for calc_values1 and 2
    Data Template:
    <dataTemplate name="XXLCPAY142R" description="online payslip" defaultPackage="XXLCPAY_ONLINEPAYSLIP_PKG" version="1.0">
    <parameters>
    <parameter name="P_ASSIGNMENT_ACTION_ID" dataType="number" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q_PAYMENT_RUN">
    <![CDATA[
    SELECT PAAPRV.assignment_action_id assignment_action_id
    ,PAAPRV.payroll_action_id payroll_action_id
    ,PAAPRV.run_assignment_action_id run_assignment_action_id
    ,PAAPRV.run_payroll_action_id run_payroll_action_id
    ,PAAPRV.person_id person_id
    ,PAAPRV.full_name full_name
    ,PAAPRV.last_name surname
    ,PAAPRV.assignment_id assignment_id
    ,PAAPRV.business_group_id business_group_id
    ,PAAPRV.assignment_number assignment_number
    ,PAAPRV.registered_employer legal_employer
    ,PAAPRV.abn abn
    ,PAAPRV.grade grade
    ,PAAPRV.payroll_id payroll_id
    ,PAAPRV.time_period_id time_period_id
    ,PAAPRV.period_start_date period_start_date
    ,PAAPRV.period_end_date period_end_date
    ,TO_CHAR(PAAPRV.period_start_date,'DD-Mon-YYYY') period_start_display
    ,TO_CHAR(PAAPRV.period_end_date,'DD-Mon-YYYY') period_end_display
    ,PAAPRV.period_number || ' ' || TO_CHAR(PAAPRV.period_end_date,'YYYY') period_number
    ,TO_CHAR(PTP.regular_payment_date,'DD-Mon-YYYY') pay_date
    ,PAAPRV.date_earned date_earned
    ,PAAF.ass_attribute2 legacy_position
    ,HR_GENERAL.DECODE_LOOKUP('EMPLOYEE_CATG',PAAF.employee_category) paypoint
    ,PPB.name salary_basis
    ,PAAF.people_group_id people_group_id
    ,PAAF.collective_agreement_id cagr_id
    FROM pay_au_asg_payment_runs_v PAAPRV
    ,per_time_periods PTP
    ,per_all_assignments_f PAAF
    ,per_pay_bases PPB
    WHERE PAAPRV.time_period_id = PTP.time_period_id
    AND PAAPRV.assignment_id = PAAF.assignment_id
    AND PAAF.pay_basis_id = PPB.pay_basis_id
    AND PAAPRV.date_earned BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
    AND PAAPRV.assignment_action_id = :P_ASSIGNMENT_ACTION_ID
    ]]>
    </sqlStatement>
    <sqlStatement name="Q_EARNINGS_DEDUCTIONS">
    <![CDATA[
    SELECT PAI.locking_action_id assignment_action_id_elements
         ,PRR.assignment_action_id assignment_action_id_run_ele
         ,PRR.run_result_id run_result_id
         ,PPA.effective_date effective_date_run
         ,PAAF.pay_basis_id pay_basis_id
         ,PETF.element_type_id element_type_id_ele
         ,NVL(PETF.reporting_name
         ,PETF.element_name) element_name_ear_ded
         ,PIVF.input_value_id input_value_id
         ,PEC.classification_name classification_name
         ,PRRV.result_value amount_elements
         ,DECODE( PEC.classification_name
         , 'Earnings' , 1
         ,'Pre Tax Deductions' , 2
         ,'Involuntary Deductions' , 3
         ,'Voluntary Deductions' , 3 ) sort_order_elements
         ,CASE NVL(PETF.reporting_name
         ,PETF.element_name)
         WHEN 'Salary' THEN 1
         ELSE 2
         END sort_order_name
         ,DECODE( PEC.classification_name
         ,'Earnings',1
         ,0
         ) earnings_count
         ,DECODE( PEC.classification_name
         ,'Earnings',0
         ,1
         ) deductions_count     
         FROM pay_action_interlocks PAI
         ,pay_assignment_actions PAA
         ,pay_payroll_actions PPA
         ,per_all_assignments_f PAAF
         ,pay_run_results PRR
         ,pay_run_result_values PRRV
         ,pay_input_values_f PIVF
         ,pay_element_types_f PETF
         ,pay_element_classifications PEC
         WHERE PAI.locked_action_id = PAA.assignment_action_id
         AND PAA.payroll_action_id = PPA.payroll_action_id
         AND PAA.assignment_id = PAAF.assignment_id
         AND PAA.assignment_action_id = PRR.assignment_action_id
         AND PRR.run_result_id = PRRV.run_result_id
         AND PRRV.input_value_id = PIVF.input_value_id
         AND PRR.element_type_id = PETF.element_type_id
         AND PETF.classification_id = PEC.classification_id
         AND PPA.effective_date BETWEEN PAAF.effective_start_date AND PAAF.effective_end_date
         AND PPA.effective_date BETWEEN PETF.effective_start_date AND PETF.effective_end_date
         AND PPA.effective_date BETWEEN PIVF.effective_start_date AND PIVF.effective_end_date
         AND PPA.action_type IN ( 'R','Q' )
         AND PRR.status IN ('P','PA')
         AND PEC.classification_name IN ( 'Earnings'
         ,'Pre Tax Deductions'
         ,'Involuntary Deductions'
         ,'Voluntary Deductions')
         AND PIVF.name = 'Pay Value'
         AND PAI.locking_action_id = :assignment_action_id
         ORDER BY sort_order_elements ASC, sort_order_name ASC
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReport" source="XXLCPAY_ONLINEPAYSLIP_PKG.BEFORE_REPORT" />
    <dataStructure>
    <group name="G_PAYMENT_RUN" source="Q_PAYMENT_RUN">
    <element name="assignment_action_id" value="assignment_action_id"/>
    <element name="payroll_action_id" value="payroll_action_id"/>
    <element name="run_assignment_action_id" value="run_assignment_action_id"/>
    <element name="run_payroll_action_id" value="run_payroll_action_id"/>
    <element name="person_id" value="person_id"/>
    <element name="full_name" value="full_name"/>
    <element name="surname" value="surname"/>
    <element name="assignment_id" value="assignment_id"/>
    <element name="business_group_id" value="business_group_id"/>
    <element name="assignment_number" value="assignment_number"/>
    <element name="legal_employer" value="legal_employer"/>
    <element name="abn" value="abn"/>
    <element name="grade" value="grade"/>
    <element name="payroll_id" value="payroll_id"/>
    <element name="time_period_id" value="time_period_id"/>
    <element name="period_start_date" value="period_start_date"/>
    <element name="period_end_date" value="period_end_date"/>
    <element name="period_start_display" value="period_start_display"/>
    <element name="period_end_display" value="period_end_display"/>
    <element name="period_number" value="period_number"/>
    <element name="pay_date" value="pay_date"/>
    <element name="date_earned" value="date_earned"/>
    <element name="legacy_position" value="legacy_position"/>
    <element name="paypoint" value="paypoint"/>
    <element name="salary_basis" value="salary_basis"/>
    <element name="people_group_id" value="people_group_id"/>
    <element name="cagr_id" value="cagr_id"/>
    <group name="G_EARNINGS_DEDUCTIONS" source="Q_EARNINGS_DEDUCTIONS">
    <element name="assignment_action_id_elements" value="assignment_action_id_elements"/>
    <element name="assignment_action_id_run_ele" value="assignment_action_id_run_ele"/>
    <element name="run_result_id" value="run_result_id"/>
    <element name="effective_date_run" value="effective_date_run"/>
    <element name="pay_basis_id" value="pay_basis_id"/>
    <element name="element_type_id" value="element_type_id"/>
    <element name="element_name_ear_ded" value="element_name_ear_ded"/>
    <element name="input_value_id" value="input_value_id"/>
    <element name="classification_name" value="classification_name"/>
    <element name="amount_elements" value="amount_elements"/>
    <element name="sort_order_elements" value="sort_order_elements"/>
    <element name="sort_order_name " value="sort_order_name "/>
    <element name="earnings_count" value="earnings_count"/>
    <element name="deductions_count" value="deductions_count"/>
    <element name="calc_values" value="XXLCPAY_ONLINEPAYSLIP_PKG.CALC_VALUES(67772)"/>
    <element name="calc_values1" value="XXLCPAY_ONLINEPAYSLIP_PKG.RETURN_TEST"/>
    <element name="calc_values2" dataType="number" value="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST" function="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST"/>
    </group>
    </group>
    <element name="calc_values3" dataType="number" value="XXLCPAY_ONLINEPAYSLIP_PKG.P_TEST"/>
    </dataStructure>
    </dataTemplate>
    CREATE OR REPLACE PACKAGE XXLCPAY_ONLINEPAYSLIP_PKG
    AS
    P_TEST NUMBER;
    P_ASSIGNMENT_ACTION_ID NUMBER;
    FUNCTION BEFORE_REPORT RETURN BOOLEAN;
    FUNCTION RETURN_TEST RETURN NUMBER;
    FUNCTION RETURN_TEST1 RETURN NUMBER;
    FUNCTION RETURN_TEST2 RETURN NUMBER;
    FUNCTION CALC_VALUES(element_type_id number) RETURN NUMBER;
    END XXLCPAY_ONLINEPAYSLIP_PKG;
    CREATE OR REPLACE PACKAGE BODY XXLCPAY_ONLINEPAYSLIP_PKG
    AS
    P_TEST1 NUMBER;
    P_TEST2 NUMBER;
    FUNCTION BEFORE_REPORT RETURN BOOLEAN
    IS
    BEGIN
    P_TEST := 2;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'From Before Report');
    RETURN(TRUE);
    END BEFORE_REPORT;
    FUNCTION RETURN_TEST RETURN NUMBER
    IS
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.LOG,'Call 1');
    RETURN(P_TEST);
    END RETURN_TEST;
    FUNCTION CALC_VALUES(element_type_id number) RETURN NUMBER
    IS
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.LOG,'Call 2');
    p_test1 := null;
    p_test2 := null;
    if ( element_type_id = 67772 ) then
    P_TEST1 := 5;
    P_TEST2 := 7;
    elsif (element_type_id = 67804 ) then
    P_TEST1 := 9;
    P_TEST2 := 11;
    end if;
    RETURN(1);
    END CALC_VALUES;
    FUNCTION RETURN_TEST1 RETURN NUMBER
    IS
    BEGIN
    RETURN(P_TEST1);
    END RETURN_TEST1;
    FUNCTION RETURN_TEST2 RETURN NUMBER
    IS
    BEGIN
    RETURN(P_TEST2);
    END RETURN_TEST2;
    END XXLCPAY_ONLINEPAYSLIP_PKG;
    /

    For this, you need to have a master query and child query.
    1) In your master query you will have to identify one unique column and call a pl/sql pkg function which calculates all values for your place holder columns and inserts rows into a pl/sql table with the index as your unique column
    ex: Master query returns
    empnum name amount
    1 scott 250
    2 bob 350
    and your calculated value is 10 percent of the amount
    your pl/sql pkg should insert records into the pl/sql table like r(1):= 250*0.1 = 25 r(2):= 350*0.1 = 35
    2) The child query will get executed for each row of you rmaster query, so you should be able to read the values based on which master records row it is executing for
    Please bear in mind that you have to make sure that the report is not executed by two different people at the same time, else you have to consider session or any other unique identifier in addition to your master records unique identifier.
    Cheers,
    Girish.

  • How to implement parent entity for core data

    Hi there.
    I am starting a document-based Core Data application (Cocoa) and developed the following data model;
    The 'invoice' entity is a parent entity of 'items', because ideally I would want there to be many items for each invoice. I guess my first point here is - is what I am trying to do going to be achieved using this method?
    If so, I have been trying several ways in Interface Builder to sort out how to implement this structure with cocoa bindings. I have made a Core Data app before, just with one entity. So this time, I have two separate instances of NSArrayController's connected to tables with relevant columns. I can add new 'invoice' entities fine, but I can't get corresponding 'items' to add.
    I tried setting the Managed Object Context of the 'item' NSArrayController to this;
    I thought this would resolve the issue, but I still have found no resolution to the problem.
    If anyone done something similar to this, I'd appreciate any help
    Thanks in advance,
    Ricky.

    Second, when you create a Core Data Document Based application, XCode generates the MyDocument class, derivating from NSPersistentDocument. This class is dedicated to maintain the Managed Object Model and the Managed Object Context of each document of your application.
    There is only one Context and generally one Model for each Document.
    In Interface Builder, the Managed Object Context must be bound to the managedObjectContext of the MyDocument instance: it's the File's owner of the myDocument.xib Nib file.
    It's not the case in your Nib File where the Managed Object Context is bound to the invoiceID of the Invoice Controller.
    It's difficult to help you without an overall knowledge of your application, perhaps could you create an InvoiceItem Controller and bind its Content Set to the relationship of your invoice.

  • How to retrieve the ARCHIVED Sales order data

    Hi All,
    When issuing the output for the delivery, it is giving an error saying 'Sales Order XXXX does not exist' due to which the prices in the output were displayed as '0'. Reason for this can be that 'the order might have been archived'.
    My requirement is,
    1. If Sales Order doesnu2019t exist in data base then need to check if Sales order exists in archive data base.
    2. If  yes, take needed data from archive data base tables to calculate price. The logic of price calculation should be the same as for not archived Sales Orders.
    Can anyone help me on this..?
    Please tell me how to check whether the Sales order exists in the Archived database. Please share the table names(sample logic if possible) sothat I can use them in the report logic.
    Please tell me how to pull the data from the archive database tables to calculate the price.
    Thank you in advance.
    Thanks & Regards,
    Paddu.
    Edited by: Paddu K on Feb 23, 2009 3:42 PM

    *&      Form  get_archive_data
    *       Fetch Archive Data
    FORM get_archive_data .
      CLEAR:    g_read_handle, g_commit_cnt,
                g_read_cnt, g_reload_cnt,it_rel_tab,it_bseg_a,it_bkpf_a,
                it_bset_a, gt_result.
      REFRESH: it_rel_tab[],it_bseg_a[],it_bkpf_a[],
               it_bset_a[], gt_result[].
    *Populating selection screen fields to field-symbols
      PERFORM build_fs_select_options.
    *Call FM as_api_read  FI Data
      CALL FUNCTION 'AS_API_READ'
        EXPORTING
          i_fieldcat                      = 'SAP_FI_DOC_002'
          i_selections                    = ft_selections[]
    *   I_OBLIGATORY_FIELDS             =
    *   I_MAXROWS                       =
       IMPORTING
         e_result                        = gt_result[]
    EXCEPTIONS
       parameters_invalid              = 1
       no_infostruc_found              = 2
       field_missing_in_fieldcat       = 3
       OTHERS                          = 4
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT gt_result[] IS INITIAL.
    *Sorting by KEY and Offset
        SORT gt_result BY archivekey archiveofs.
    *To delete duplicates
        DELETE ADJACENT DUPLICATES FROM gt_result COMPARING archivekey
        archiveofs.
    *looping the internal table
        LOOP AT gt_result.
    *Get read handle for  object
          CALL FUNCTION 'ARCHIVE_READ_OBJECT'
            EXPORTING
              object         = 'FI_DOCUMNT'
              archivkey      = gt_result-archivekey
              offset         = gt_result-archiveofs
            IMPORTING
              archive_handle = g_read_handle
            EXCEPTIONS
              OTHERS         = 1.
          IF NOT sy-subrc IS INITIAL.
            MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
          IF sy-subrc = 0.
    *Get Acoounting Document details
            PERFORM object_read_opened
                      TABLES it_rel_tab
                             it_bseg_a
                             it_bkpf_a
    *                         it_bset_a
    *                         it_bsik_a
    *                         it_bsak_a
                             it_bsid_a
                             it_bsad_a
    *                         it_bsec_a
                      USING g_read_handle
                            l_archobj
                            g_commit_cnt
                            g_read_cnt
                            g_reload_cnt
          ENDIF.
    *close the file.
          CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
            EXPORTING
              archive_handle          = g_read_handle
            EXCEPTIONS
              internal_error          = 1
              wrong_access_to_archive = 2
              OTHERS                  = 3.
          IF sy-subrc <> 0.
            MESSAGE i004." 'Unable to close archive session'.
            EXIT.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
        EXIT.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
      IF NOT it_bkpf_a[] IS INITIAL.
        SORT it_bkpf_a BY belnr.
        DELETE ADJACENT DUPLICATES FROM it_bkpf_a COMPARING belnr.
        DELETE it_bkpf_a WHERE budat GT p_budat. "#ECDK902206
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF it_bkpf_a[] IS INITIAL.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT it_bseg_a[] IS INITIAL.
        SORT it_bseg_a BY belnr gjahr buzei.
        DELETE ADJACENT DUPLICATES FROM it_bseg_a COMPARING
                                              belnr gjahr buzei.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    ENDFORM.                    " get_archive_data
    *&      Form  build_fs_select_options
    FORM build_fs_select_options .
      REFRESH:  ft_selections.
    *Comapny code
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'BUKRS'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_bukrs  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Customer
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'KUNNR'.
      LOOP AT s_kunnr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_kunnr TO <lw_selopt>.
      ENDLOOP.
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    **Customer Group
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'KTOKD'.
    *  loop at s_ktokd.
    *    append initial line to <fw_selections>-selopt_t
    *           assigning <lw_selopt>.
    *    move-corresponding  s_ktokd to <lw_selopt>.
    *  endloop.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *Profit Center
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'PRCTR'.
      LOOP AT s_prctr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_prctr TO <lw_selopt>.
      ENDLOOP.
    *Commented #ECDK902210
    **Key Date
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'BUDAT'.
    *  append initial line to <fw_selections>-selopt_t assigning <lw_selopt>
    *  move p_budat  to <lw_selopt>-low.
    *  move  'I' to <lw_selopt>-sign.
    *  move  'EQ' to <lw_selopt>-option.
    *Aging Period1
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'ANZTA'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag1  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period2
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag2  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period3
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag3  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period4
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag4  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period5
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag5  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    ENDFORM.                    " build_fs_select_options
    *&      Form  object_read_opened
    *       To Fetch Arichive Data
    FORM object_read_opened TABLES   it_rel_tab
                                      it_bseg_a
                                      it_bkpf_a
    *                                  it_bset_a
    *                                  it_bsik_a
    *                                  it_bsak_a
                                      it_bsid_a
                                      it_bsad_a
    *                                 it_bsec_a
                             USING value(g_read_handle) LIKE sy-tabix
                                   value(l_archobj) LIKE arch_def-object
                             value(g_commit_cnt) LIKE arch_usr-arch_comit
                               g_read_cnt TYPE i
                               g_reload_cnt TYPE i.
      DATA: BEGIN OF table_wa ,
               table LIKE arch_stat-tabname,
            END  OF table_wa.
      DATA: lit_data(2048) TYPE c OCCURS 1 WITH HEADER LINE.
      DATA:  l_structure LIKE arch_stat-tabname,
             l_lin TYPE i.
      CLEAR: it_table_org1,lit_struc,it_table_org2,table_wa,it_rel_tab.
      REFRESH: it_table_org1[],lit_struc[],it_table_org2[],it_rel_tab[].
      CLEAR: g_duprec,g_read_cnt,g_reload_cnt,g_object_cnt.
    *Read  data from the infostructure
      DO.
        ADD 1 TO g_object_cnt.
        CLEAR l_structure.
        CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
          EXPORTING
            archive_handle                = g_read_handle
         IMPORTING
           record                        = lit_data
    *   RECORD_CURSOR                 =
    *   RECORD_FLAGS                  =
           record_structure              = l_structure
    *   RECORD_LENGTH                 =
    *   RECORD_REF                    =
         EXCEPTIONS
           end_of_object                 = 1
           internal_error                = 2
           wrong_access_to_archive       = 3
           OTHERS                        = 4
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          EXIT.
        ENDIF.
        IF NOT l_structure IS INITIAL.
          table_wa-table = l_structure.
          APPEND table_wa TO it_rel_tab.
        ENDIF.
        APPEND lit_data.
        CLEAR l_lin.
        FIELD-SYMBOLS: <fs_struc> TYPE c.
        CASE l_structure.
    *BKPF data
          WHEN 'BKPF'.
            ASSIGN it_bkpf_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bkpf_a.
    *BSID data
          WHEN  'BSID'.
            ASSIGN it_bsid_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsid_a.
    *BSAD data
          WHEN  'BSAD'.
            ASSIGN it_bsad_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsad_a.
    *BSEG data
          WHEN 'BSEG'.
            ASSIGN it_bseg_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bseg_a.
        ENDCASE.
        REFRESH lit_data.
        CLEAR g_object_cnt.
      ENDDO.
    ENDFORM.                    " object_read_opened
    *&      Form  get_bsid_bsad_archive_data
    *If Exclude Spl. GL Trnasaction is initial get BSID BSAD Archive data  *
    FORM get_bsid_bsad_archive_data .
    *Work Area
      DATA: wa_bsid TYPE type_bsid.
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a   where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE  bukrs = p_bukrs AND
                                budat LE p_budat. "#ECDK902206
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a   WHERE bukrs EQ p_bukrs AND
                                  belnr EQ it_bkpf_a-belnr AND
                                  gjahr EQ it_bkpf_a-gjahr AND
                                  augdt GT p_budat AND
    *                            koart eq 'D'     and
                                  kunnr IN s_kunnr AND
                                  prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat."#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT i_bsid[] IS INITIAL.
        SORT i_bsid BY belnr.
    *Commenting this logic by GTATIKONDA on 10/31/2008 #ECDK902245
    *  delete adjacent duplicates from i_bsid comparing belnr.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
    ENDFORM.                    " get_bsid_bsad_archive_data
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a  where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE bukrs = p_bukrs AND  "#ECDK902206
                               budat LE p_budat.
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a  WHERE bukrs EQ p_bukrs AND
                                 belnr EQ it_bkpf_a-belnr AND
                                 gjahr EQ it_bkpf_a-gjahr AND
                                 kunnr IN s_kunnr AND
                                 umskz EQ space AND
                                 augdt GT p_budat AND
                                 prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat. "#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • How to make a table of annual data from a table of quarterly data?

    I've got a table of quarterly data. I'd like to create a table of annual data, where each cell has the sum of the four cells for the four quarters that make up a calendar year.
    I can do this by pasting a formula into every 4th cell of a second column, but I'd really like a way that doesn't require so many paste operations. Also, when I try doing the same thing into a column that doesn't leave three blank cells, I don't get the annual totals I want (the totaling just moves down one cell, rather than four).
    Two related questions:
    Is there anyway to move my data so that the four quarters appear side-by-side in 4 columns? (Then the annualizing would be easy.)
    Is there any way to take every 4th element from a column and put it somewhere?

    pmbrewer
    I'm having trouble picturing what you have. Correct me if I'm wrong, but I see a single column blocked off in groups of 4 cells. You don't mention them, but you must have additional columns with some sort of identifiers including quarter numbers and items? With this picture in mind let's go to your questions.
    pmbrewer wrote:
    I've got a table of quarterly data. I'd like to create a table of annual data, where each cell has the sum of the four cells for the four quarters that make up a calendar year.
    I can do this by pasting a formula into every 4th cell of a second column, but I'd really like a way that doesn't require so many paste operations.
    This can be done but you're right, it's awkward and can be handled better as you suggest in the first question below.
    Also, when I try doing the same thing into a column that doesn't leave three blank cells, I don't get the annual totals I want (the totaling just moves down one cell, rather than four).
    Can you explain this more clearly? Perhaps give an example?
    Two related questions:
    Is there anyway to move my data so that the four quarters appear side-by-side in 4 columns? (Then the annualizing would be easy.)
    This can be done and you're right, it's easier. How much data has to be moved?
    Is there any way to take every 4th element from a column and put it somewhere?
    What do you mean by this?
    I'm sure members of the forum will be able to help you with a better understanding of your problem. Ultimately I see a table looking something like below:
    pw

  • How to determine Default Table Logging (log data changes )

    Does anyone know how to view exactly what tables and related data fields have change logging enabled by default? I know that some of the standard reports will produce "edit reports" show who changed what field, when ,old and new values, etc, but I don't know how to determine where the data is retrieved from.
    For example: If I look in the ABAP Dictionary at table LFA1, technical settings, it shows that log data changes is not "checked" or enabled. But if I run the standard AR Master Data Change Report, I get output showing valid field changes.
    I have seen other threads that refer to SCU3 but I can't determine the above this from report.
    Any assistance would be greatly appreciated.

    Hi Arthur,
    As far as I am aware, these are 2 different things. 
    There is table logging which is at the table level & if activated (i.e. it's listed in table DD0LV, PROTOKOLL=X and the table logging parameter is set in the system profile/s).
    The second one is programatical logging for change documents when data is maintained though a program that has been written to include a log.  I'm not sure how to identify a complete lit of these though unfortunately.
    Hope that is of some assistance.

  • How to fill setup table based on date???

    Hi Experts,
    I need to do repair full request for 2lis_11_vaitm datasource, I want to load from 1st Apr 2008 to 31st March 2009, but in OLI7BW t-code i am unable to find date field in selection screen.
    1) How can I fill setup table based on date?
    2) In RSA7 containing records even though  is it possible to fill setup table ?
    Helpful answer will be appreciated with points,
    Thanks in advance,
    Venakt.

    Venkata,
    1) How can I fill setup table based on date?
    --> If date not possible then try to setup with available options/characteristics.
    --> While pulling into BW, extract data selectively. Give date selection at infopcakge.
    2) In RSA7 containing records even though is it possible to fill setup table ?
    --> Yes, you can do it.
    Srini

  • How to implement authorization at sales order/projects level?

    If we open a sales order in VA02 and then try to open the same sales order in another session in VA02, there will be a message that the sales order is being processed. 
    I wish to implement similar functionality in my application which consists of editable report. 
    I tried to debug the situation in VA02 case mentioned above, to know something more about it, but could not understand anything!
    I know that lock objects can be helpful in this, but in my case there can a be range of sales orders (and projects within a range of profit centers). 
    How to implement such a functionality?
    Edited by: Ankit Modi on Dec 30, 2009 10:54 AM
    Edited by: Ankit Modi on Dec 30, 2009 10:55 AM

    @ Max -
    Yes Max, but the problem is that I want the lock on many sales orders at a time.  Its like, there is a report in which many rows (for sales orders) are editable.  I want all those to be locked at a time. This will not work by Lock object, I believe...
    @ Soumya -
    Yes Soumya, but, as I explained above, I want a range of sales orders rather than a sales order in particular.  That will not work by lock object.  Right?

  • How to not make Tables, Column and Data Available in Excel

    Goal:
    Not displaying the dimension table and its data in excel
    Problem:
    I was enable to deny access for the user roles in SSAS about denying access the data from the column but the next thing is that I do not know how dimension table and column not to be available in the excel.
    Information:
    *The datasource is SSAS
    *I have made three user to have access to two tables only.

    Hi Sakura,
    According to your description, you want the Manager role can see all dimension table and its data column. And the Employee role can't view all table, column and data, right? Currently we don't have a direct option to complete hide the dimensions or attributes
    to some roles. However you can use workarounds below.
    Using cube perspectives and hide the cube dimension attribute then set the perspectives to role.
    Perspectives
    Use this workaround discussed in the similar thread below.
    Dimension attribute security to hide or unhide an attribute
    based on certain condition
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How can we read archived sales order data?

    Hi there,
    We need information about sales orders, which are already archived (e.g. VBAK, VBAP).
    How can we read these data from archive?
    Do you know the necessary function modules?
    Thanks a lot for help.

    Hi,
    The main transactions that provide access to sales orders data are the following:
    VA03 Display Sales Order
    ALO1 Document Relationship Browser
    Other:
    KABP Controlling Documents: Plan
    KSB5 Controlling Documents: Actual
    KVBI Sales Documents: Actual Line Items
    Standard Reports:
    S3VBAKAU: Program for sequential reading of archived sales documents
    If at least one of the archiving information structures SAP_DRB_VBAK_01- SAP_DRB_VBAK_02 is active, I suggest to use the transaction ALO1.
    More info can be found at:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/19/68c149815cfa4997525e0e7d7509bf/content.htm]
    Regards,
    Andrea

  • How to delete the table entries (created data )

    in which table the created data will be get stored i need to delete it programitically can any one help me out in this, plz tell me the table name where the created data will be get stored.

    Hi
    Rocky
    use the delete statement
    the information regarding delete is
    DELETE dbtab
    Syntax
    DELETE { {FROM target [WHERE sql_cond]}
           | {target FROM source} }.
    Effect
    The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.
    System Fields
    The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Meaning
    0 A least one row was deleted.
    4 At least one row could not be deleted, since it was not found in the database table.
    The statement MODIFY sets sy-dbcnt to the number of deleted rows.
    Note
    The rows are deleted permanently from the database table in the next database commit. Until then, you can cancel the deletion in a database rollback.
    plzz reward if helpfull dont forget to reward if helpfull..
    for any further quiries my mail id is
    [email protected]

  • How to Transfer Database Table Field to Data Type in XI

    Dear All,
    Dear All,
    I am working on scenario to transfer data(Database Table) from Non SAP System to SAP system through XI.
    While Defining "Data Type" in XI i want to create Data Type as of Database table in my(Oracle Database).There is any direct method to import Database Table field into "Data Type" in XI.
    thanks,
    RP

    Hi;
    Edit plus is a tool using which you can edit your file and make changes to it.
    You can download it from net ,just search for it on google.
    this will help you to get in the field names of the table by editing the file .
    Mudit

Maybe you are looking for

  • MIDI set up - device not listed

    I have a new computer and I am trying to set up the Audio/MIDI setup application. I have a MOTU MIDI Express XT and a Kurzweil K2600. When I click "Add Device", only Mark of the Unicorn and Mackie how up in the list. I do not see Kurzweil or even Rol

  • Experiencing strange performance issues after a hard drive failure - Help!

    I bought my mid-2012 i5 Macbook Pro in December of 2012. I realized when shopping for computers that I wanted an SSD installed, but that it would be a lot cheaper if I bought the SSD and installed it rather than customizing it in the Apple Store. So

  • How do i set up "print to iPhoto" from pages

    How do i set up "print to iPhoto" from pages

  • Frustrated Beginner

    I am new to IPAD and am using model MC989LL/A and version 7.0.4 (11B554a).  When I initially set up, I misspelled my email address.  Then I entered the correct address and I am getting email traffic OK.    But sometimes when I want to sign up for Icl

  • The type BAPIRETURN1Table not found error on  Accounting Services BO

    Hi, I am using the new SA.NET Connector and connecting to SAP 500 Release. When I was dragging some of the Business Objects such as Accounting Services, I got the error "The type or namespace name 'BAPIRETURN1Table' could not be found (are you missin