Friday, May 6, 2016

How To Setup Tax Exemption In E-business Tax For Suppliers



How To Setup Tax Exemption In E-business Tax For Suppliers

For certain Suppliers, the Tax Exempt classification should be set so that no tax is added to the AP invoice, during the validation/calculation of tax process.
The following provides step-by-step instructions on how to accomplish this.
  1. Navigate to Trading Community Manager Responsibitly > Trading Community: Administration > Classifications
  2. Click on "Create Class Category"
  3. Enter values for
    • Class Category ::
    • Class Category Meaning ::
    • Class Category Description ::
    • Delimiter :: leave it default
  4. Under "Assign Entities"
    • Ensure that you select the default
    • Select :: tick mark
    • Table Name :: HZ_PARTIES
    • Condition (Where Clause) :: WHERE PARTY_TYPE = 'ORGANIZATION'
  5. Click on "Apply and Create Class Codes"
  6. Enter values for the following
    • Class Code :: for example "NO TAX"
    • Meaning :: "NO TAX"
    • Description :: No Tax for party X
  7. Click on Apply
  8. Click on compile
  9. Now Requery the class category ...
  10. You should see the associated class codes
  11. Navigate to Tax Managers Responsibility > Parties > Party Classification
  12. Create
  13. Provide the following values
    • Party Classification ::
    • Fiscal Classification Type Code ::
    • Name ::
    • Effective From ::
  14. Under the "Associated Tax Regimes" region
    • Regime Code ::
    • Name ::
    • Effective From ::
  15. Apply & save
  16. Navigate to Tax Managers Responsibility > Parties > Party Tax Profiles
  17. Query for Party Type :: Third Party
    • Party Name :: X
    • Click on update tax profile
    • Ensure that the "Allow Tax Applicability" is not enabled
  18. Click on Classifications Tab
    • For Fiscal Classification Type Code ::
    • Fiscal Classification Code :: NO TAX
    • Fiscal Classification Name :: NO TAX
    • Effective From ::
  19. Click on Apply
  20. Navigate to Tax Managers Responsibility > Advanced Setup Options > Tax Determining Factor Sets
  21. Click on Create
  22. Enter the following values
    • Tax Determining Factor Set ::
    • Name ::
    • Ledger ::
    • Regime Code ::
    • Determining Factor Class :: Party Fiscal Classification
    • Class Qualifier :: Ship from Party
    • Determining Factor Name ::
  23. Click on Apply
  24. Navigate to Tax Managers Responsibility > Advanced Setup Options > Tax Condition Sets
  25. Click on Create
    • Enter values for
    • Tax Condition Set ::
    • Name ::
    • Determining Factor Set::
    • Country Name:: United States
  26. Click on Continue
  27. Enter value for
    • Value/From Range ::NO TAX
  28. Click on Finish
  29. Navigate to Tax Managers Responsibility >Tax Configuration > Tax Rules
  30. Create a "Determine Tax Applicability" Rule using the previously created Tax Determining Factor Set & Tax Condition Set
  31. Ensure that when you create this rule set the applicability to "Not Applicable"
    In order to have the "Not Applicable" value in the LOV, Determine Tax Applicability should have a default value of "Applicable".
  32. Save
  33. Bounce the Apache Server
  34. Create a new invoice to the supplier 'X'
  35. Click "Calculate Tax" no tax gets calculated
Please note that ...the above steps are done so that system does not calculate tax on a particular party (supplier) automatically....but still if user needs to have tax for this invoice...they can create a manual
tax line

Tuesday, May 3, 2016

SQL Query to get all users who have access to create Requisitions and Purchase orders with their Approval Limits

 Below Query will give details of users who have access to create Requisitions and Purchase orders with their Approval Limits

SELECT user_name, user_id, full_name, country, job,
       xxta_poreq_user_resp ('PO', user_id) po_responsibilities,
       xxta_poreq_user_resp ('RQ', user_id) req_responsibilities, doc_name,
       appr_limit
  FROM (SELECT DISTINCT fu.user_name, ppf.full_name,
                        ppf.per_information_category country, pj.NAME job,
                        fu.user_id, appr.doc_name, appr.appr_limit
                   FROM fnd_user fu,
                        per_all_people_f ppf,
                        per_all_assignments_f paf,
                        (SELECT   ppca.job_id,
                                  pcf.control_function_name doc_name,
                                  MAX (amount_limit) appr_limit
                             FROM po_position_controls_all ppca,
                                  po_control_functions pcf,
                                  po_control_rules pcr,
                                  po_control_groups_all pcga
                            WHERE ppca.control_group_id = pcr.control_group_id
                              AND pcf.control_function_id =
                                                       pcf.control_function_id
                              AND pcga.control_group_id = pcr.control_group_id
                              AND pcr.object_code = 'DOCUMENT_TOTAL'
                         GROUP BY ppca.job_id, pcf.control_function_name) appr,
                        per_jobs pj
                  WHERE EXISTS (
                           SELECT '1'
                             FROM fnd_compiled_menu_functions cmf,
                                  fnd_form_functions ff,
                                  fnd_form_functions_tl ffl,
                                  fnd_form_vl ffv,
                                  fnd_responsibility_vl rtl,
                                  fnd_user_resp_groups furg
                            WHERE cmf.function_id = ff.function_id
                              AND rtl.menu_id = cmf.menu_id
                              AND cmf.grant_flag = 'Y'
                              AND ff.function_id = ffl.function_id
                              AND ffv.form_id = ff.form_id
                              AND ffv.form_name IN ('POXPOEPO', 'POXRQERQ')
                              AND furg.responsibility_id =
                                                         rtl.responsibility_id
                              AND furg.end_date IS NULL
                              AND rtl.end_date IS NULL
                              AND furg.user_id = fu.user_id)
                    AND fu.end_date IS NULL
                    AND fu.employee_id = ppf.person_id
                    AND TRUNC (SYSDATE) BETWEEN ppf.effective_start_date
                                            AND ppf.effective_end_date
                    AND ppf.person_id = paf.person_id
                    AND TRUNC (SYSDATE) BETWEEN paf.effective_start_date
                                            AND paf.effective_end_date
                    AND ppf.employee_number IS NOT NULL
                    AND paf.assignment_type IN ('E', 'C')
                    AND paf.job_id = appr.job_id
                    AND pj.job_id = paf.job_id
               ORDER BY user_name)

Thursday, April 28, 2016

Items getting created with same inventory item id for different items

1) query the Item in Master Org. See the Item name

2) Then scroll to the different Org ( Organization item) and open organization item to see the different item name coming there

3) Now to fix it first change the value of Profile option "INV: Updateable item name" to YES at user level. this ideally should be done by support team only and NOT business users

4) Then again Reopen the Master Item form so that the changes of the profile option take effect.

5) Query the item again in the Master Org. This time you will see the Name field as editable Field

6) Add any character or Dash (-) in front of the Item Name. and Save it.

7) Re query the item again with the new name ( with extra character / Dash) in Master Org , then go to the same problematic Org and see the item name. The New Item name with Dash will be coming in that org also.

8) then Go back to Master Org, Remove the Dash from the Name ( to bring back the original item name) and again Save it.

9) Re query it again in Master Org with this new name (which now will be the original item name) and then go to problematic org again.. See the Item name there, it will be fixed.

10) Change the Value of Profile option Back to NO.

Wednesday, April 13, 2016

How To Check Cross Validation Rules



The cross validation rule setup can be very complex depending on the complexity of the Accounting Flexfield Structure.
There are a number of ways to get the wrong results and the best way to investigate is listed below:

1. Make sure that you include all the values you want the rule to apply to. If they are not included then they are automatically excluded.
Where the segment values are not of a fixed length start with 0 not 00 otherwise 0 is not in the rule.
Example
Include 01-00-00-0000 to 01-ZZ-ZZZZ-ZZZZ
should be
Include 01-0-0-0 to 01-zz-zzzz-zzzz
Otherwise the Exclude 01-0-01-0 to  01-AA-ZZZZ-ZZZZ
is not going to affect the outcome since it is not within the range that the rule will be applied to.

Note: Lower case letters are looked at after upper case hence 0 to z includes Z

2. Apply the same logic to the exclude rules
so the exclude should be 01-0-0-0 to  01-AA-ZZZZ-ZZZZ

In order to check whether the range will appear in a rule we have some sql below.
a. First find your chart of account details using script 1 or 2.
b. Adjust the sql to work for your chart of accounts by adding or taking away any statement relating to segmentn in scripts 3 and 4
c. check that the combination in your exclude lines exists in the include using script 3, in the example above test 01-0-0-0 and 01-AA-ZZZZ-ZZZZ

For combinations failing when they should not:
d. check that the combination is in the include using sql 3   -  it should be
e. check that the combination is in the exclude using sql 4  -  it should not be if it is restructure the rule until it is excluded.

