Thursday, October 13, 2011

in 11.5.10.2, when the public api CS_ServiceRequest_PUB.Create_ServiceRequest is called with the datastructure service_request_rec_type, a service request is created, but the account number is not entered.

Visit the Below Website to access unlimited exam questions for all IT vendors and Get Oracle Certifications for FREE
http://www.free-online-exams.com
Problem:

in 11.5.10.2, when the public api CS_ServiceRequest_PUB.Create_ServiceRequest is called with the datastructure service_request_rec_type, a service request is created, but the account number is not entered.

EXPECTED BEHAVIOR
---------------------------------
When a Service Request is created via the UI, the user is able to enter the customer information, including the account number. When the Service Request is created via the API, the same field should be populated when passed. This includes the account number
Service Request created via the XXCRM_SR_CREATE_RCPT_REV_PKG.pkb package (which calls the CS_ServiceRequest_PUB.Create_ServiceRequest) is not populating the account number field.




Symptoms:

1) create a script to call the public API CS_ServiceRequest_PUB.Create_ServiceRequest
2) pass party, account and service request information to the script
3) execute the script
4) check the Service Request UI - Service request is created for the correct party, but the account number is not populated


Log files:

DATA USED TO CALL API
=====================
"ORG_ID" "ORGANIZATION_ID" "ROW_ID" "CASH_RECEIPT_ID" "SET_OF_BOOKS_ID" "CURRENCY_CODE" "RECEIPT_NUMBER" "RECEIPT_DATE" "REVERSAL_DATE" "DEPOSIT_DATE" "MATURITY_DATE" "REVERSAL_CATEGORY" "REVERSAL_REASON_CODE" "REVERSAL_COMMENTS" "LOCATION_ID" "AMOUNT" "REMITTANCE_BANK_ACCOUNT_ID" "PAY_FROM_CUSTOMER" "ACCOUNT_NAME" "ACCOUNT_NUMBER" "PARTY_ID" "PARTY_TYPE" "PARTY_NAME" "PHONE_NUMBER" "INVENTORY_ITEM_ID" "PROPERTY_CODE" "PROPERTY_DESCRIPTION" "CATEGORY_SET_NAME" "CATEGORY_SET_DESCRIPTION" "CATEGORY_CODE" "CATEGORY_ID" "CATEGORY_SET_ID" "BANK_NAME" "BANK_BRANCH_NAME" "BANK_ACCOUNT_NUM" "TERRITOTY_ID"
208.00 208.00 AAAJjIACJAABussAAF 500,705.00 1,001.00 AED 8989 07/12/2010 00:00:00 07/12/2010 00:00:00 07/12/2010 00:00:00 REV SIGNATURE 106546 1,000.00 130,301.00 2,164,424.00 AHMED ABDALLA ALFEEL 94227 3,903,718.00 PERSON AHMED ABDALLA ALFEEL 971506160919 160,466.00 ICL1-CHI-A01-207 ICCH-0A001X002007-A Inventory Inventory Category Set IC Leasing 667.00 1.00 HSBC Bank Middle East Dubai Main Branch 021-089347-002 748
208.00 208.00 AAAJjIACJAABvR8AAK 500,725.00 1,001.00 AED 1 07/20/2010 00:00:00 07/20/2010 00:00:00 07/20/2010 00:00:00 REV SIGNATURE 113283 1,000.00 130,301.00 2,022,513.00 Alaa Tarabay 81950 3,744,116.00 PERSON ALAA YEHYA TARABAY 97143050340 177,929.00 ICL1 -FRA-R18-WR ICL1 -FRA-R18-WR Inventory Inventory Category Set IC Leasing 667.00 1.00 HSBC Bank Middle East Dubai Main Branch 021-089347-002 748
208.00 208.00 AAAJjIACPAAA3UrAAH 500,685.00 1,001.00 AED 1221 07/11/2010 00:00:00 07/11/2010 00:00:00 07/11/2010 00:00:00 REV SIGNATURE 106546 1,000.00 130,301.00 30,031.00 AHMED ABDELAZIZ MEKAWY SALAMA 88371 47,447.00 PERSON AHMED ABDELAZIZ MEKAWY SALAMA 971503622816 160,466.00 ICL1-CHI-A01-207 ICCH-0A001X002007-A Inventory Inventory Category Set IC Leasing 667.00 1.00 HSBC Bank Middle East Dubai Main Branch 021-089347-002 748



Solution:




The cause of this issue is that the account_number field, retrieved from the HZ_CUST_ACCOUNTS table is being used to populate the customer_number field in the CS_ServiceRequest_PUB.service_request_rec_type datastructure. Instead, the cust_account_id should be retrieved from the HZ_CUST_ACCOUNTS table and used to populate the account_id field on the CS_ServiceRequest_PUB.service_request_rec_type datastructure.

To address this issue, you will need to update the code in the package XXCRM_SR_CREATE_RCPT_REV_PJG.pkb

1) in the cursor lcu_main, retrieve the hca.cust_account_id from the HZ_CUST_ACCOUNTS table, along with the account_number and account_name
2) in the main loop, replace the line

lrec_service_request_rec_type.customer_number := rec.account_number;

with the line

lrec_service_request_rec_type.account_id := rec.cust_account_id;

3) retest the issue
4) Migrate the solution as appropriate to other environments.



Get Oracle Certifications for all Exams
Free Online Exams.com

No comments: