Applies to:

Oracle Receivables - Version 12 and later
Information in this document applies to any platform.
FND_REQUEST.SUBMIT_REQUEST
ARLPLB

Purpose

This sample code will demonstrate the API: FND_REQUEST.SUBMIT_REQUEST to call Process Lockboxes program (ARLPLB) in Release 12.

Requirements

SQL*Plus or Oracle SQL Developer to execute the script

Configuring

The Lockbox process takes the below parameters, text in parenthese are the field names within arlplb.opc:

  1. new transmission (Y/N) (NEW_TRANSMISSION)
  2. transmission_id (LB_TRANSMISSION_ID)
  3. original request id (ORIG_REQUEST_ID)
  4. transmission name (TRANSMISSION_NAME)
  5. submit import (Y/N) (SUBMIT_IMPORT)
  6. datafile (DATA_FILE)
  7. control file (CNTRL_FILE)
  8. transmission format id (TRANSMISSION_FORMAT_ID)
  9. submit validation (Y/N) (SUBMIT_VALIDATION)
  10. pay unrelated invoices (Y/N) (PAY_UNRELATED_INVOICES)
  11. lockbox ID (LOCKBOX_ID)
  12. gl date (GL_DATE)
  13. report format (REPORT_FORMAT)
  14. complete batches only (Y/N) (COMPLETE_BATCHES_ONLY)
  15. submit postbatch (Y/N) (SUBMIT_POSTBATCH)
  16. alternate name search option (ALTERNATE_NAME_SEARCH)
  17. post partial amount or reject entire receipt (Y/N) (IGNORE_INVALID_TXN_NUM)
  18. USSGL transaction code (USSGL_TRN_CODE)
  19. Organization Id (ORG_ID)
  20. Apply Unearned Discount (Y/N) (APPLY_UNEARN_DISC)
  21. Number of Instances (1-99) (NO_OF_INSTANCES)
  22. Source type flag (S - SmartCash or L - Lockbox) (SOURCE_TYPE_FLAG)
  23. scoring model Id (SCORING_MODEL_ID)

Considering the definition of the concurrent program is volatile and may change over time, you can always check for the parameters as follows:

Responsibility: System Administrator
Navigation: Concurrent > Program > Define

Run a search on Short Name = ARLPLB and scan through the list of parameters

Please ensure to modify the input parameters accordingly and send either "Y" or "N".

Note:
1) Apply Unearn discounts parameter has been introduced as part of Bug 9288902 SETUP OPTION NOT TO CALCULATE UNEARNED DISC FOR APPLICATIONS VIA LOCKBOX.
2) The parameter for "Source type flag" should be passed in as "L", otherwise, you might find following error:

ARLPLB module: Process Lockboxes

Creating new row in ar_batches
Inserted batch and updated last_batch_num
Submission is Smartcash, bypassing insert to Interim tables.
No more receipts for this batch
No more batches for this lockbox

Instructions

1. You must run this code in the APPS schema.
2. Your options to run the code are:
You can save the code in a PL/SQL package and register the procedure as a concurrent program to run from within the application
You can run it stand alone directly from PL/SQL.

Caution

This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Sample Code

To set the proper context when running the process through a script, you need to determine the value for USER_ID and RESPONSIBILITY_ID. This provides information to the process so that it can simulate running as if you were logged into the Oracle Receivables application.

SELECT USER_ID,RESPONSIBILITY_ID,
RESPONSIBILITY_APPLICATION_ID, SECURITY_GROUP_ID
FROM FND_USER_RESP_GROUPS
WHERE USER_ID = (SELECT USER_ID
FROM FND_USER
WHERE USER_NAME = '&user_name')
AND RESPONSIBILITY_ID = (SELECT RESPONSIBILITY_ID
FROM FND_RESPONSIBILITY_VL
WHERE RESPONSIBILITY_NAME = '&resp_name');


You can also retrieve the above values using Help > Diagnostics > Examine menu from the application.
Block = $PROFILE$
Field = RESP_ID and USER_ID (APPL_ID is always 222)

SET SERVEROUTPUT ON;

DECLARE
v_return_val Number;

BEGIN
--Values shown here need to be replace with actual value

--fnd_global.apps_initialize(&user_id, &resp_id, &appl_id);
fnd_global.apps_initialize(1318, 50559, 222);

--mo_global.set_policy_context('S',&org_id);
mo_global.set_policy_context('S',204);

--fnd_request.set_org_id(&org_id);
fnd_request.set_org_id(204);

v_return_val := fnd_request.submit_request
('AR',    -- Application short name
'ARLPLB', -- program short name
NULL,     -- program name
NULL,     -- start date
FALSE,    -- sub-request
-- the following are ARLPLB parameters:
'Y',      --1. new transmission
NULL ,    --2. transmission_id
NULL ,    --3. original request id
'ptotatest10',  --4. transmission name
'Y',            --5. submit import
'/test.dat', --6. datafile
'ardeft', --7. control file
100,      --8. transmission format id
'N',      --9. submit validation
NULL ,    --10. pay unrelated invoices
NULL ,    --11. lockbox ID
NULL ,    --12. gl date
NULL ,    --13. report format
'Y',      --14. complete batches only
'N',      --15. submit postbatch
'N',      --16. alternate name search option
'N',      --17. post partial amount or reject entire receipt
NULL ,    --18. USSGL transaction code
204,      --19. Organization Id
'Y'       --20. apply unearn discounts
1,        --21. Number of instances
'L',      --22. Source Type Flag
1        --23. scoring model)
);
dbms_output.put_line('Concurrent Request ID :' || v_return_val);
COMMIT;
END;

arrow
arrow
    文章標籤
    Oracle Oracle ERP EBS AR
    全站熱搜
    創作者介紹
    創作者 Somebaby 的頭像
    Somebaby

    Oracle eBS經驗分享

    Somebaby 發表在 痞客邦 留言(0) 人氣()