For a combination passing when it should fail
f. check that the combination is in the include using sql 3 -   it should be if it is not restructure the rule until it is included
g. check that the combination is in the exclude using sql 4 - it should not be if it is restructure the rule until it is excluded.
SCRIPTS
1. To find the details of the Accounting Flexfield structure you are working with in R12 run this sql
SELECT gls.name,
idfs.id_flex_num chart_of_accounts_id,
idfs.segment_num,
idfs.flex_value_set_id,
fvs.flex_value_set_name,
idfs.application_id,
idfs.id_flex_code,
idfs.application_column_name,
idfs.segment_name,
fvs.security_enabled_flag,
(CASE
WHEN fvs.validation_type = 'F' THEN 'Table'
WHEN fvs.validation_type = 'I' THEN 'Independent'
WHEN fvs.validation_type = 'D' THEN 'Dependent'
WHEN fvs.validation_type = 'N' THEN 'None'
WHEN fvs.validation_type = 'P' THEN 'Pair'
WHEN fvs.validation_type = 'U' THEN 'Special'
ELSE 'Unknown Type'
END) validation_type,
(CASE
WHEN fvs.validation_type = 'F' then fvt.application_table_name
ELSE 'Not Applicable' END) validation_table_name
FROM gl_ledgers gls,
fnd_id_flex_segments idfs,
fnd_flex_value_sets fvs,
fnd_flex_validation_tables fvt
WHERE gls.chart_of_accounts_id (+) = idfs.id_flex_num
AND fvs.flex_value_set_id = idfs.flex_value_set_id
AND gls.ledger_id = &LedgerId
AND idfs.application_id = 101
AND idfs.id_flex_code IN ('GL#', 'GLLE')
AND fvs.flex_value_set_id = fvt.flex_value_set_id (+)
ORDER BY idfs.id_flex_code, idfs.id_flex_num , idfs.segment_num ASC;

2. To find the details of the Accounting Flexfield structure you are working with in R11i run this sql:
SELECT glsob.name,
idfs.id_flex_num chart_of_accounts_id,
idfs.segment_num,
idfs.flex_value_set_id,
idfs.application_id,
idfs.application_column_name,
idfs.segment_name,
fvs.security_enabled_flag
FROM gl_sets_of_books glsob,
fnd_id_flex_segments idfs,
fnd_flex_value_sets fvs
WHERE glsob.chart_of_accounts_id = idfs.id_flex_num
AND fvs.flex_value_set_id = idfs.flex_value_set_id
AND glsob.set_of_books_id = &SoBID
AND idfs.application_id = 101
AND idfs.id_flex_code = 'GL#'
ORDER BY idfs.segment_num ASC;rt code here]

You will need to modify the ranges in the where clause from ('&s1' between segment1_low and segment1_high) onwards so that you have the segment values returned above in the order of use. If you have only 5 segments for example and they are segment1, segment2, segment3,segment4,segment5 then you would have
(('&s1' between segment1_low and segment1_high) and
('&s2' between segment2_low and segment2_high) and
('&s3' between segment3_low and segment3_high) and
('&s4' between segment4_low and segment4_high) and
('s&5' between segment5_low and segment5_high));

3. To find if a code combination will be in the include range in either version use this giving the segment value for each prompt:
select
rule_line_id,
application_id,
id_flex_code,
id_flex_num,
flex_validation_rule_name,
enabled_flag
from fnd_flex_include_rule_lines
where application_id = 101
and id_flex_code = 'GL#'
and id_flex_num = 101
and (('&s1' between segment1_low and segment1_high) and
('&s2' between segment2_low and segment2_high) and
('&s3' between segment3_low and segment3_high) and
('&s4' between segment4_low and segment4_high) and
('s&5' between segment5_low and segment5_high) and
('&s6' between segment6_low and segment6_high) and
('&s7' between segment7_low and segment7_high));

4. To find if a combination is in the exclude range in either version use this giving the segment value for each prompt:
select
rule_line_id,
application_id,
id_flex_code,
id_flex_num,
flex_validation_rule_name,
enabled_flag
from fnd_flex_exclude_rule_lines
where application_id = 101
and id_flex_code = 'GL#'
and id_flex_num = 101
and (('&s1' between segment1_low and segment1_high) and
('&s2' between segment2_low and segment2_high) and
('&s3' between segment3_low and segment3_high) and
('&s4' between segment4_low and segment4_high) and
('s&5' between segment5_low and segment5_high) and
('&s6' between segment6_low and segment6_high) and
('&s7' between segment7_low and segment7_high));