Replacement of Tax Columns from AP Tables to ZX Tables

Explanation of Queries :
11i Query:
select DIST_MATCH_TYPE, LINE_TYPE_LOOKUP_CODE, AMOUNT_INCLUDES_TAX_FLAG, DISTRIBUTION_LINE_NUMBER, LINE_GROUP_NUMBER,
TAX_CODE_OVERRIDE_FLAG,
TAX_RECOVERY_OVERRIDE_FLAG,
TAX_RECOVERY_RATE,
VAT_CODE
from AP_INVOICE_DISTRIBUTIONS_ALL where INVOICE_ID=2803856 -- This Query is fine in 11i Version and no modification is needed. All I need to modify the below R12 Query.
R12 Query:
select
aid.DIST_MATCH_TYPE, ail.LINE_TYPE_LOOKUP_CODE, zls.TAX_AMT_INCLUDED_FLAG AMOUNT_INCLUDES_TAX_FLAG,
nvl(aid.OLD_DIST_LINE_NUMBER,aid.DISTRIBUTION_LINE_NUMBER) DISTRIBUTION_LINE_NUMBER,
zls.OVERRIDDEN_FLAG TAX_CODE_OVERRIDE_FLAG,
aid.TAX_RECOVERY_OVERRIDE_FLAG, --Need to get the mapping column in R12 from ZX Tables
aid.TAX_RECOVERY_RATE, --Need to get the mapping column from in R12 from ZX Tables
ail.TAX_CLASSIFICATION_CODE vat_code
from
ap_invoices_all ai,
ap_invoice_lines_all ail,
ap_invoice_distributions_all aid,
ZX_LINES_SUMMARY zls
where ai.invoice_id=ail.invoice_id
and ail.invoice_id=aid.invoice_id
and ail.line_number=aid.invoice_line_number
and ai.invoice_id=zls.TRX_ID
and aid.DISTRIBUTION_LINE_NUMBER=zls.SUMMARY_TAX_LINE_NUMBER
and ai.invoice_id=2803856
order by ail.line_number;
Please suggest me on the columns to be replaced and help me out. Appreciate your help....
Regards,
Mohammed Manzur

Pl do not post duplicate threads - Replacement of Tax Columns in R12 Environment (12.1.3)
Srini

