18 August, 2025

LDT Commands Oracle EBS

 

Concurrent program download :
==============================
FNDLOAD apps/password O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_DAILY_PAYMENT_REPORT_XL.ldt PROGRAM APPLICATION_SHORT_NAME="XXTOP" CONCURRENT_PROGRAM_NAME="XX_DAILY_PAYMENT_REPORT_XL"



Data definition and template download :
======================================
FNDLOAD apps/password O Y DOWNLOAD  $XDO_TOP/patch/115/import/xdotmpl.lct XX_DAILY_PAYMENT_REPORT_XL_DDTEMP.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME='XXTOP' DATA_SOURCE_CODE='XX_DAILY_PAYMENT_REPORT_XL' TMPL_APP_SHORT_NAME='XXTOP' TEMPLATE_CODE='XX_DAILY_PAYMENT_REPORT_XL'

Concurrent program upload:
=============================
FNDLOAD apps/password O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XX_DAILY_PAYMENT_REPORT_XL.ldt

Data definition and template upload:
======================================
FNDLOAD apps/password 0 Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct XX_DAILY_PAYMENT_REPORT_XL_DDTEMP.ldt


Script to run Workflow background process - Oracle EBS

 DECLARE
   l_responsibility_id   NUMBER;
   l_application_id      NUMBER;
   l_user_id             NUMBER;
   l_request_id          NUMBER;
BEGIN
 
   SELECT DISTINCT fr.responsibility_id, frx.application_id
             INTO l_responsibility_id, l_application_id
              FROM fnd_responsibility frx, fnd_responsibility_tl fr
             WHERE fr.responsibility_id = frx.responsibility_id
               AND  fr.responsibility_name LIKE 'System Administrator';
 
   SELECT user_id
     INTO l_user_id
     FROM fnd_user
    WHERE user_name = 'TEST_USER';
 
   --To set environment context.
 
   fnd_global.apps_initialize (l_user_id
                              ,l_responsibility_id
                              ,l_application_id );
 
   --Submitting Concurrent Request
 
   l_request_id :=
      fnd_request.submit_request (application      => 'FND',
                                  program          => 'FNDWFBG',
                                  description      => 'Workflow background process for deferred and timeout activities',
                                  start_time       => SYSDATE,
                                  sub_request      => FALSE,
                                  argument1        => NULL,
                                  argument2        => NULL,
                                  argument3        => NULL,
                                  argument4        =>'YES',
                                  argument5        =>'YES',
                                  argument6        =>'YES'
                                 );
   --
   COMMIT;
 
   IF l_request_id = 0
   THEN
      DBMS_OUTPUT.put_line ('Concurrent request
failed to submit');
   ELSE
      DBMS_OUTPUT.put_line ('Successfully
Submitted the Concurrent Request'|| l_request_id);
   END IF;
--
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (   'Error While Submitting
Concurrent Request '
                            || TO_CHAR (SQLCODE)
                            || '-'
                            || SQLERRM
                           );
END;
 
/

Oracle EBS AR Customer Profile creation API

 SET SERVEROUTPUT ON;
DECLARE
p_customer_profile_rec_type HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
x_cust_account_profile_id   NUMBER;
x_return_status             VARCHAR2(2000);
x_msg_count                 NUMBER;
x_msg_data                  VARCHAR2(2000);
cursor c_cust is select cust_account_id 
from hz_cust_accounts 
where account_number in ('TEST110887','TEST518421'); 
BEGIN
-- Setting the Context --
mo_global.init('AR');
fnd_global.apps_initialize ( user_id      => 20276 
                            ,resp_id      => 51117
                            ,resp_appl_id => 222);
mo_global.set_policy_context('S',101);
fnd_global.set_nls_context('AMERICAN');

-- Initializing the Mandatory API parameters
for r_cust in c_cust loop
p_customer_profile_rec_type.cust_account_id   :=  r_cust.cust_account_id;
p_customer_profile_rec_type.created_by_module := 'CUST_INTERFACE';
p_customer_profile_rec_type.profile_class_id := 1040 ; -- give the profile class id
  --p_customer_profile_rec_type.customer_profile_class_name := 'TEST_DEFAULT';
                  p_customer_profile_rec_type.credit_hold := 'N';
DBMS_OUTPUT.PUT_LINE('Calling the API hz_customer_profile_v2pub.create_customer_profile');
HZ_CUSTOMER_PROFILE_V2PUB.CREATE_CUSTOMER_PROFILE
                  (
                    p_init_msg_list             => FND_API.G_TRUE,
                    p_customer_profile_rec      => p_customer_profile_rec_type,
                    p_create_profile_amt        => FND_API.G_TRUE,
                    x_cust_account_profile_id   => x_cust_account_profile_id,
                    x_return_status             => x_return_status,
                    x_msg_count                 => x_msg_count,
                    x_msg_data                  => x_msg_data
                          );
IF  x_return_status = fnd_api.g_ret_sts_success THEN
    COMMIT;
    DBMS_OUTPUT.PUT_LINE('Creation of Customer Profile is Successful ');
    DBMS_OUTPUT.PUT_LINE('Output information ....');   
    dbms_output.put_line('Cust Account Id         = '||TO_CHAR(p_customer_profile_rec_type.cust_account_id));
    dbms_output.put_line('Cust Account Profile Id = '||TO_CHAR(x_cust_account_profile_id));
    dbms_output.put_line('Status                  = '||p_customer_profile_rec_type.status);
    dbms_output.put_line('Credit Checking         = '||p_customer_profile_rec_type.credit_checking);
    dbms_output.put_line('Interest Charges        = '||p_customer_profile_rec_type.interest_charges);
ELSE
    DBMS_OUTPUT.put_line ('Creation of Customer Profile got failed:'||x_msg_data);
    ROLLBACK;
    FOR i IN 1 .. x_msg_count
    LOOP
      x_msg_data := fnd_msg_pub.get( p_msg_index => i, p_encoded => 'F');
      dbms_output.put_line( i|| ') '|| x_msg_data);
    END LOOP;
END IF;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Completion of API');
END;
/