Friday, 19 December 2014

fndload commands Key Flexfield and Descriptive Flexfield descriptions

KFF - Keyflexfields are used throughout the Applications to uniquely identify informations such as GL accounts, INV items, FIxed Assets and other entities that every business needs to keep track of. 
We can't able to create a new kff but we can modify the existing one

DFF- Descriptive flexfields enable you to capture additional pieces of information from transaction entered into Oracle EBS.

DFF and KFF share common features. They are multisegment fields. Application validates individual segments based ons makes valueset rules and ensures that the segments makes sense using CVR (cross-validation rules).


Context Sensitive Segments  in DFF:

Context Sensitive Segments are conditional DFFs. Only when a condition  is met a particular field 'appears' and we are able to capture details. So for that first DFF is made context sesitive and then second one if made reference.

DFF has two types of segments

1. Global Segments
2. Context Sensitive Segments

Context Sensitive Segments depends on value of another field. 

REFERENCE Field - If the context sensitive information is derived from a field in the form, then that field is called as a Reference Field.

CONTEXT Field - If the context sensitive information is derived from a field / segment in the DFF pop up windown, then that field is called as a Context Field.


Downloading a ldt file for dff 

Download command

FNDLOAD un/pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct address.ldt DESC_FLEX P_LEVEL=:COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME="AR" DESCRIPTIVE_FLEXFIELD_NAME="Remit Address HZ"

query below using title to get the DESCRIPTIVE_FLEXFIELD_NAME


select * from apps.FND_DESCRIPTIVE_FLEXS_VL where title='Address';




p_context_code is not used in the fndload download command because not using this for downloading a specific code in the screen shot if needed to downlaod specific code then below command is used


FNDLOAD:

FNDLOAD un/pwd 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct filename.ldt DESC_FLEX P_LEVEL=:COL_ALL:REF_ALL:CTX_ONE:SEG_ALL? APPLICATION_SHORT_NAME="AR" DESCRIPTIVE_FLEXFIELD_NAME="Remit Address HZ"
p_context_code='give the code name'


Upload Command:

FNDLOAD un/pwd 0 Y UPLOAD @FND:patch/115/import/afffload.lct filename.ldt custom_mode=FORCE




Wednesday, 17 December 2014

Query to find active customer accounts and sites in oracle apps r12

Query to find active customer accounts and sites in oracle apps r12:

SELECT
       hp.party_name                        "PARTY_NAME",      
       hp.party_number                      "PARTY_NUM",
       DECODE(hp.status,
              'A', 'Active',
              'I', 'Inactive',
              hp.status)                    "Party Status",
       hca.account_name                     "ACCOUNT_NAME",
       hca.account_number                   "ACCOUNT_NUM",
       DECODE(hca.status,
              'A', 'Active',
              'I', 'Inactive',
              hca.status)                   "Account Status",
       hcas.creation_date                   "SITE_CREATE_DT",
       DECODE(hcas.status,
              'A', 'Active',
              'I','Inactive')                   "Site Status",
       hps.party_site_number                "PARTY_SITE_NUMBER",
       hou.name                             "ORG",
       hcsua.site_use_code                  "SITE_USE_CODE",
       hcsua.location                       "LOCATION",
       col.name                             "COLLECTOR",
       hcpc.name                            "PROFILE_CLASS",
       rt.name                              "PAY_TERM",
       hcp.Credit_rating                    "CREDIT_RATING",
       hcp.credit_checking                  "CREDIT_CHECKING",
       hcp.credit_hold                      "CREDIT_HOLD",
       hcp.tolerance                        "TOLERANCE",
       hcp.override_terms                   "OVERRIDE_TERMS",
       hcpa.trx_credit_limit                "TRX_CREDIT_LIMIT",
       hcpa.overall_credit_limit            "OVERALL_CREDIT_LIMIT",
       arsc.name                            "STATEMENT_CYCLE",
       hl.address1                          "ADDRESS1",
       hl.address2                          "ADDRESS2",
       hl.address3                          "ADDRESS3",
       hl.address4                          "ADDRESS4",
       hl.city                              "CITY",
       hl.state                             "STATE",
       hl.postal_code                       "ZIP_CODE",
       hl.country                           "COUNTRY"
  FROM
       hz_parties              hp,
       hz_party_sites          hps,
       hz_cust_accounts_all    hca,
       hz_cust_acct_sites_all  hcas,
       hz_cust_site_uses_all   hcsua,
       hz_customer_profiles    hcp,
       hz_cust_profile_classes hcpc,
       hz_cust_profile_amts    hcpa,
       hz_locations            hl,
       ar_collectors           col,
       AR_STATEMENT_CYCLES arsc,
       hr_operating_units hou,
       ra_terms rt
 WHERE
       1=1
   AND hp.party_id            =  hca.party_id
   AND hca.cust_account_id    =  hcas.cust_account_id(+)
   AND hps.party_site_id(+)   =  hcas.party_site_id
   AND hp.party_id            =  hcp.party_id
   AND hca.cust_account_id    =  hcp.cust_account_id
   AND hps.location_id        =  hl.location_id(+)
   AND col.collector_id       =  hcp.collector_id
   AND hcp.cust_account_profile_id = hcpa.cust_account_profile_id
   AND hcas.cust_acct_site_id=hcsua.cust_acct_site_id
   AND hcp.statement_cycle_id=arsc.statement_cycle_id
   AND hcas.org_id=hou.organization_id
   AND hcpc.profile_class_id=hcp.profile_class_id
   AND hca.payment_term_id=rt.term_id(+)
   AND hp.party_type          = 'ORGANIZATION'    -- only ORGANIZATION Party types
   AND hp.status              = 'A'               -- only Active Parties/Customers
   AND hca.status = 'A'    --Only active sites
   AND hcas.status = 'A'   -- Only active sites
   AND  hcsua.site_use_code='BILL_TO'
   AND hou.name in ('US Operating Unit','IE Operating Unit')
   --AND hp.party_name like 'DELL%'
   --AND hca.account_number='11506'
   ORDER BY TO_NUMBER(hp.party_number), hp.party_name, hca.account_number;