Similar Messages

  • Replacement of Tax Columns in R12 Environment (12.1.3)

    After Upgrade from 11.5.10 to R12.1.3 these following columns were picked in AP_INVOICE_DISTRIBUTIONS_ALL table and now the issue is about to replace these tax columns with R12 ZX tables.
    Table used in 11i AP_INVOICE_DISTRIBUTIONS_ALL
    TAX_RECOVERY_RATE,
    TAX_RECOVERY_OVERRIDE_FLAG
    Have to replace columns with ZX tax tables... Need to know which table is populating in ZX tables.. Please suggest on this as it is very high important....
    Appreciate your help!
    Thanks,
    Anwar.

    Pl do not post duplicate threads - Replacement of Tax Columns in R12 Environment (12.1.3)
    Srini

  • Issue in loading specific columns from a file to teradata table using IKM

    Hi,
    Can any one help to resolve the issue in loading specific columns from text file to teradata table.
    i tried using IKM file teradata and columns are getting displaced.
    my requirement suppose i have 5 columns in file and i have to load only 3columns to table using IKM.
    same thing can be achived using LKM file to teradata but i want use IKM.
    please suggest me on this
    Regards
    Vinod

    Hi,
    I believe that the problem you are having is that you have a delimited file, of which you want to pick columns from position 2,3,5. In this case, ODI will pick the first 3 columns of a delimited file regardless of position.
    For example, if you a tab delimited file with c1,c2,c3,c4,c5 columns, and you want only columns c2,c3,c5 - when mapping these in an ODI interface, and executing, you will actually pick up the data from c1,c2,c3 as these are the first three columns in the file (reading from left to right). You can ignore "columns" on the right hand side of a file, but not the left. E.g delimited file with c1,c2,c3,c4,c5. Only pick columns c1,c2 will give you data for the first 2 columns
    Create a temporary table to load all the data from the file, and use you temp table to extract the data you require. Or you could get the file created with the first three columns as the columns you require.
    Cheers
    Bos
    Edited by: Bos on Jan 18, 2011 1:06 PM

  • Tax columns to be populated in ra_interface_lines_all table in Inbound Interface???

    Hi All,
    We are upgrading EBS from 11i instance to R 12.1.3. There is inbound interface for Recevibles transactions which fetches data from a data file and imports invoices after validation.
    In 11i, tax_code column in ra_interface_lines_all was populated to import the tax details. But, in R12 tax_code column is not used. Can anyone tell me which columns we need to populate in ra_interface_lines_all table for tax details, i can see there are many tax related columns. I am deriving tax details from zx_rates_b table.
    Which column should be used from this table as a input in tax_code(or other column) in ra_interface_lines_all.??
    Thanks
    Swapnil K.

    Hi Swapnil,
    For Tax, value to be taken from ZX_TAXES_B.TAX
    For TAX_STATUS_CODE, value to be taken from ZX_STATUS_B.TAX_STATUS_CODE
    For TAX_RATE_CODE, value to be taken from ZX_RATES_B. TAX_RATE_CODE
    For further details on the mapping refer to the oracle documentation from below reference ...
    Description and Usage of Fields in RA_INTERFACE_LINES Table (Doc ID 1195997.1)
    Regards,
    Ivruksha

  • SQL* Loader Loading specific column from CSV file to the table

    Dear All,
    Iam Loading specific column from .CSV file to the oracle table.
    Could pls help how i can load only that cols into the table
    Eg: CSV file having id, Frst_name,Last_name, Address,Phone,Insurance etc
    out of this I want to load only Frst_name,Last_name columns to oracle table say fname and lname.
    Thanks in Adv.
    Junu

    Lily,
    I made some changes to your table def but you will get the idea
    -- Table EMPLOYEE
    CREATE TABLE EMPLOYEE
      EMPID        NUMBER                           NOT NULL,
      EMPNICKNAME  VARCHAR2(10 BYTE)                    NULL,
      FNAME        VARCHAR2(20 BYTE)                NOT NULL,
      MI           VARCHAR2(20 BYTE)                    NULL,
      LNAME        VARCHAR2(20 BYTE)                NOT NULL,
      FULLNAME     VARCHAR2(20 BYTE)                NOT NULL,
      HIREDATE     DATE                             DEFAULT SYSDATE               NOT NULL
    --  data file employee.dat
    1,amy,b,amy b
    2,cindy,d,cindy d
    3,eric,f,eric f
    4,gary,h,gary
    -- Control file : Employee.ctl ( you can use truncate, replace or append , see sqlldr for more options)
    load data
    Truncate into table employee
    fields terminated by ","
    optionally enclosed by '"'
    TRAILING NULLCOLS
    empId INTEGER EXTERNAL,
    FName char(20),
    LName char(20),
    FullName char(30)
    now to load use following or you can speicify infile in control fle
    sqlldr username/passowrd control=employee.ctl  data=employee.dat log=employee.log
    {code}
    Hope this help.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Ability to query on all columns from a view with multiple tables

    I have view with 4 tables. view has about 50 columns.
    hypothetically, I want to build a form to give the user an ability to query on any of those 50 columns. user can search on one or more fields.
    what is the best way to write the query to retrieve the results without performance impact.
    please let me know if the question is not clear.

    If you want to permit them to query any of 10 fields with no restrictions, you could create 10 separate single-column indexes. The optimizer would have to try to pick the best of these indexes if you specified multiple search criteria. But since you have a view which presumably means that you've got multiple other indexes involved for the underlying join conditions, you'd probably want/need to combine the column lists of the indexes you're adding for searches with the indexes you've created for joins, which requires looking at the text of the view and figuring out the best way to optimize the 10 single-column searches. Of course, it is possible that the optimizer could chose to do something like a b-tree to bitmap conversion on multiple indexes which could allow it to use multiple independent indexes for your queries, but that's generally not ideal performance-wise.
    All this is a fancy way of saying that there probably isn't a cut and dried answer to your question. You need to figure out the queries you're trying to optimize (say, the 10 single-condition queries) and you need to figure out what set of indexes on the various underlying tables provides the best performance weighing those benefits against the cost on other side of maintenance during DML. Which is going to depend on the text of the view, the underlying tables, the existing indexes, etc.
    Justin

  • How to get a list of displayed columns from a UIX read only table

    I am using JDev 9.0.5.2 ADF UIX. Is there a way to get all the columns and/or column labels displayed in a UIX read only table? I would like to be able to do this in my DataForwardAction.

    Please don't post the same question multiple times.

  • How to read only particualr columns from excel sheet to internal table

    Hi,
    I have and excel sheet which has around 20 columns, in which i want to read only 6 columns. They are at different column positions, means the 1st column, 6thcolumn, 8th column so on..
    Can we do this in sap? do we have any FM to do this?
    Thanks.
    Praveena.

    hi,
    Use the below logic to fetch the data into internal table..You need to read the data cell by cell and update the internal table,
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO <fs_source> .
           MOVE i_data-value TO <fs_source> .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF .

  • How to fix Action Link Issue in Table and Pivot Table when used Section

    My OBIEE Version: OBIEE 11.1.1.6.5
    Issue Description: Action links (Navigate to BI Content) doesn't work in PIVOT TABLE or TABLE object when used Section area (one or more columns in Section area).
    If you want to recreate this issue please follow next steps:
    1.     First of all you have to create one analyse with min 3 columns (for example Time.“Calendar date“, Product.Product, „Base Fact“. Revenue -> from Sample Sales Lite )
    2.     From column properties -> Set value Action Link Interaction on some column for example Product.Product (choose Navigate to BI Content -> any created BI report )
    3.     Click Results Tab choose Pivot Table and assigned one dimension column to Section area
    4.     Click preview icon
    5.     When you click on action link nothing happens
    6.     If you drug and drop column from Section Area to Excluded, Table or Pivot table Area then Action Link works perfectly
    How to fix this issue?
    I'll be grateful for any help!

    This is Bug:15922681 - ACTION LINK NAVIGATE TO BI CONTENT DOES NOT WORK WITH ATTRIBUTE IN SECTION
    Upgrade to 11.1.1.6.6 will fix this issue.

  • Mapping dimension table to fact table in admin tool 10g

    Hi
    I have a criteria when it is run uses fact 1 as fact table and gives result, and when I add new column to this criteria an extra dimension(dim1) gets added to query backend and fact 1 changes to fact2.
    The problem I am facing over here is both should result same amount for records. but due to new column from dim1 and new fact table fact2the amount varies and inaccruate results have come.
    When I have checked the sources for Fact in logical layer i can find these facts(fact1,fact2) where fact 1 is not mapped with dim 1 and fact 2 is mapped with dim1.
    Will mapping dim1 to fact1 will solve my problem.. And what would be the steps to add/map dim1 to fact1.
    Please suggest.

    I just checked back the setting and here are the changed details again.
    I have a criteria where when it is run, the backend query is formed with f1 fact table.
    And for the same criteria when I add a column c1, the backedn query is formed with f2 fact table and f1 is no more here and one new dimension d1 consisting c1 is getting added.
    In both the cases results are different..the expected thing is same results.
    Note:
    d1 is connected to f2 checked in physical diagram
    d1 is not connected to f1 checked in physical diagram.
    when I checked the connection between three table in physical diagram. Only d1 and f2 are connected and f1 is not connected to either of table. How to go about this issue.
    Please suggest.

  • Update table a columns using columns from table b (values of 2 columns of table b need to taken from table c)

    Guys,
    I need to update table A columns col3, col4, col5 and col6 by table b columns col3, col4, col5 and col6 however table b col5 and col6 values need to come from table c col1.
    Means table b col5 and col6 have values in it however i need to replace them with value from table c col1 and need to update table a col5 and col6 accordingly.
    table a and table b has col1 and col2 in common.
    i am trying something like this.
    Update a
    a.col3 = b.col3,
    a.col4 = b.col4,
    a.col5 = (select col1 from table_c c where c.col2=b.col5),
    a.col6 = (select col1 from table_c c where c.col2=b.col6)
    from table_A a inner join table_b
    on  a.col1=b.col1 and a.col2=b.col2
    can someone help me reframe above update query?
    thanks in advance for your help.

    Try the below:(If you have multiple values, then you may need to use TOP 1 as commented code in the below script)
    create Table tableA(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableA values(1,2,3,4,5,6)
    create Table tableB(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableB values(1,2,30,40,50,60)
    create Table tableC(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableC values(100,50,30,40,2,2)
    --Insert into tableC values(200,50,30,40,2,2)
    Insert into tableC values(100,60,30,40,2,2)
    Select * From tablea
    Update a Set
    a.col3 = b.col3,
    a.col4 = b.col4,
    a.col5 = (select col1 from tablec c where c.col2=b.col5 ),
    a.col6 = (select col1 from tablec c where c.col2=b.col6 )
    from tableA a inner join tableb b
    on a.col1=b.col1 and a.col2=b.col2
    --Update a Set
    --a.col3 = b.col3,
    --a.col4 = b.col4,
    --a.col5 = (select Top 1 col1 from tablec c where c.col2=b.col5 Order by c.Col1 asc),
    --a.col6 = (select Top 1 col1 from tablec c where c.col2=b.col6 Order by c.Col1 asc)
    --from tableA a inner join tableb b
    --on a.col1=b.col1 and a.col2=b.col2
    Select * From tablea
    Drop table tablea,Tableb,TableC

  • Example query for po headers total amount(including tax amount) from po_headers_all table in  r12

    HI
    there is no such column like po_amount in po_headers_all table then how can i get po total amount(including tax amount) from po_headers_all table  or else tell me how to get data from views  in R12
    As we are using sql developer tool to build queries in our project
    With regards
    siva

    PO line total is not included the tax, to View the tax amount (N) Action-> manage tax
    1) You have to sum up the lines to get the PO total,
      select ph.segment1 po_num, sum ( (pl.unit_price * pl.quantity)) price
        from po_lines_all pl, po_headers_all ph
       where     pl.po_header_id = ph.po_header_id
             and ph.type_lookup_code in ('STANDARD', 'BLANKET')   --Add as per your requirement
    --          and ph.segment1 = '2017'
    --          and ph.org_id = 7852        --Use when you have multiple OU
    group by ph.segment1
    2) To get the tax
    SELECT *
        FROM (  SELECT lines.line_num line_number,
                       lines.item_description line_description,
                       dist.distribution_num dist_number,
                       dist.code_combination_id dist_code_combination_id,
                       NVL (dist.nonrecoverable_tax, 0) nonrecoverable_tax,
                       NVL (dist.recoverable_tax, 0) recoverable_tax,
                         NVL (dist.nonrecoverable_tax, 0)
                       + NVL (dist.recoverable_tax, 0)
                          total_tax,
                       (NVL (dist.req_line_quantity, 0) * NVL (lines.unit_price, 0))
                          amount,
                       dist.org_id,
                       dist.DISTRIBUTION_ID
                  FROM po_requisition_lines_all lines, po_req_distributions_all dist
                 WHERE     lines.requisition_line_id = dist.requisition_line_id
                       AND NVL (lines.cancel_flag, 'N') <> 'Y'
                       AND NVL (lines.modified_by_agent_flag, 'N') = 'N'
    --                   AND lines.requisition_header_id = :1
              ORDER BY lines.line_num, dist.distribution_num) QRSLT
    ORDER BY LINE_NUMBER, DIST_NUMBER
    Join the po_distributions_all, po_lines_all & po_headers_all tables to get the specific value.
    Thanks

  • Copying column from different table

    I want to copy the column of one table1 to table2 column with the condition to add the existing data not to replace
    Regards

    Sure ->
    satyaki>>
    satyaki>> CREATE TABLE emp_source
      2  AS
      3     SELECT * FROM emp;
    Table created.
    satyaki>>
    satyaki>> SELECT COUNT(*) FROM emp_source;
      COUNT(*)
            14
    satyaki>>
    satyaki>> CREATE TABLE emp_target
      2  AS
      3     SELECT * FROM emp WHERE ROWNUM <= 8;
    Table created.
    satyaki>>
    satyaki>> SELECT COUNT(*) FROM emp_target;
      COUNT(*)
             8
    satyaki>>
    satyaki>> BEGIN
      2     MERGE INTO emp_target et
      3        USING ( SELECT * FROM emp_source ) es
      4        ON    ( et.empno = es.empno )
      5     WHEN MATCHED THEN
      6     UPDATE
      7        SET et.ename  = es.ename
      8        ,   et.sal    = es.sal
      9        ,   et.mgr    = es.mgr
    10        ,   et.deptno = es.deptno
    11     WHEN NOT MATCHED THEN
    12     INSERT
    13        ( et.empno, et.ename, et.sal, et.mgr, et.deptno )
    14        VALUES
    15        ( es.empno, es.ename, es.sal, es.mgr, es.deptno );
    16 
    17     DBMS_OUTPUT.PUT_LINE(TO_CHAR(SQL%ROWCOUNT) || ' rows merged.');
    18  END;
    19  /
    14 rows merged.
    PL/SQL procedure successfully completed.Hope this will help.
    Regards.
    Satyaki De.

  • Combine Columns From Separate Arrays Into One Formatted Table

    What I'm trying to do is make two WMI queries with 2 different classes for a list of machines and then patch the columns together into one single array that is formatted as a table with columns and rows. I seem to keep banging my head against the wall and
    I can't help but feel that the answer is simple. I can certainly create an array that contains all 3 columns (such as in the commented out part) but no matter which angle I go at it, it always seems to end up as all the data in one single row in each column
    rather than a nicely formatted table. I've even tried constructing separate custom objects and adding the different objects to the array but that's obviously not working. Below is the code of the last thing I tried. I need someone to bash it to death and tell
    me the (most likely obvious) thing that I'm doing wrong. Thanks!
    $failedos = @()
    $failedcs = @()
    $ccs = get-adcomputer -property operatingsystem -filter {name -like "*-CC*"} | select name | sort name
    $cs = foreach ($cc in $ccs){$cc.name | % {if ($c=get-wmiobject -computername $cc.name -class win32_computersystem -ErrorAction SilentlyContinue){$c | select @{Name="Name";Expression={$_.Name}}, @{Name="Model";Expression={$_.Model}}} else {$failedcs += "$_"}}}
    $os = foreach ($cc in $ccs){$cc.name | % {if ($o=get-wmiobject -computername $cc.name -class win32_operatingsystem -ErrorAction SilentlyContinue){$o | select @{Name="OperatingSystem";Expression={$_.caption}}} else {$failedos += "$_"}}}
    #[array]$osprops = @{'Name'=$cs.Name;'Model'=$cs.Model;'OperatingSystem'=$os.OperatingSystem}
    $result = @()
    Foreach ($Line in $cs) {
    $MyCustomObject = New-Object -TypeName PSObject
    Add-Member -InputObject $MyCustomObject -MemberType NoteProperty -Name "Name" -Value $Line.name -Force
    Add-Member -InputObject $MyCustomObject -MemberType NoteProperty -Name "Model" -Value $Line.Model -Force
    $result += $MyCustomObject
    foreach ($Line2 in $os) {
    $MyCustomObject2 = New-Object -TypeName PSObject
    Add-Member -InputObject $MyCustomObject2 -MemberType NoteProperty -Name "OperatingSystem" -Value $Line2.OperatingSystem -Force
    $result += $MyCustomObject2

    Any help?
    $ccs = get-adcomputer -property operatingsystem -filter {name -like "*-CC*"} |
    select -ExpandProperty name | sort
    $Result =
    Foreach ($CC in $CCs)
    $Object =
    New-Object PSObject -Property @{ Name = $CC
    Model = 'Failed'
    OperatingSystem = 'Failed'
    Try {
    $Object.Model =
    get-wmiobject -computername $CC -class win32_computersystem -ErrorAction Stop |
    select -ExpandProperty Model
    $Object.OperatingSystem =
    get-wmiobject -computername $CC -class win32_operatingsystem -ErrorAction Stop |
    select -ExpandProperty Caption
    Catch{}
    Finally { $Object }
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to delete columns from process form table

    hi,
    I have a process form UD_FN_USR. I created one column userid with type long and later the requirement got changed and I need to change the type to string.I am able to delete the column from design console but in the table the column exits so that I coulnt create the column with same name as type string , its tellling same column name exits with different datatype in current version or previous versions.can anybody please tell me how to solve this issue

    Sorry for late response. Got stuck in work.
    This time it will answered ;-)
    ALTER TABLE UD_ABCD DROP COLUMN UD_ABCD_UID
    DELETE FROM SDC WHERE  SDC_NAME='UD_ABCD_UID';
    COMMIT;
    Thanks
    Rajiv Dewan

Maybe you are looking for